cmux-next: an unfocused pane's tabs fade less on a focus change (strength 0.6 -> 0.4)

Merged
TE
15d ago
+22-19

Leo: "and also the "unfoused" opacity shift is MILDLY jarring... i think it's actually ok but just make the opacity shift not as drastic"

Leo-ask: ask-35d63f0002 (opacity part)

Cause

An unfocused pane can be marked in three ways. In a default two-pane split only one of them draws:

  • The veil over the pane (panes.inactiveDimming, theme token 0.10, already softened from 0.14 in #22948) draws only with layout dimming on, appearance.borders none with the border indicator, or ringless floating panes with the border indicator. The default appearance.focusIndicator is tabs, so it does not draw. Over a glass window (Leo's glass-clear) its fill is clear anyway.
  • The Ghostty unfocused-split-opacity dim is off unless the user's Ghostty config sets it (cmux loads = 1 first).
  • The unfocused pane's tab fade (ChromeEmphasis .fade, focus.inactiveTabStrength) does draw. #22987 raised it from 0.35 to 0.6 so the focused pane is easy to tell apart for Cmd-W. That made the shift on every focus change bigger.

Change

  • focus.inactiveTabStrength default: 0.6 -> 0.4 (Debug tunable; the LayoutStyle literal matches). On a focus change, the selected pill of the unfocused pane now keeps 0.6 of its fill (was 0.4), and its labels mix 40% toward the page (was 60%). The contrast floors (3.5:1, 2.5:1, 2:1) and the 150 ms veil ease are unchanged.
  • 0.4 is a compromise and not a straight halving to 0.3. It stays above the 0.35 that #22987 found too faint to show which pane Cmd-W closes. The tunable stays in Debug Settings (Focus > Unfocused tabs strength) for live tuning.
  • FocusedPaneTabCueTests now checks both sides: the unfocused pill keeps between half and two thirds of the focused fill, so the cue stays visible and the shift is not drastic. The label check (fainter than 0.6 of the focused contrast, still above the floors) is unchanged.
  • Docs: plans/cmux-next/focus.md, components/tabs.md, design-tokens.json/.md.

Changelog

Changed: In cmux NEXT, an unfocused pane's tabs fade less when focus moves to another pane.

Observed / Not run

  • Fleet compile-check --app and FocusedPaneTabCueTests (fleet package-test lane) at the head: results are in a comment.
  • No capture: a one-constant change to a Debug-tunable default. The new strength is checked by FocusedPaneTabCueTests on the tokens it produces, and Leo can compare values live with the Debug Settings slider.

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

Softens the dim on an unfocused pane's tabs so switching focus is less jarring, while keeping the cue readable.

The default focus.inactiveTabStrength drops from 0.6 to 0.4. 0.6 made the shift on every focus change too drastic; 0.35 was too faint to tell which pane Cmd-W would close. 0.4 keeps the selected pill at 0.6 of its focused fill. The contrast floors and the veil fade are unchanged, and the strength stays tunable in Debug Settings.

  • Updates FocusedPaneTabCueTests to check both sides: the unfocused pill keeps between half and two thirds of the focused fill; the label fade check is unchanged.
  • Updates the LayoutStyle literal and the focus/design-token docs, correcting per-style fade values and the hover fill formula (alpha ร— (1 โˆ’ strength/2)) at strength 0.4.