Skip to content

Read an item hint's key face from the step box inside its chip - #423

Merged
max-sixty merged 1 commit into
mainfrom
fix/ci-34168568905
Sep 8, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/ci-34168568905

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

tests/test_render_anchors.py::test_one_key_keeps_one_keyboard_face_across_the_page reads the geometry an item hint claims and compares it with the address chip and the chord's step keys. #421 moved that geometry: hintChip now spells a hint's whole route as a keySequence, so the chip is the layer's positioned wrapper and the key face belongs to the kbd inside it. The same commit generalized the wrapper's reset — min-width: 0; height: auto; padding: 0; border: 0 moved from .lf-goto-targets > .lf-chord-address to every .lf-targets > .lf-target-hint — so the test's read of the chip returned a box with no width floor, no padding, and no border, against the address chip's 19px/0 4px/1px solid.

The test's claim still holds; only its address for the face was stale. It now reads .lf-target-hint .lf-key-sequence > kbd:last-child, which is where the chord chips a dozen lines above are already read ({CHIPS} kbd:last-child), and it names the step still to be pressed so a hint that has already spent a letter compares the same face. Nothing in the runtime changes: the hints render correctly, and .lf-key-sequence > kbd inside the chrome scope gives them the shared key box.

This is #421's own change reaching a nightly module it did not touch. CI runs nightly cases only in the modules a pull request touches, so test_render_anchors.py first ran under --run-nightly after main moved, in run 34168568905.

Verified locally: the case fails at the merge base and passes with this change (uv run pytest tests/test_render_anchors.py::test_one_key_keeps_one_keyboard_face_across_the_page -q -n0), deterministically in under three seconds each way. pre-commit run --files tests/test_render_anchors.py is clean.

The failing assertion
E       AssertionError: assert {'min-width':...der-box', ...} == {'min-width':...der-box', ...}
E         Differing items:
E         {'min-width': '0px'} != {'min-width': '19px'}
E         {'border-top-width': '0px'} != {'border-top-width': '1px'}
E         {'border-top-style': 'none'} != {'border-top-style': 'solid'}
E         {'padding': '0px'} != {'padding': '0px 4px'}

@max-sixty
max-sixty merged commit 35bfc89 into main Sep 8, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/ci-34168568905 branch September 8, 2026 00:13
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