Skip to content

test: type one key after the editor loads, so undo's grouping can't split it - #7030

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7022-undo
Nov 24, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-7022-undo

Conversation

@leaf-agent

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

Copy link
Copy Markdown
Collaborator

CodeMirror's history starts a new undo step when a run of keystrokes pauses longer than its group delay. test_words_typed_while_the_editor_loads_are_its_first_words typed kept after the editor loaded and expected a single undo to remove it. On the scheduled macOS run 45378690705, Firefox typed slowly enough to split the word, and the first undo left Typed ear and\nkely. The test now types one key there. One key is one transaction however slowly the runner types, so the test still checks what it protects: words typed before the editor loads are one undo step, separate from words typed after it arrives.

Before the change, a 700 ms pause between ke and pt reproduces the nightly's kely locally on both Chromium and Firefox. After it, both engines pass. A dispatch of the unchanged test alone on the macOS runner passed 18 of 18 copies, so the failing nightly is the before evidence on that runner.

Refs #7022 — automated triage. #7022's other failure, the readiness probe across a replacing document, is fixed separately in #7029.

…plit it

CodeMirror's history splits a run of keystrokes that pauses longer than
its group delay. On the scheduled macOS run 45378690705 Firefox typed
"kept " slowly enough that the first undo took back only "pt ", failing
test_words_typed_while_the_editor_loads_are_its_first_words[firefox_browser].
The behavior under test, that the pre-load words are one undo step apart
from words typed after the editor arrives, is unchanged; one key is one
transaction however slowly the runner types. A 700 ms pause inside the
old "kept " reproduces the nightly's "kely" locally on both engines.

Refs #7022
leaf-agent added a commit that referenced this pull request Nov 24, 2026
…ent mid-wait (#7029)

`wait_until_ready` waits on a page through
`wait_for_function(...).json_value()`. A page can replace its document
on the way to ready, as a revision whose executable identity differs
does, and if that happens between the old document's answer and the read
of its handle, the read raises `Execution context was destroyed` and the
whole wait fails. The scheduled macOS run
[45378690705](https://github.com/max-sixty/leaf/actions/runs/45378690705)
failed
`test_a_user_working_an_obligation_keeps_it_across_a_replacing_document`
this way, inside `told` → `wait_until_ready`. The wait now treats that
error as the document moving on and keeps waiting in the new document,
within the same no-progress bound. Any other Playwright error still
raises.

The fix sits in `wait_until_ready` rather than in the one test, because
every caller that writes a version behind a live page (`told`, the
render gate) waits across the same possible replacement.

`test_a_handover_that_replaces_the_document_waits_on_in_the_new_one`
uses a fake page whose first read fails with Playwright's error. It
fails without the change and passes with it. A dispatch of the failing
test alone on the macOS runner (`--workers 1 --load 4`, 18 copies, from
`main`) passed every copy, because the window is the gap between two
driver calls. So the failing nightly is the before evidence, and the
next scheduled run is the after.

Refs #7022 — automated triage. #7022's other failure, the Firefox undo
grouping, is fixed separately in #7030.

Co-authored-by: leaf-agent <[email protected]>
@leaf-agent
leaf-agent merged commit 5827f1c into main Nov 24, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7022-undo branch November 24, 2026 17:52
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