fix(cmux-next): show focus rings only for keyboard navigation
Merged
TE
19d ago+72+72+01234567890123456789-12-12-01234567890123456789
Summary
Make focus treatment modality-aware in cmux-next’s composer and transcript:
- pointer focus no longer changes the composer rim or queue/strip edge;
:focus-visiblekeyboard traversal keeps the quiet keyboard focus treatment;- transcript controls suppress pointer outlines while preserving keyboard outlines;
- add focused CSS and browser-rim assertions for pointer versus keyboard focus.
This is separate from the pill polish PR and #21363.
Validation
- Static
focus-visuals.test.tscovers the modality selectors. - Existing
composer-rim-hairline.test.tsnow covers pointer click versus reverse-Tab keyboard focus. - Browser validation requires the hosted Playwright lane; local browser dependencies were unavailable.
git diff --checkclean.
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Makes focus treatment modality-aware in cmux-next: pointer focus no longer raises the composer rim, queue edge, strip, or transcript control outlines, while keyboard navigation keeps its visible focus ring.
- Switches composer focus selectors from
:focus-withinto:has(:focus-visible)so mouse clicks stay quiet and keyboard traversal still highlights the card. - Queue and strip edges use a descendant
:focus-visibleinside:has()instead of a nested:has(:focus-visible), avoiding nested:hasselectors on composer ancestors. - Suppresses browser outlines on transcript rows, Worked for, expandable tool rows, and icon buttons when they are focused by pointer only.
- Adds static CSS assertions plus browser tests covering pointer versus keyboard focus on the composer rim and Worked for.