cmux NEXT right-click menus: terminal, browser page, bookmarks and window menus get the glass highlight

Merged
TE
18d ago
+129-17

Follow-up to #22787 (right-click menus, Leo: "why are the right-click things not like Chrome?"). This brings the remaining main surfaces onto the shared menu style: the theme-tinted wash over the menu's glass instead of the system blue, plus icons.

What changes

  • Terminal right-click menu (selection, link and path rows): themed in the terminal's scope (TerminalSurfaceView.menu(for:)).
  • Browser page menus, both cmux rows and Chromium's own rows, including extension rows: themed in the tab's scope (BrowserContextMenuBuilder.show). WebKit's own menu is unchanged; it inserts rows into WebKit's menu.
  • Bookmarks bar, both a bookmark and the empty bar: themed.
  • Window background menu: themed.
  • Submenus filled as they open (Open With โ€บ): ThemedMenuHighlightRelay.menuNeedsUpdate now themes the rows the menu's delegate just added. Before, those rows fell back to the system blue.
  • Workspace menu name field: pressing โ†‘/โ†“ now leaves the field and moves the menu's highlight in the same press. In #22787 the first press only left the field.
  • What's New "Try it" runs Rename Workspace; renameWorkspace is added to changelogTryItActions. It's harmless: with no name it starts the inline rename.

Context menu audit, status after this PR

MenuThemed (glass wash)Icons
sidebar: workspace row, group header (name + swatches header), background, sections, layout items, footer, profile, machine headersyes (#22787)yes
tab, pane, tab group, new-tab (+), screen bar, Now Playingyes (#22787)yes
terminal (selection / link / path)yes (this PR)catalog rows yes
browser page / link / image / selection, Chromium and extension rowsyes (this PR)catalog rows yes, extension rows keep their own
bookmarks bar / bookmarkyes (this PR)yes
window backgroundyes (this PR)yes
agent chat message menu (WebKit-built), chat tab menu, composer chipsnot yet: next PR (the chat menu edits WebKit's own NSMenu in place)no
toolbar menus (downloads, reload, device, extensions), titlebar history, notification rows, history page, tasks assignee, debug menusnot yetno

Changelog

  • Changed: Terminal, browser page, bookmarks bar and window background right-click menus use the same soft, theme-tinted highlight as the sidebar menus.

Verification

  • scripts/cmux-next/prepush-gate.py: no new violations. check-app-size.sh --base origin/feat-cmux-next: ok.
  • Fleet runs (cmux-ci run --class light --script scripts/ci/run-swift-testing-suites.sh --arg Packages/macOS/CmuxNext --shards 4) at 492dfae and 526bfbf. All menu suites passed: ThemedMenuTests (including the new rowsAddedAsASubmenuOpensAreThemed and afterThemedRowRunsComesAfterTheChosenRow), MenuIdentityHeaderTests, ContextMenu*, BrowserContextMenuParity, BrowserHitMenuChromeParity, BrowserProfileLinkMenu, BrowserExtensionMenuIcons, BookmarkFolderIcon and FirstFrameColors. The failures were not from this PR: on base, ActionSurfaceParity .browserProfile has 13 top-level rows, SidebarPinnedRowWidth/SidebarRowGutter, settings exports and ClassicUpgradeSimulation; also timing tests on a loaded host (PaletteNavigation, SidebarGroupToggleScaling, ExtensionsMenuPerformance).
  • Review subagent 1: FAIL. It found that a themed page menu ended its request with nil before the chosen engine row's deferred run, which dropped every Chromium/extension row. Fixed with NSMenu.afterThemedRowRuns plus a test; the reviewer's fix for nil-window recursion is also in. Review subagent 2: PASS on the fix. Its nit, that a chosen row now keeps its menu alive until its deferred run, is in the last commit.

Observed / Not run

  • Observed: the gate, the size check, the two fleet runs above and the two reviews.
  • Not run: the last commit (pendingMenu, 3 lines) has no fleet run of its own; CI covers it. No live check of arrow-key forwarding from the name field inside an open NSMenu, and no Mac captures of the newly themed menus.

Agent session: cosmic-gray

๐Ÿค– Generated with Claude Code