Skip to content

fix: show the preview at once when the user aims again where the pointer already rested - #6666

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-6663
Nov 21, 2026
Merged

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

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

A press on a dial depth puts Leaf's preview away, and the click that follows aims at the depth again (previewChanged with aim). changed handed that aim to the pointer's point(), which shows at once only while warm, within WARM (400 ms) of the last preview hiding, and otherwise starts the 200 ms dwell. So a press held longer than 400 ms let the dial's away (scheduled for the frame after the press is over) close the sheets, and the dwell reopened them 200 ms later. Users see this as a flicker, and it causes both failures in #6663: Firefox on the loaded macOS runner outlasts WARM between mouse.down and the click, so the test read the frame while the panel was closed (None) or before it had glided back (wrong column).

The preview now records the target the pointer's wait is over for (rested: its dwell ran, or it showed at once while warm), and an aim inside that target shows at once. A pointer that has only just come still waits its dwell, so a chart's first point under a newly arrived pointer is unchanged.

Behavior change outside the dial: after Escape, the next chart point a resting pointer reaches now reads at once instead of after the dwell. test_a_chart_says_the_value_under_the_pointer_and_the_keyboard already says it "reads at once"; that test was passing only because expect waited out the dwell.

Verification. test_pointing_at_a_depth_hangs_each_depth_s_page_under_its_button now holds the press past WARM on the page clock (dwelt(page, "WARM")), records any close of the panel after release, and runs past the dwell before checking. Locally, on Linux, both engines fail on the old preview.js (the panel recorded a close) and pass with the fix. Before that, a plain 500 ms hold reproduced CI's None and wrong-column failures every time. The dial, chart and preview tests that exercise the pointer, Escape and aim paths (61 selected) pass, and so do pnpm run test:runtime and check:framework. On the macOS runner, the Firefox case passed 54 of 54 copies at this head under --workers 3 --load 2 (44925629554). The same dispatch at the base failed 4 of 18 (44922543784).

Closes #6663 — automated triage

A press on a dial depth puts Leaf's preview away, and its click aims at
the depth again (`previewChanged` with `aim`). The preview took that aim
through the pointer's dwell whenever the press had lasted longer than
WARM (400 ms) since the preview hid, so the dial's sheets, which go a
frame after the press is over, closed and came back 200 ms later. That
is the flicker `test_pointing_at_a_depth_hangs_each_depth_s_page_under_its_button`
caught intermittently on Firefox on the slow macOS runner, where the
test's own steps outlast WARM.

The preview now records the target the pointer's wait is over for
(`rested`), and an aim inside it shows at once. A pointer that has only
just come still waits its dwell, so a chart's first point keeps its
dwell; after Escape the next point a resting pointer reaches reads at
once, as the chart test's docstring already says.

The dial test now holds its press past WARM on the page clock and
records any close of the panel after release; it fails on the old code
in both engines and passes with the fix.

Closes #6663
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant