Repository navigation
test: wait for the card's stream growth to settle before judging Send - #6610
Merged
Merged
Conversation
test_sending_during_a_stream_keeps_later_tokens_from_moving_the_reply read its baseline before Send while the waiting answer's growth was still moving. On CI's Mac, mid-motion the turns overflowed the transcript, the bar that takes room rewrapped the answer a line taller, and the card stood 21 px higher (125 against 146) until the motion ended and the bar went. The assertion after Send then compared the settled card to that transient reading. The test now waits for the card at rest before its baseline. Leaf's behavior doesn't change; the test protects the same promise from a settled reading. Closes #6602
This was referenced Nov 20, 2026
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_sending_during_a_stream_keeps_later_tokens_from_moving_the_reply[pending]read its baseline before Send while the waiting answer's growth was still moving. Leaf didn't move the card at Send. The test now waits for the card at rest (CARD_AT_REST) before that reading, as it already does after Send. Leaf's behavior doesn't change, and the test protects the same promise from a settled reading.Cause. On CI's Mac, the answer's arrival motion sometimes overflows the transcript partway through. The scrollbar that the test makes take room then appears, the answer rewraps from three lines to four in the narrower transcript, and the card rises to 125 px. When the motion ends, the overflow and the bar go, and the card settles back at 146 px. The test read
before_sendinside that window, so the post-Send check compared a settled card at 146 with a transient 125: theassert 146.14 == 125.14in #6602. On Linux the answer overflows the transcript even at rest, so both readings agree there and the test passes.Evidence. I traced the card frame by frame on CI's Mac in diagnostic dispatches of the test alone (
--workers 1 --load 4) on main plus instrumentation:.lf-msgstyle mutation is in progress. Over the next frames the content shrinks (286 → 276 → 268 → 261) as the motion runs out, and the bar shows throughout with the answer at four lines. Once the content reaches 252, the bar drops, the answer returns to three lines and the card stands at 146. All of this happens before the Send click.With the change, dispatch 44776968020 on CI's Mac passed 54 of 54 copies at this head. At the 7-in-36 rate measured on main, about ten of them would have failed.
Left open. The motion's transient overflow also flashes the bar for real users on hosts whose scrollbars take room. When the answer sits at a wrap boundary, that lifts the card a line and drops it back. The reply row the user is typing in stays still (the test's
replyassertion held in every failing copy). #6611 tracks that, since it is about the transcript's overflow during an arrival rather than this test's read.Closes #6602 — automated triage