cmux NEXT menus: downloads, reload, history and device menus take the glass highlight and icons

Merged
TE
17d ago
+324-477

The browser toolbar's own menus were the last plain AppKit menus in cmux NEXT: right-click or long-press Reload, Back or Forward, open Downloads or Emulate Device, and the highlight was the system blue with few or no icons, unlike the sidebar, tab, terminal, page and bookmarks menus (#22787, #22944). Now they draw the same theme-tinted glass highlight (ThemedMenuRowView, Palette.menuHighlight) in the toolbar's theme, and every row has an icon.

  • Downloads: each download keeps its file-type icon, subtitle progress and submenu; Open, Show in Finder, Pause/Resume, Retry, Cancel, Copy Link and Clear get symbols (Open Downloads Folder already had its action's). The toolbar presents it themed (BrowserToolbarButtonsView.present(_:from:themed:)).
  • Reload: Reload Page and Hard Reload Page use their actions' symbols (arrow.clockwise, arrow.clockwise.circle).
  • Back / Forward history: one row per entry with a page glyph.
  • Emulate Device: device-class glyphs (iphone, ipad, laptopcomputer, desktopcomputer, tv, a split rectangle for foldables), the fit and orientation rows have their own, and All Devices and brand submenus are themed. Search results that appear while the menu is open are themed too (NSMenu.themeAddedRows()). Section headers stay AppKit's: themeRows now skips them, along with separators and the search field.

A chosen themed row runs after the menu closes. Every menu here is presented with popUp and nothing after popUp depends on the action having run, so no afterThemedRowRuns step was needed. Each row's target is held by the item (representedObject), so it outlives the menu.

The same PR fixes three menu-only labels that palette-audit flagged:

  • Space menu: "Change Space Icon…" is now Set Icon…, "Remove Space Icon" is Remove Icon and "Edit Theme Color…" is Color. These are the shared words every other object's menu uses (IconMenuLabels, ObjectMenuLabels.color). The three menu.space.* keys were removed from ProfileActions.xcstrings.
  • Agent chat zoom: the chat's own menu says Zoom In / Zoom Out / Actual Size. The pane's Layout submenu said "Zoom In Chat / Zoom Out Chat / Reset Chat Zoom" and now says Chat Zoom In / Chat Zoom Out / Chat Actual Size: the same words, led by "Chat" the way the canvas rows say "Canvas Zoom In", since that submenu also zooms the pane. The English and every locale in Localizable.xcstrings were updated. Only "Chat Actual Size" needed new translations; for Zoom In and Zoom Out the translations already read correctly.

The generated plans/cmux-next/action-surfaces.json carries the old labels. PR autofix regenerates it, so it isn't edited by hand.

Changelog

Changed: The browser toolbar's Downloads, Reload, Back/Forward and Emulate Device menus use the cmux NEXT menu highlight and show an icon on every row.

Observed / Not run

  • Observed: fleet cmux-ci compile-check --app and the Swift testing suites (run-swift-testing-suites.sh, 4 shards) on the head; results are in a comment below. New tests: BrowserToolbarMenusThemeTests (Reload, Hard Reload, a clicked row running after close, Back history, Device menu with search results) and BrowserDownloadsMenuThemeTests (a finished download's menu, the empty menu, and a running download's row menu whose Cancel row cancels it; the fleet's test hosts have no general pasteboard, so Copy Link can't be read back there). Each checks that every row is a ThemedMenuRowView with an icon, or the device search field, and that choosing a row runs its action. prepush-gate.py, check-app-size.sh (CmuxNextApp shrinks by 1 source line) and check-menu-actions.py all ran locally. The only red in the menu-actions check is ChiefPaneTools.swift, which is red on base 7f3a43acecf (#22852) and is being fixed in #23073, so it isn't touched here.
  • Not run: no live capture of the menus in a DEV build. The look comes from the shared ThemedMenuRowView, which is already in use and tested in ThemedMenuTests.

Agent session: cosmic-gray

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

The browser toolbar's Downloads, Reload, Back/Forward history, and Emulate Device menus were the last plain AppKit menus in cmux NEXT — they showed the system-blue highlight with few or no icons. They now draw the same theme-tinted glass highlight in the toolbar's theme, and every row has an icon.

  • Each download keeps its file-type icon, progress subtitle, and submenu; all its commands gained symbols, and a download row's right-click menu is themed too.
  • The device menu uses device-class glyphs; search results added while the menu is open are themed as well.
  • Menu section headers and separators stay AppKit's.

Label fixes

  • The space menu's icon and color rows now use the shared words (Set Icon…, Remove Icon, Color) that every other object's menu uses, with the old menu.space.* strings removed.
  • The pane's chat-zoom rows now read Chat Zoom In / Chat Zoom Out / Chat Actual Size, matching the chat menu's wording led by "Chat"; translations were updated.