Skip to content

Arrow keys in the part list only hover, Enter pins and selects - #154

Merged
Gherkin merged 3 commits into
mainfrom
arrow-keys-hover-only
Oct 28, 2026
Merged

Gherkin merged 3 commits into
mainfrom
arrow-keys-hover-only

Conversation

@Gherkin

@Gherkin Gherkin commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Follow-up to #153.

An arrow key in the part list selected and pinned the part it landed on. A list should only be navigated by the arrow keys. Enter is what selects.

Now an arrow key moves a focus row (the same outline the net list uses) and hovers the part on the board, like the mouse does. It does not pin, select, change the URL or rebuild the list. Enter pins and selects the focused part. With no focused row, Enter uses the selected row, then the first row, as before. Escape in the part search also clears the hover.

The first arrow press starts from the selected part, if there is one.

Tests: the two tests from #153 are replaced by two that check arrow keys only hover and Enter pins. Both fail on main. Full suite: 169 passed. The known flaky test "an inner layer checkbox changes both sides" timed out in the full run and passed alone.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK

An arrow key moved the selection and pinned the part it landed on. Now it
moves a focus row and hovers the part, like the mouse does. Enter pins and
selects the focused part. Escape in the part search clears the hover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK
@Gherkin

Gherkin commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

Review round 1

  1. web/app.js:1082 updateCompListSelection keeps the focused row. A breadcrumb click (selectFootprint at web/app.js:986, :1011, :1202, :1250) changes the selected part without rebuilding the list. After ArrowDown onto B and a breadcrumb click on X, the outline and board hover stay on B. The next Enter pins and selects B, not X, and the next arrow starts from B. A list click does not have this bug because the pin toggle rebuilds the list. Fix: drop the focus row and its hover when the selection changes.

FYI

  • web/app.js:2061 The new hoverClear() on Escape in the part search has no test. Not fixing: one call, and the global Escape path already clears the hover through deselect().
  • When the mouse leaves a list row, hoverClear runs and the board hover goes, but the keyboard outline stays on its row. Not fixing: minor, and a fix means deciding whether the mouse or the keys own the hover.

A breadcrumb selects a part without a rebuild of the list, so the focus
row and its hover stayed on the part the arrow keys reached. Enter then
picked that part, not the selected one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-28 14:40 UTC

The last used input owns the hover. A mouse hover or its end now drops
the arrow-key focus row in the part list, so no outline is left on a row
the board no longer shows. The arrow keys set the hover directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK
@Gherkin
Gherkin merged commit da8cf91 into main Oct 28, 2026
10 checks passed
@Gherkin
Gherkin deleted the arrow-keys-hover-only branch October 28, 2026 14:39
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