cmux NEXT right-click menus: Chrome-style name and color header, icons on every row, glass highlight
Merged
TE
18d ago+540+540+012345678901234567890123456789-235-235-012345678901234567890123456789
Leo: "why are the right-click things not like Chrome? This isn't even really styled." This PR is the first pass, sidebar first.
What changes
- Workspace and group menus open like Chrome's tab-group menu. The top of the menu is the name in an editable field, then the colors as one row of swatches with the current one ringed. These replace the old Rename… row and the color row or Color › submenu. Press Return, or just close the menu, and the new name is kept (Chrome works the same way). When several rows are selected, the menu shows only the swatches. The rename runs the existing
renameWorkspace/workspaceGroup.renameaction with anameargument, and a swatch runs the existing color action, so the palette, CLI and menu still share one path. - Every right-click row has an icon. Each row shows its action's SF Symbol (
ActionDescriptor.symbol), and each folder has its own symbol (MenuFolder.symbol). Once any row in a menu has an icon, titles stay aligned. This applies to every menu built from the catalog, themed or not. - The highlight is glass, not a system-blue bar. On a themed menu, the highlighted row is now a faint wash of the theme's accent (
Palette.menuHighlight, 20% over the menu's own glass), and the label keeps its normal color. A neutral theme gets a gray wash. The menu surface itself is still AppKit's translucent material. - More themed menus. Now themed: every sidebar menu (background, sections, layout items and sections, footer, profile dots, machine headers, connecting-SSH rows), plus the tab-group, new-tab (+) and screen-bar menus. Already themed before: workspace row, tab, pane and Now Playing.
- Flatter More. Inside More, a folder with ≤ 8 rows (
inlineFolderLimit) now shows as a section between separators instead of a submenu inside a submenu. So in the workspace menu, New, Appearance, Copy, Tools and Close become sections of More, and only the 19-row Options stays a submenu. The same rule applies to the tab and pane menus. Duplicate Workspace moves to the workspace menu's top level.
Context menu audit (before → after this PR)
| Menu | Where | Before | After |
|---|---|---|---|
| workspaceRow | sidebar workspace row | system blue highlight on themed rows, no icons, Rename… + "Set Workspace Color" dots row, More › New/Appearance/Options/Copy/Tools/Close | name field + swatches header, icons, glass highlight, Duplicate on top, More with sections (Options › only) |
| workspaceGroup | sidebar group header | unthemed (system blue), no icons, Rename… + Color › | name field + swatches header, icons, themed |
| sidebarBackground / sidebarSection / sidebarItem / layout sections | sidebar | unthemed | themed + icons |
| sidebarFooter, profile, sshMachine, cloudMachine, machineSection | sidebar | unthemed | themed + icons |
| nowPlayingCard | sidebar | themed (solid accent bar) | glass highlight + icons |
| tab | tab strip / sidebar tab rows | themed (solid accent bar), More › nested | glass highlight + icons, More with sections |
| pane | pane / empty strip | themed (solid accent bar) | glass highlight + icons, More with sections |
| tabGroup | tab strip group chip | unthemed | themed + icons |
| newTab | + button / empty strip | unthemed | themed + icons |
| screen, screenGroup, screenBar | screen bar | unthemed | themed + icons |
| agentChat | chat tab | unthemed | icons (themed in the next PR) |
| terminalSelection, browserLink (terminal links) | terminal | unthemed | icons (themed next) |
| browserPage / browserLink / browserImage / browserSelection | browser page | unthemed | icons (themed next) |
| bookmark, bookmarksBar, browserProfile | browser chrome | unthemed | icons (themed next) |
| notification, space, windowBackground | panel / window | unthemed | icons (themed next) |
Hand-built menus not in the catalog (context_menus_not_exported: agentPaneMessage, notificationRow, paneToolbarMore, browserBackForward/Reload/Downloads/Media/Device/Extensions/Toolbar, bookmarkFolder, titlebarHistory, historyRow/Toolbar, homeBackground, taskAssignee, sidebarNotice/UpdateCard, remote toolbar/page, terminalPaste, debug menus) | various | unthemed, no icons | unchanged in this PR; the next PR moves the user-facing ones onto themeRows |
Still to do, in follow-ups: theme the remaining menus (chat message, composer chips, terminal, browser) with the same themeRows style; give tab groups the same name/colors header; settle on one order across menus (create, organize, inspect, More, close). Item names and aliases are being coordinated with the palette-audit lane.
Changelog
- Changed: Right-click menus show an icon on every row and highlight rows with a soft theme-tinted glass instead of the system blue. Workspace and group menus now open with an editable name field and color swatches.
Verification
scripts/cmux-next/prepush-gate.py: no new violations, on both commits.- Fleet run (
cmux-ci run --class light --script scripts/ci/run-swift-testing-suites.sh --arg Packages/macOS/CmuxNext --shards 4, commit 0bfb640) had 1066 passing suites. Every menu suite passed: ContextMenuShapeTests, MenuIdentityHeaderTests (new), WorkspaceGroupFlatMenuTests, ContextMenuEssentialsTests, ContextMenuIconTests (new), FirstFrameColorsTests, ActionSurfaceParityTests and ThemedMenuTests. 20 suites failed, none of them touching menus: ClassicUpgradeSimulation, RapidWorkspaceCreate, GroupHeaderNewWorkspace, RowCloseMotion, DebugPaletteCapture, HomeChiefSettings*, LegacyHistoryFile, SwitchToColdTabTypeAhead, QuitSessions, NowPlayingCard (artwork), MachineIcon (machineSection catalog), SidebarHoverCardEscape (clock), AccountsCmuxRow, AgentPaneSendPickedFolderPrompt, BrowserImportFolderGrant, NewTabHoverPreview, NewTabJumpToTab, HomeMessageRequests and FolderViewMemory. This change touches none of the code they exercise. - Independent review subagent: PASS with no blockers. Its should-fix items are in the second commit: Up/Down hand the keyboard back to the menu, Escape restores the name, there is no field when rename can't run, the swatch rects come from the strip's bounds, the group menu rings only its own color, and the What's New highlight is added.
Observed / Not run
- Observed: the gate passed; the fleet suites above ran (first commit); the review passed.
- Not run: a Mac capture of the menus, and a live check that typing into the field inside an open NSMenu works on macOS 26. If the field can't take focus during menu tracking, clicking it focuses it, and closing the menu still keeps the name. The second commit's MenuIdentityHeader changes are covered by PR CI, not by the fleet run above.
Risk: normal (menu UI; no data or policy change).
Agent session: cosmic-gray
🤖 Generated with Claude Code