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
GlTogglethat sets or removes thegitlab_canarycookie (scoped to.gitlab.comso 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-cnypod prefix). - Extracts the canary cookie handling into a shared
gitlab_nextutil (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_urlbackend value (Gitlab.canary_toggle_com_urland thesidebars_helperkey). - 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 |
|---|---|
![]() |
![]() |
![]() |
![]() |
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:
- Set
GITLAB_SIMULATE_SAAS=1and 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. - Toggle GitLab Next on. The page reloads and
setGitlabNext(true)sets thegitlab_canarycookie. (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.) - Set
CANARY=trueand restart to exercise the on state: the toggle renders on, and toggling off callssetGitlabNext(false)and reloads. - With
GITLAB_SIMULATE_SAASunset, 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.



