Skip to content

Make keyboard focus visible on the composer and search fields - #394

Merged
BunsDev merged 2 commits into
mainfrom
fix/focus-visibility
Sep 28, 2026
Merged

BunsDev merged 2 commits into
mainfrom
fix/focus-visibility

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 28, 2026

Copy link
Copy Markdown
Member

What changed

New test. A rendered e2e test tabs through every stop in both colour schemes. For each stop it compares the screen before and after focus, and requires the change to include at least one ring's worth of pixels whose colour moved by 3:1 or more. That follows the WCAG 2.4.7 and 2.4.13 measures. For a field whose container shows focus, it measures the container: the composer, the familiar search and the find bar.

Fixes the test found:

  • Message composer: focusing it changed no pixel by 3:1. The focus border was a 45% accent mix and the glow 12%. It now has a full-strength 2px ring (the border plus a 1px spread), and the soft glow sits outside it.
  • Familiar search, find bar and screen-viewer fields: focus showed only as a 1px border or a 15% halo. They now get the same 2px ring.

Verification

  • playwright test: 55 passed, including the new focus test in both schemes.
  • With the old composer style restored, the test fails with Message Local familiar: 0/1363.
  • vitest run src/ui src/coven src/design: 305 passed.
  • typecheck is clean. biome reports one existing warning in chat-app.css (.coven-find input:focus-visible), on a line this PR does not change.

🤖 Generated with Claude Code

A new rendered test tabs through every stop in both schemes and compares
each one unfocused and focused: the pixels that change must include a
ring's worth whose colour moved by at least 3:1.

It found the composer showed no such change at all. Its focus border was a
45% accent mix and its glow 12%, both too faint to see. It now takes a
full-strength 2px ring (border plus a 1px spread) and keeps the soft glow
outside it. The familiar search, find bar and screen-viewer fields showed
focus only as a 1px border or a 15% halo; they take the same 2px ring.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 28, 2026 18:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Moderate findings remain around conditional-field coverage and screenshot baseline reliability.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Improves keyboard focus visibility for the composer, search, find-bar, and screen-viewer fields, with dark/light scheme E2E coverage.

Changes:

  • Strengthens focus rings across affected controls.
  • Adds screenshot-based keyboard focus checks.

Review findings:

  • Moderate (3 votes): The sweep does not open the conditional find bar or screen viewer, leaving their focus rules untested.
  • Moderate (1 vote): A single baseline screenshot can allow scrolling changes to produce false positives.
  • Moderate (1 vote): The find-bar focus state is not visually asserted.
  • Moderate (1 vote): The screen viewer uses an unavailable relay and is not rendered during the test.
File Description
src/​ui/​ui.css Strengthens the composer focus ring.
src/​coven/​screen-viewer.css Adds a visible screen-input focus ring.
src/​coven/​chat-app.css Adds focus rings for search and find controls.
e2e/​app.tauri-mock.spec.ts Adds dark/light scheme focus-visibility testing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread e2e/app.tauri-mock.spec.ts
Review noted both panels render only when open, so the sweep never reached
the fields whose focus rings this branch changes. They are now opened before
the baseline, and the sweep must reach "Find in conversation" and "Screen
address". Fields are named by their label. With the previous styles the
sweep fails on the search, find, screen address and password fields.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@BunsDev
BunsDev merged commit ee5392f into main Sep 28, 2026
10 checks passed
@BunsDev
BunsDev deleted the fix/focus-visibility branch September 28, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants