Repository navigation
Description
PR #154 was merged to main (da8cf91) with a change that no one reviewed. This issue records what happened and what the change does, so it can be reviewed after the fact. If the review rejects it, the change gets reverted or fixed in a new PR.
What happened
During the review round on #154, a reviewer note said: when the mouse leaves a part-list row after the arrow keys were used, the board hover goes but the keyboard outline stays on its row. The author set the rule: the last used input device owns the hover. Claude wrote the fix (6279c5d on the PR branch), pushed it, and merged the PR in the same run. That broke the merge rule: a fix that brings in a design decision gets another review round first. The rule came from the author. The way it is applied below was Claude's choice and was not reviewed.
The rest of #154 was reviewed. That covers the original change and the breadcrumb fix (9cba8ac), where a selection from outside the list drops the arrow-key focus row and its hover.
The change
web/app.js:671-695. A new dropCompFocus() removes the focused class from the part-list row. hoverFootprint, hoverNet and hoverClear all call it before they set or clear the hover.
web/app.js:1094. updateCompListSelection calls hoverClear() when a focus row exists, and hoverClear does the drop.
web/app.js:1927. In navigateList, the arrow key calls setHover([], [idx]) directly, not hoverFootprint(idx), so the keyboard does not drop its own focus row.
tests/browser/interaction.spec.js, test "a mouse hover after the arrow keys takes over the hover". It arrows to a row, then hovers another row. It checks that no focus row is left and that the hover is on the mouse row. Then it moves the mouse off and checks that the hover is empty. The test fails without the change.
Choices that need review
-
All mouse hovers count, not only part-list rows. The drop is in the shared hover functions. So a hover on a net-pane part row, a walk link, a net search row or a pad-table net also drops the part-list focus row. Reason: each of those is the mouse being used, and each one's mouseleave calls
hoverClear. If only part-list rows dropped the focus, leaving a net-pane row would clear the board hover and still leave the outline in the part list. That is the bug the change was meant to fix. -
Anything that calls
hoverClearends the keyboard walk. This includes clicks, Enter, Escape in the part search and selection changes. Reason: none of these leave a hover for the outline to stand for. Enter and a selection change already dropped the focus before this change. -
Mouse leave clears the hover. It does not go back to the keyboard row. Reason: the focus row is already gone by then, so there is nothing to go back to. With the rule as stated, the mouse was the last device used.
-
Who owns the hover depends on which function is called. The arrow keys call
setHover, and the mouse paths callhoverFootprintorhoverNet. Reason: it was the smallest change. The risk is that nothing else marks the difference, apart from a code comment. A later keyboard path that callshoverFootprintwould drop its own focus row. An explicit source, for examplehoverFootprint(idx, "keys"), would make the rule visible.
Checks run
Before the merge, the full browser suite passed (171 of 172) except the known flaky "an inner layer checkbox changes both sides", which passed alone. CI on the PR was green.
Activity
Gherkin commentedon Oct 28, 2026
Review of
6279c5d(inda8cf91). Round 1. No fixes made; follow-up is the author's call.Findings
web/app.js:678-681withweb/app.js:645-647. When the list scrolls, the browser firesmouseenteron the row that moves under the still pointer. That counts as mouse use, drops the focus row, and the next arrow press starts again from the selected row. Checked in Chromium with a throwaway probe (25 ArrowDown presses, pointer over the list): before6279c5dthe focus row went 1→25; after it, no focus row after any press, and the hover sat on the row under the pointer. With the pointer off the list, both versions walk 1→25.tests/browser/interaction.spec.js:1387-1405. That is why it missed 1. It also does not cover choice 1 (a hover outside the part list dropping the focus).The four choices in the issue
hoverFootprint/hoverNetaremouseenterhandlers (web/app.js:646,775,976,1001,1026,1177). All callers ofhoverClearare mouseleave, click, Enter, Escape or a selection change (642,770,972,994,1019,1094,1174,1959,2073).hoverFootprintmeans the mouse was used" is false when a scroll fires themouseenter. Fixing it needs a decision on how a real mouse move is told apart from a scroll-fired enter (for example: trackpointermove, or ignore enters while a key walk is active). That is a design decision, so I did not pick one.FYI
web/app.js:2200-2201: the global ArrowDown/ArrowUp handler does not callpreventDefault, so each press also scrolls the list natively (about 40 px). This was there before6279c5d. It makes finding 1 hit on every press, not only at the list edge. From reading the code, the search-box path (web/app.js:2074) does callpreventDefault. I expect it to hit finding 1 only whenscrollIntoViewscrolls at the edge. Not tested.