Repository navigation
fix(app): remove the focus rings around the timeline and composer - #65690
Conversation
There was a problem hiding this comment.
Looks good. I reproduced both rings on the base with a small Playwright test against the mock workspace: clicking in the timeline and pressing ↑ ringed the whole timeline, and typing then ringed the composer frame. With this PR neither appears. focus-rescue.spec.ts passes (6/6); run against the base code, only the new no-navigation case fails. The changed composer and Home e2e tests pass, the composer unit tests pass, and tsc is clean for app and ui.
Public API: unchanged. @opencode/ui/context/field-focus and FocusReturn.fieldRing are internal to the workspace.
One concern, inline: the timeline and Home's list stay Tab stops but now show no focus indicator at all.
| @@ -15,11 +15,6 @@ | |||
| outline: none; | |||
There was a problem hiding this comment.
With this rule gone, the timeline and Home's list still take Tab focus (tabindex="0") but show nothing when they get it. A keyboard user who tabs onto them sees focus disappear, which fails WCAG 2.4.7 (Focus Visible), and the focus-states skill itself says to draw a ring when someone navigates focus to a control. The composer at least has its caret; the scroll areas have nothing.
Could the ring stay for Tab only? For example, reuse the same navigation-key flag that focus-rescue now tracks, so a click followed by ↑/PgDn stays quiet but Tab still shows where focus went.


The timeline and the composer drew a focus ring around their whole frame at moments nobody navigated to them: after a click in the transcript followed by a key, when the app moved focus there, and still there on returning to the window.
Before and after
Why they showed
:focus-visibleon whatever has focus once a key without Ctrl/Alt/Meta is pressed, and on every focused text field. A click in the transcript focuses the whole scroll area, so the next arrow or PgDn ringed it.What changes
field-focus.tsx, which tracked the fields' ring state, is removed with its callers' ring arguments. The composer keeps one flag that tells a press from other focus, so a new editor still restores the draft's caret.:focus-visible.Trade-off
Tests
e2e/regression/composer.spec.tsnow asserts that no ring shows however focus arrives.focus-rescue.spec.tsgains a case for focus that no key moved, which fails on the old rule.Supersedes #65650, which replaced the browser's rule on every control to the same end.