GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(app): remove the focus rings around the timeline and composer by Hona · Pull Request #65690 · anomalyco/opencode

Conversation

@Hona

@Hona Hona commented Nov 23, 2026

Copy link
Copy Markdown
Member

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

Before After
Click in the transcript, then press ↑ Ring around the whole timeline No ring
Then start typing Ring around the composer No ring

Why they showed

  • Chromium matches :focus-visible on 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.
  • The composer drew its ring on every focus that was not a direct click, which includes typing from elsewhere and focus the app restores.
  • Focus rescue forced a ring whenever the last input was any key, Ctrl and Alt included.

What changes

  • Scroll areas (the timeline, Home's list) still take focus for keyboard scrolling, and draw no ring.
  • The composer and Home search no longer draw a frame ring. Focus shows as the caret and the field's focused background.
  • Focus rescue rings the control it lands on only when Tab or an arrow key moved focus last:
const NAVIGATION = new Set(["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"])

const useKeyboard = (event: KeyboardEvent) => {
  if (event.ctrlKey || event.altKey || event.metaKey || !NAVIGATION.has(event.key)) return
  keyboard = true
}
  • 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.
  • Every other control keeps the browser's :focus-visible.

Trade-off

  • Tab onto the timeline or into the composer no longer draws a ring. The composer shows its caret. The timeline shows nothing until focus moves to a control inside it.

Tests

  • The composer keeper in e2e/regression/composer.spec.ts now asserts that no ring shows however focus arrives.
  • focus-rescue.spec.ts gains 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Hona
fix(app): remove the focus rings around the timeline and composer
b27d070
@Hona Hona mentioned this pull request Nov 23, 2026
fix(app): show focus rings only during keyboard navigation #65650
Closed
opencodejr[bot]
opencodejr Bot reviewed Nov 23, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Before

After

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/ui/src/components/scroll-view.css
@@ -15,11 +15,6 @@
outline: none;

@opencodejr opencodejr Bot Nov 23, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Hona
Hona merged commit 18be128 into dev Nov 23, 2026
11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Hona
Hona deleted the quiet-focus-rings branch November 23, 2026 03:46
This was referenced Nov 23, 2026
fix(app): stop restyling every timeline row when one changes height #65692
Closed
fix(ui): no focus ring around the timeline, composer and Home search, as official's anomalyco/opencode-rune#824
Merged
This was referenced Nov 23, 2026
fix(app): keep the timeline and Home list out of the Tab order #65758
Merged
fix(app): drop the ring around a clicked Settings page and round the split button's ring #65783
Merged
fix(app): drop the ring around focused file viewers, tool output, error details, What's New and the terminal #65785
Merged
@BrewTestBot BrewTestBot mentioned this pull request Nov 23, 2026
opencode 2.4.0 Homebrew/homebrew-core#327368
Merged
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
opencode 2.4.0 amrkmn/homebrew-tap#1251
Closed
1 task
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
feat: opencode release v2.4.0 sprisa/opencode-server#95
Merged
@Hona Hona mentioned this pull request Nov 23, 2026
fix(app): keep the timeline still when a focused row scrolls out of range #65921
Merged
@scottames-github-bot scottames-github-bot Bot mentioned this pull request Nov 27, 2026
chore(deps): update ⬆️ mise-packages scottames/dots#1181
Merged
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Hona
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.