Skip to content

test: hold the file editor's Retry read, not a save, in the conflict journey - #7416

Merged
leaf-agent merged 2 commits into
mainfrom
fix/issue-7407
Nov 27, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
fix/issue-7407

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_file_editor_saves_quietly_and_preserves_inflight_edits has failed since #7314, which made Retry after a save with no answer read the file before sending again, because that save may have reached the file. The journey's last section still held the POST it expected Retry to send. Retry now reads first, the read clears the failure, and the save that follows runs with no Retry button, so expect(retry).to_be_focused() found no element.

The section now holds Retry's read instead, moves the file on disk, and releases the read. The read finds the conflict, Retry disappears, and typing returns to the editor. That is the behavior the section protects ("When a focused Retry becomes a conflict, the disappearing button returns typing to the retained editor"), now reached through #7314's read-first path. The change touches only the test and moves no product behavior, so it keeps all of #7314's intent.

Verification: on main the test fails at line 343 with element(s) not found, the error in the issue. With this change it passes in two runs, run by node id on Linux.

Closes #7407 — automated triage

…journey

#7314 made Retry after a save with no answer read the file before it
sends again, since that save may have reached the file. The journey's
last section held the POST it expected Retry to send, but Retry now
reads first, the read clears the failure, and the save that follows
runs without a Retry button, so the focused-Retry assertion found none.

The section now holds Retry's read, moves the file on disk, and releases
the read: the read finds the conflict, Retry disappears and typing
returns to the editor, the behavior the section protects.

Closes #7407
@max-sixty

Copy link
Copy Markdown
Owner

@leaf-agent Please revise this journey to use its existing hold_reads route handler and held_reads list. Clear that list before the Retry step, then use the shared holding(page, held_reads, 1, "the retry read") wait before releasing the first route. The added second handler and window.heldFileReads counter duplicate those existing test controls, and an exact counter equality can miss two quickly collected reads. tests/AGENTS.md calls for holding() in route-capture tests.

This was written by Codex on behalf of max-sixty

The conflict section now reuses hold_reads and held_reads, and waits with
the shared holding() helper rather than a second handler and a
window.heldFileReads counter, which duplicated those controls and could
miss two quickly collected reads.
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Done in 6e36463. The Retry step now clears held_reads, routes hold_reads, and waits with holding(page, held_reads, 1, "the retry read") before releasing the first route. The second handler, the expect_request predicate and the window.heldFileReads counter are gone. The journey passed twice by node id on Linux (--run-nightly -n0).

@leaf-agent
leaf-agent merged commit 2882979 into main Nov 27, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7407 branch November 27, 2026 18:04
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_file_editor_saves_quietly_and_preserves_inflight_edits: a failed save shows no Retry since #7314

2 participants