Repository navigation
test(picker): wait for rendered rows before the escape-abort snapshot - #4527
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_switch_picker_abort_with_escapefailed on Windows in theaffectedrun on main (run 39373658313). Its list snapshot held only the prompt line>, with no header and no@ mainrow. 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 isboot_picker_pty: it waits for the>prompt, then for the screen to sit unchanged forSTABLE_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_pickertests 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.