Repository navigation
Wait for the margin card to rest before clicking Open in panel after a thread walk - #7126
Merged
Merged
Conversation
…a thread walk After `t` steps from the thread on p10 to the one on p40, the card glides from its old seat to its new one for about a dozen frames after the scroll lands. Two tests clicked Open in panel as soon as the card named the second thread, so on a slow runner the click could land on the page beside the moving card and dismiss it. They now wait for the scroll and the card's motion to end (`CARD_AT_REST`) first. No product behavior changes. Closes #7124
This was referenced Nov 25, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 25, 2026
…fter Back (#7197) `test_a_rewrite_written_in_a_card_back_returned_to_reopens_there[browser]` double-clicked the first message in the card Back reopens as soon as the card named its thread. The card is still gliding into its seat at that moment, so in [run 45706289846](https://github.com/max-sixty/leaf/actions/runs/45706289846) the double-click landed on `p18` beside it ("subtree intercepts pointer events"), the card closed ("element is not visible" for the rest of the 120 s timeout), and the test failed. The test now waits for the scroll and the card's motion to settle (`scroll_settled` and `CARD_AT_REST`) before the double-click, as #7126 did for the Open in panel click earlier in the same test. This changes the test only; the glide is the card's designed motion, as #7124's diagnosis found. Verification: a probe evaluating `CARD_AT_REST` just before the double-click read `false` in all 6 runs (3 runs × Chromium and Firefox) on the old ordering and `true` with the wait added. The original timeout didn't reproduce locally, so the evidence is the ordering rather than a before-and-after failure. Both engines of this test and of `test_back_returns_to_the_card_a_later_open_in_panel_left` pass. Refs #7196 — automated triage Co-authored-by: leaf-agent <[email protected]>
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.
After the second
tpress moves the margin card from the thread onp10to the one onp40, the card glides from its old seat to its new one for about a dozen frames after the document's scroll has landed (box-motion's animations on.lf-margin-preview).test_back_returns_to_the_card_a_later_open_in_panel_leftandtest_a_rewrite_written_in_a_card_back_returned_to_reopens_thereclicked Open in panel as soon as the card'sdata-lf-threadnamed the second thread, which happens before the glide. On CI's runner in run 45539313453, Playwright's click hitp41beside the moving card, and the card closed. Both tests now wait for the scroll to settle and for the card to rest (CARD_AT_REST,tests/browser/margin/__init__.py, which the card-reply tests already use) before clicking. The product is unchanged: a card moving to its new passage is the designed glide, not motion left over from the step.Verification: a probe that sampled the card in the original ordering found it still animating when the click was issued, and found it at rest once the new waits ran. The failure itself didn't reproduce locally (12 of 12 passed under
leaf-dev suite flake --load 2 --cpu-throttle 6, and slowing animations through CDP made Playwright wait the motion out). Both tests pass in Chromium and Firefox, and in the wide and narrow windows, with the change.Closes #7124 — automated triage