Skip to content

fix(panel): the file Files changed's keys stand on is marked by its card's edge, not a focus ring - #4140

Merged
luke-agent[bot] merged 1 commit into
mainfrom
luke/file-header-focus
Oct 20, 2026
Merged

luke-agent[bot] merged 1 commit into
mainfrom
luke/file-header-focus

Conversation

@dastratakos

@dastratakos dastratakos commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The developer said: "I think the focus rings on file headers don't look good please fix."

The file card the keys stand on (J/K's current file, #3304) wore the keyboard's focus ring around its header (.diff-list-head[data-standing]). The ring was drawn inset, and the inset ran into the card's own 1px border and its rounded clip, so:

  • it looked thicker at the top and bottom than at the sides;
  • it looked clipped at the corners;
  • it stood beside the card's border as a second border.

The current file is now marked the way a selected card is marked across the app (border-color: var(--luke-color-border-selected), as in desktop.css, settings.css and tasks.css). The card's own 1px edge switches to the selected edge's ink. The card is Pierre's diffs-container, the element the header stands in. The edge goes around a folded header or around the whole open file. It marks which file the keys act on; it is not keyboard focus.

  • Keyboard focus is unchanged: it rings the control in the header that holds it (the fold, a path, Viewed) with the window's one ring from base.css. That ring is the same on every side, follows the control's radius, and stays inside the card.
  • How the edge is drawn: a document rule, .diff-list diffs-container:has(.diff-list-head[data-standing]), sets the edge. A document rule wins over the bundle's :host border, so the bundle doesn't change.
  • Deep-link landing (feat(panel): deep links to review threads in the Pull request tab #3884): the data-search-landed ring on a landed thread inside the card is untouched, and still reads as a brief 2px highlight on the thread.

Before / after

These come from the real built renderer (styles.css and diff-view.js from node scripts/build.mjs), on main and on this branch. The diff list is mounted with mountList and drawn with the real header markup from FileHead, in headless Chromium.

before after
Folded card stood on, light
Folded card stood on, dark
Open card stood on, light
Open card stood on, dark
Sticky header stuck, light
Sticky header stuck, dark
Keyboard focus on the fold, light
Keyboard focus on the fold, dark
Landing ring on a thread in the stood-on file (frozen mid-animation)

Evidence

  • tsc --noEmit for panel: clean.
  • vitest run packages/panel/src/styles packages/panel/src/tasks/agent-changes-tab.test.ts: 158 passed.
  • ./scripts/repository-checks.sh: passed.
  • ./scripts/oxlint.sh: 0 warnings, 0 errors.
  • pnpm knip: clean.
  • biome check: clean.
  • Bundle budget: node scripts/build.mjs passes.
  • New test styles/file-head-current.test.ts: it builds the list's markup (card, Pierre's header slot, the kept element, header) and reads what the laid sheets declare.
    • The stood-on card's edge is var(--luke-color-border-selected), another card declares no edge, and no header wears an outline.
    • It fails on main, where the header declares the ring.

Invariants

  • ./scripts/check.sh green: its pieces were run one by one, as listed above, and CI runs the whole of it.
  • JSON Schema goldens unchanged.
  • Every behavior change has, in this PR, the test that fails without it; no change-detector test added.
  • Gateway envelope goldens unchanged.
  • No new as type assertion.
  • No Effect.run*.
  • No new raw async primitives.
  • No discarded Effect.
  • Test count +1.
  • No hand-rolled file replaced.
  • No CLAUDE.md/AGENTS.md change needed.
  • PRIVACY.md unchanged.
  • Deps unchanged.
  • No barrel or door change.

Notes

  • Desktop and panel only, so no Preview run is needed.

Made with Luke

…ard's edge, not a focus ring

The current file (J/K's) wore the keyboard's focus ring around its header,
drawn inset, so it ran thicker top and bottom than at the sides, clipped at
the card's corners, and stood beside the card's own edge as a second border.
It is now marked as a selected card is across the app: the card's own 1px
edge in the selected edge's ink, around a folded header or the whole open
file. The keyboard's focus keeps ringing the control inside the header that
holds it, with the window's one ring.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
luke-web Ready Ready Preview Oct 20, 2026 6:11pm UTC

Request Review

@luke-agent
luke-agent Bot marked this pull request as ready for review October 20, 2026 18:08
@luke-agent
luke-agent Bot enabled auto-merge October 20, 2026 18:08

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit aa2d5ed Oct 20, 2026
12 checks passed
@luke-agent
luke-agent Bot deleted the luke/file-header-focus branch October 20, 2026 18:22

This branch was successfully deployed

1 active deployment
Preview — 61cfa71e Deployed Oct 20, 2026 by vercel[bot]
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.

1 participant