Skip to content

fix: show the contents spine's labels at once when Go-to arms, so they get Go-to hints - #7382

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7379
Nov 27, 2026
Merged

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

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Go-to gives no hints to the contents spine's links, and test_generated_hints_include_links_revealed_by_a_page_widget has failed on every main run since #7332. This change makes the spine show its labels at once while Go-to is armed, rather than fading them in, so they are visible when Go-to reads its map and get their chips again.

Cause. #7332 meant every visible control to get a hint and a transparent one none, so it judges a control with checkVisibility({opacityProperty: true}). Go-to reads that map once the frame arming paints has been drawn (two frames). The spine's labels rest at opacity: 0 and fade to 1 over 0.24s when body[data-lf-go-to-active] is set. I sampled the label layer every frame after g: its computed opacity was still exactly 0 at 27 ms and 43 ms, when the map is read, and only started rising (0.11) in the frame after. So every label was judged unseen. Nothing reads the map again once the fade ends, so the chips never appeared, even after the test's 120 s wait.

Change. In packages/default/styles/toc.css, the Go-to reveal sets transition: none. Hover and keyboard focus still fade the labels in, and when Go-to ends they still fade out, since that transition comes from the resting rule. On screen, the only difference is that pressing g shows the labels at once instead of fading them in over 0.24 s. Every state still looks as it did before.

Verification. Run alone (uv run pytest -n0 <node-id>), the test fails on main with 0 of 4 chips and passes with this change. The spine's disclosure tests and the test for the contents row's marks still pass.

Alternative not taken. Go-to could instead treat a control whose opacity is transitioning upward as visible, as it already waits for panel motions held in their delay (heldUnseen, dom/motion.js). That would cover any package's reveal. But no other package's styles reveal anything under data-lf-go-to-active, and it would add a second motion rule to the core's map timing. So the fix stays in the package that owns the fade.

Closes #7379 — automated triage

Go-to reads which controls show once the frame arming paints is drawn, and
since #7332 a transparent control gets no chip. The spine's labels faded in
over 0.24s from opacity 0, and that fade still stood at exactly 0 when the
map was read, so the spine's links got no Go-to hints. Armed, the labels now
show without a transition; hover still fades them in, and they still fade
out as Go-to ends.

Behavior changed: pressing g snaps the contents labels in rather than
fading them. test_generated_hints_include_links_revealed_by_a_page_widget
fails before this change and passes after it.

Closes #7379
@leaf-agent
leaf-agent merged commit bdd164e into main Nov 27, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7379 branch November 27, 2026 10:44
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.

test_generated_hints_include_links_revealed_by_a_page_widget: Go-to gives the contents spine's fading-in links no chips since #7332

1 participant