Repository navigation
Reveal a posted thread whose card the reload drew first (review_rounds flake) - #6
Merged
Merged
Conversation
Posting a comment sets the pane's pending thread and reveals its card once a change to the rows draws it. The review's reload and the post's answer race: on a loaded machine the reload can draw the card first, so posted() refreshed rows that no longer changed and nothing revealed or cleared the pending thread. It stayed pending until a later listing drew its card again and scrolled the stream to it, e.g. round 2's interdiff in review_rounds, which then opened on http.ts instead of cache.ts (the Windows CI flake at review_rounds.jsonl:85). posted() now reveals the card at once when it is already drawn. Under load on windows-2025 (review_rounds four at a time, 24 runs): main fails 9 to 15 of 24 at that assertion; with this 24 of 24 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes the Windows CI flake at
tests/e2e/review_rounds.jsonl:85(/stream/top_filereadsrc/lib/http.ts, notsrc/lib/cache.ts). It's a real app bug, not a scenario timing problem.Cause
Posting a comment sets the diff pane's
pending_thread, and the next change to the rows that draws the card reveals it. Two things race after the write lands: the review's reload, and the post's answer reaching the pane. On a loaded machine the reload can draw the card first.posted()then refreshes rows that no longer change, so nothing reveals or clears the pending thread. It stays pending until some later listing draws that card again, and then the stream scrolls to it.In
review_rounds, that was the last round-1 comment (onusers.ts). When round 2's interdiff was listed, the stream scrolled just far enough to bring that card into view, which puthttp.tsat the top. For a reviewer, the same bug means the stream can later jump back to a comment they posted earlier.Fix
posted()reveals the card at once when it's already drawn (crates/dv_ui/src/diff_pane/threads.rs).Evidence
a_post_answered_after_its_card_is_drawn_leaves_nothing_to_reveal_later, replays the late answer. It fails on main (the stream jumps fromc.txtback tob.txton the next rows change) and passes with the fix.windows-2025,review_roundsrun four at a time, 24 runs per variant: main failed 15/24 and then 9/24 at line 85; with the fix, 24/24 passed.http.tsfirst, was tested and ruled out: reordering the writes still failed 13/24.script/checkpasses on macOS (every step, 34 e2e scenarios).🤖 Generated with Claude Code