Remove the next badge from global topbar

What does this MR do and why?

Removes the persistent Next badge from the global topbar and makes GitLab Next fully toggleable from the user menu, so users no longer have to navigate to next.gitlab.com and refresh to opt in or out.

Previously the user menu item "Switch to GitLab Next" was a link to next.gitlab.com (which set the gitlab_canary cookie), and a separate Next badge in the topbar indicated canary state. This MR:

  • Replaces the menu link with an in-place GlToggle that sets or removes the gitlab_canary cookie (scoped to .gitlab.com so it is shared across subdomains) and reloads the current page.
  • Removes the Next badge from the topbar. Canary state remains visible via the yellow tanuki favicon (screenshot-friendly for triage) and the performance bar (gitlab-cny pod prefix).
  • Extracts the canary cookie handling into a shared gitlab_next util (setGitlabNext / isGitlabNextEnabled) and reuses it from both the user menu and the existing g x keyboard shortcut so they behave consistently.
  • Removes the now-unused canary_toggle_com_url backend value (Gitlab.canary_toggle_com_url and the sidebars_helper key).
  • Treats "GitLab Next" as a proper noun (not translated), matching the prior treatment.

Known limitation (not a regression): the toggle only controls the per-user cookie. It cannot override path-based (gitlab-org / gitlab-com) or percentage-based canary routing, matching the previous next.gitlab.com behavior.

References

Closes #457007 (closed)

Screenshots or screen recordings

Before After
Before_-_Off After_-_Off
Before_-_On After_-_On

Topbar Next badge removed; user menu now shows a GitLab Next toggle.

How to set up and validate locally

GitLab Next is gated to gitlab.com, so simulate SaaS locally:

  1. Set GITLAB_SIMULATE_SAAS=1 and restart Rails (gdk restart rails-web). The user menu now shows a GitLab Next toggle in the off position, and the topbar no longer renders a Next badge.
  2. Toggle GitLab Next on. The page reloads and setGitlabNext(true) sets the gitlab_canary cookie. (On a non-gitlab.com host the browser rejects the .gitlab.com-scoped cookie, so it will not persist locally; this verifies the handler and reload.)
  3. Set CANARY=true and restart to exercise the on state: the toggle renders on, and toggling off calls setGitlabNext(false) and reloads.
  4. With GITLAB_SIMULATE_SAAS unset, confirm the toggle does not appear.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Austin Regnery

Merge request reports

Loading