Skip to content

test: count only shown target-picker chips after a typed letter narrows the map - #5922

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5915
Nov 13, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5915

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

#5845 changed how the target picker narrows: a typed letter now hides the chips it rules out (visibility: hidden in browser/runtime/keyboard/chip-seats.js) and leaves them in the DOM, so no chip the user is reading moves as they type. That PR updated test_go_to.py and the hint-seating runtime tests to read only shown chips, but not two picker tests in tests/browser/test_render_semantic_selection.py. Those tests still counted every .lf-target-picker-hint after the first key of a two-key code, so they saw 61 and 32 where 11 and 7 chips are shown. Every ci push run on main has failed on them since b3387f111.

Both tests now count chips matching :visible against the codes shown before the letter. What they protect is unchanged: a prefix narrows the map to the codes that begin with it, the continued chip marks its first key as pressed, and the full code still acts. The runtime is unchanged. This only aligns the tests with the behavior #5845 chose.

Locally, both tests fail on main with the counts above and pass with this change.

Closes #5915 — automated triage

…ws the map

#5845 made a typed letter hide the chips it rules out (visibility: hidden,
keyboard/chip-seats.js) instead of removing them, so no chip the user is
reading moves as they type. Two picker tests still counted every
`.lf-target-picker-hint` in the DOM after the first key of a two-key code,
so they read 61 and 32 where 11 and 7 chips are shown. They now count the
chips still visible, against the codes shown before the letter. The
behavior they protect, that a prefix narrows the map to the codes that
begin with it, is unchanged.

Closes #5915

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

#5897 makes the same edit to these two assertions: it switches both to .lf-target-picker-hint:visible, but counts against every chip's code (codes) where this PR counts against only the chips shown before the letter (held). Whichever lands second conflicts on both hunks. The version that lands should be this one, because it still holds if a chip is hidden before the letter for lack of a seat. #5897 can then drop its copy of these hunks when it rebases. This PR needs no change. Both tests pass locally on the merge ref.

@leaf-agent
leaf-agent merged commit 66b741b into main Nov 13, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5915 branch November 13, 2026 08:35
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.

Two Go-to picker tests count hints that stay in the DOM after narrowing, since #5845

1 participant