fix(cmux-next): show focus rings only for keyboard navigation

Merged
TE
19d ago
+72-12

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-visible keyboard 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.ts covers the modality selectors.
  • Existing composer-rim-hairline.test.ts now covers pointer click versus reverse-Tab keyboard focus.
  • Browser validation requires the hosted Playwright lane; local browser dependencies were unavailable.
  • git diff --check clean.

View with [code]smith Autofix with [code]smith
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-within to :has(:focus-visible) so mouse clicks stay quiet and keyboard traversal still highlights the card.
  • Queue and strip edges use a descendant :focus-visible inside :has() instead of a nested :has(:focus-visible), avoiding nested :has selectors 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.