cmux NEXT: every lit glyph is ThemeTokens.litGlyph, never the raw accent, guarded in Swift and CSS
Merged
TE
16d ago+141+141+012345678901234567890123456789-36-36-01234567890123456789
Summary
Follow-up to #23124 (coord-deputy, 2026-10-21): every lit control's glyph is the lit glyph, and a guard keeps it so.
ThemeTokens.litGlyph(CmuxTheme) is now the one source: the theme accent (the primary text when there is none), lifted toward the primary text just far enough to contrast with the window at least as much as the rest ink.Palette.litGlyph,PaletteDynamic, the remote pane's and group sheet's resolved colors, the pages'--cmux-lit-glyphand the agent pane's--agent-lit-glyphall read it; the gallery mirrors it ingallery/theme/tokens.ts.- Moved off the raw accent (
Palette.accent/focusRingis 40% of the text with no accent; every bundled accent is fainter than its rest ink):- Native: Home's header toggles (
HomeHeaderButton), the remote pane's share buttons, a done checklist item, a chosen contact in Add People, a valid recipient chip's label, a hover card's waiting icon, a pinned extension's pin. - Pages: the find pill's on toggles, Plan (pressed, and pressed under the pointer), the header tools when pressed, the chosen model's check in the quick model menu.
- Native: Home's header toggles (
- Guards:
- Swift: ast-grep rule
no-raw-accent-lit-glyph(run by the pre-push gate and thecmux-next checksjob). It flags a condition choosingPalette.accent|accentFill|focusRing,tokens.accent|focusRingor a resolvedcolors.accentas an ink, and an ink property (themeTint,contentTintColor,textColor,themeColor,tintColor) set to one inside anifbranch; borders, backgrounds, fills, strokes and alpha washes don't match. - CSS:
webviews/test/lit-glyph-css.test.tsfails on a lit selector (aria-pressed|checked|selected=true,.is-on,[data-on],data-state=on,:checked, or a.ui-menu-check, which draws only on the chosen row) whosecolorisvar(--agent-accent)orvar(--cmux-accent). A fill may still mix the accent.
- Swift: ast-grep rule
Fills, selection washes, focus rings, links and status marks keep the accent; the find pill's on fill is unchanged.
Testing
aLitGlyphContrastsAtLeastAsMuchAsAtRest(PaneMoreShotsTests, from #23124) now readsThemeTokens.litGlyph: fleetscripts/ci/package-test-lane.shwithPaneMoreShotsTests,PaneMoreOverflowButtonTests,TabBarRestingControlsTestsgreen on 61d013af (compiles the whole package).- Guard red/green:
ast-grep scan --filter no-raw-accent-lit-glyph: on 0d141fed's copies of the four native files it flags all four (HomeHeaderButton.swift:79,RemoteHoverToolbar.swift:93,WorkspaceTodoRow.swift:17,HomeGroupContactRow.swift:17); on this head it finds nothing inPackages/. The first scan of the tree also found the chip and the waiting icon, moved here. The review found the extension pin (an if branch) and the model check (no state marker); the widened rule and test flag their old lines and nothing on this head.- The CSS test's scan, run as the same regexes in Python: 5 rules on 0d141fed's four CSS files, 0 on this head. After the base merge it caught the Plan hover rule the conflict resolution had dropped, which is fixed.
Observed / Not run
- Observed: the fleet run above; the ast-grep and CSS scans above;
prepush-gate.pyand the web lint hook on push. - Not run:
bun test test/lit-glyph-css.test.tsitself (bun tests are blocked on this Mac); CI runs it.
No capture: the change is glyph colors that ThemeTokens.litGlyph already decides, and #23124's contact sheet shows the token in Default, Soft Blue Light and Clay Orange.
Changelog
- Fixed: on, chosen and pressed controls (Home's header toggles, remote share buttons, checklist and contact checkmarks, Plan and the header tools in agent chats) are never dimmer than the same control at rest.
Agent session: cosmic-gray
🤖 Generated with Claude Code