Skip to content

test: cross onto the modal preview in one move - #6503

Merged
max-sixty merged 1 commit into
mainfrom
test/modal-preview-one-move
Nov 19, 2026
Merged

max-sixty merged 1 commit into
mainfrom
test/modal-preview-one-move

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

test_a_preview_covers_no_neighbour_and_takes_the_pointer_in_a_modal[firefox_browser] fails on CI's Mac under load with "the dialog left the preview inert", though the preview stands in the dialog and takes the pointer. The test's own pointer path was the cause, so this changes only the test.

Cause. The test moved the pointer from the dialog's control onto its preview in four steps. The second step lands on the dialog between the two, where the pointer has left its target for nothing. The preview then goes a dwell (200 ms) later unless the pointer reaches it first (point in preview.js). The test's page clock (clocked) is installed but keeps real time until dwelt runs it forward. On a starved runner, Firefox took the next step more than a dwell later, put the preview away as its contract says, and the test found the dialog under the point it checked.

  • Reproduced locally: holding the pointer at that step for 300 ms fails the test every time with the same message, and the same path without the hold passes.
  • Not a product defect: a user's own crossing reaches the page as input queued ahead of that timer.
  • The box read was sound: the point the failing runs checked, (619.87, 826.1), is exactly the preview's middle locally, so the test was not reading the preview before it was placed.

Fix. The test moves straight onto the preview, as test_a_control_previews_its_word_and_every_key_that_presses_it does.

Evidence (CI's Mac, Firefox, four copies at once):

Commit Copies Failed Run
main, da54f91036 16 6 44479173970
this change 32 0 44479898496

At main's rate, 32 copies would have failed about 12.

Found while working through the macOS-only failures in #6392.

This was written by Claude Code on behalf of max-sixty

`test_a_preview_covers_no_neighbour_and_takes_the_pointer_in_a_modal`
moved the pointer from the dialog's control onto its preview in four
steps. The second step lands on the dialog between the two, where the
pointer has left its target for nothing, so the preview goes a dwell
(200 ms) later unless the pointer reaches it first (preview.js,
`point`). The test's page clock (`clocked`) is installed but keeps real
time until `dwelt` runs it, so on a starved runner Firefox took the next
step more than a dwell later, put the preview away as its contract
says, and the test read the dialog under the point it then checked:
"the dialog left the preview inert". Locally, holding the pointer at
that step for 300 ms fails the test every time, and without the hold it
passes. A user's own crossing reaches the page as input queued ahead of
that timer, so this is a test fix. The test now moves straight onto the
preview, as `test_a_control_previews_its_word_and_every_key_that_presses_it`
does.

> _This was written by Claude Code on behalf of max-sixty_
@max-sixty
max-sixty marked this pull request as ready for review November 19, 2026 09:58
@max-sixty
max-sixty merged commit 166b620 into main Nov 19, 2026
5 checks passed
@max-sixty
max-sixty deleted the test/modal-preview-one-move branch November 19, 2026 09:58
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.

1 participant