Skip to content

test(picker): wait for rendered rows before the escape-abort snapshot - #4527

Merged
max-sixty merged 1 commit into
mainfrom
fix/ci-39373658313
Oct 26, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/ci-39373658313

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

test_switch_picker_abort_with_escape failed on Windows in the affected run on main (run 39373658313). Its list snapshot held only the prompt line >, with no header and no @ main row. The commit that triggered the run (#4516, trash draining) doesn't touch the picker, so this is a test timing race.

Cause. This is the only capture-before-abort test that passes no inputs (&[]). So the only thing that gates its capture is boot_picker_pty: it waits for the > prompt, then for the screen to sit unchanged for STABLE_DURATION (500ms). Items load asynchronously. On a loaded Windows runner the prompt can stay quiet for 500ms before the first row arrives, and the test captures that frame.

Fix. Gate the capture on "has no file changes". That preview text appears only after the list has a selected row, so it confirms both panels before the capture. The sibling tests already gate the same way (&[("", Some("plain-branch"))], &[("", Some("@ main"))]). If the preview never renders, the test now panics after 30s and shows the screen, instead of producing a snapshot diff. The committed snapshots don't change.

Verification. All 32 switch_picker tests pass locally with --features shell-integration-tests. I couldn't reproduce the race on Linux, even under CPU load (0/15 runs on the original code), so the evidence is the code path above plus the failing frame from the run.

test_switch_picker_abort_with_escape passed no readiness condition, so
the capture fired once the prompt sat unchanged for 500ms. On a loaded
Windows runner the rows arrived after that window and the snapshot held
only the prompt line. Gate on the preview text, which renders only after
the list has a selected row, as the sibling capture-before-abort tests
already gate on a row.
@worktrunk-bot worktrunk-bot added the automated-fix Automated CI fix label Oct 20, 2026
@max-sixty
max-sixty merged commit 7427b2f into main Oct 26, 2026
37 of 47 checks passed
@max-sixty
max-sixty deleted the fix/ci-39373658313 branch October 26, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-fix Automated CI fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants