cmux NEXT right-click menus: terminal, browser page, bookmarks and window menus get the glass highlight
Merged
TE
18d ago+129+129+012345678901234567890123456789-17-17-01234567890123456789
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.menuNeedsUpdatenow 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;
renameWorkspaceis added tochangelogTryItActions. It's harmless: with no name it starts the inline rename.
Context menu audit, status after this PR
| Menu | Themed (glass wash) | Icons |
|---|---|---|
| sidebar: workspace row, group header (name + swatches header), background, sections, layout items, footer, profile, machine headers | yes (#22787) | yes |
| tab, pane, tab group, new-tab (+), screen bar, Now Playing | yes (#22787) | yes |
| terminal (selection / link / path) | yes (this PR) | catalog rows yes |
| browser page / link / image / selection, Chromium and extension rows | yes (this PR) | catalog rows yes, extension rows keep their own |
| bookmarks bar / bookmark | yes (this PR) | yes |
| window background | yes (this PR) | yes |
| agent chat message menu (WebKit-built), chat tab menu, composer chips | not 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 menus | not yet | no |
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 newrowsAddedAsASubmenuOpensAreThemedandafterThemedRowRunsComesAfterTheChosenRow), 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.afterThemedRowRunsplus 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