cmux NEXT: pane ⋮ menu rows in the theme's highlight; a lit control never fainter than at rest

Merged
TE
16d ago
+240-7

Summary

  • The pane toolbar's ⋮ menu draws every row in the theme's highlight, like the sidebar's ⋮ menus. PaneToolbar.moreMenu() built its rows (the New Tab ones, the tab's actions, Search Tabs, Show in Tab Bar) as plain NSMenu rows, which highlight in the macOS system accent (orange for anyone who picked orange in System Settings); only the strip's plus themed its copy of the New Tab menu. It now runs themeRows over the whole menu.
  • A lit control is never fainter than at rest. The pane's zoomed ⋮ and pinned buttons and the find pill's toggles lit in Palette.accent, which is focusRing: 40% of the text in a theme with no accent, dimmer than the rest ink. Every bundled theme's accent is also fainter than its rest ink (contrast 2.5-5.5 against 5.6-7.4). The new Palette.litGlyph takes the theme accent (the primary text when there is none) and lifts it toward the primary text just far enough to reach the rest contrast, so Clay Orange stays orange and Soft Blue Light stays blue.
  • PaneMoreShotsTests renders the pane ⋮ next to the sidebar ⋮ (#22972, #23003): at rest, hovered, pressed and lit, in a dark, a light and an orange-accent theme, on an opaque pane and on glass. A fleet run returns the contact sheet with --artifact Packages/macOS/CmuxNext/.build/pane-more-shots.png.

Contact sheet

No capture: the change is two glyph colors and a menu's row views. The sheet below renders the real OverflowButton and PaneToolbarView offscreen on the fleet (PaneMoreShotsTests), and the menu's themed rows are asserted by a test because NSMenu rows draw only inside a menu window.

Rows: sidebar ⋮, then pane ⋮. Columns: rest, hover, pressed, lit (pane only).

pane and sidebar ⋮

What it shows:

  • Same glyph and glyph size in every theme.
  • The hover and pressed pills follow each host's frame: about 22 pt in the pane's tab row (TitlebarBandButton.side, the size of the row's other buttons) against 18 pt in a sidebar row (SidebarStyle.controlSize). Kept as is: the pill matches its neighbours.
  • On glass the pills stay translucent; the stripes show through.
  • The lit (zoomed) ⋮ (Palette.litGlyph): bright primary text in Default (before: a dim grey, dimmer than at rest), blue in Soft Blue Light, orange in Clay Orange (kept per coord-deputy while the rule is confirmed with Leo).

Testing

  • everyRowOfTheMenuIsThemed (PaneMoreOverflowButtonTests), fleet scripts/ci/package-test-lane.sh suite PaneMoreOverflowButtonTests:

    • red on 0a033585 (test only): (item.view → nil) is (ThemedMenuRowView → Optional<NSView>), 2 rows.
    • green on a5576c3f and 9708d0b7 with the fix, together with TabBarRestingControlsTests and PaneMoreShotsTests.
  • aLitGlyphContrastsAtLeastAsMuchAsAtRest (PaneMoreShotsTests): lit contrast >= rest in Default, the 5 bundled themes and a plain light and dark theme; strictly brighter with no accent; Clay Orange stays orange.

    • red on 69bcbe07 (test only): 8 of 8 themes, e.g. (lit → 2.47) >= (rest → 5.79).
    • green on 0d141fed with all three suites; the sheet above is that run's artifact.

Observed / Not run

  • Observed: the fleet runs above, and the contact sheet from the 0d141fed run.
  • Not run: the open menu itself. Its rows draw only inside a menu window, so they cannot be rendered offscreen; the test checks that every row is themed instead. The sheet's glass is the pane's color at 60% over stripes, not real window blur.

Changelog

  • Fixed: every row of a pane's ⋮ menu highlights in the theme's color, not the system accent.
  • Fixed: a lit pane button (zoomed ⋮, pinned buttons) and the find pill's on toggles are never dimmer than the same control at rest.

Agent session: cosmic-gray

🤖 Generated with Claude Code