Repository navigation
test: expect a margin card to keep its top on Send in the nightly margin journey - #5879
Merged
Merged
Conversation
…gin journey #5770 made a send from a margin card beside its words keep the card's top and move the reply box down, since the send empties the box and an empty box holds no line being typed. It updated tests/browser/margin/test_card_reply.py, but the nightly journey test_margin_card_holds_its_top_while_read_and_its_reply_while_written still expected the reply box to hold under the pressed Send and the answer to grow the card up. It has failed in the scheduled ci run since #5770 merged (reply box 80px lower than the old expectation). The journey now checks #5770's behavior: after Send the card's top and its earlier turn stand where they stood and the reply box moves down, and the agent's answer then grows the card down past the box with the top held. The typing half of the journey, where the card holds its reply's foot, is unchanged. Refs #4225
leaf-agent
added a commit
that referenced
this pull request
Nov 12, 2026
…nores scroll-driven animations (#5885) Firefox 159 gives a scroll-driven (view-timeline) animation, such as a margin card's message heads, a finite end time. Several test and dev helpers each kept their own copy of "a finite animation is still running", which read that animation as motion, so they waited out their 120 s limit whenever a margin card was open in Firefox. `test_every_part_of_a_floating_box_moves_one_way_per_input[firefox_browser]` failed this way in the nightly run (#5880). This replaces those copies with one reading in the render gate: - `finiteMotion` (`src/leaf/render-checks/runtime.js`) counts only animations on a `DocumentTimeline`. The hunk is identical to the one in #5846, so whichever PR lands second merges cleanly over it. - A new probe, `restingIn(...selectors)`, applies `finiteMotion` within the elements those selectors name, shadow trees included. A selector that matches nothing counts as at rest. - `at_rest` in `test_floating_box_motion`, the three card waits in `test_render_margin`, and the helpers in `test_composing`, `test_chrome_contracts` and `dev/leaf_dev/panel_paint.py` now wait with `wait_for_probe(page, "restingIn", …)`. - `thread_journey.observe` drops its region wait. The `pageSettled` wait just before it already covers the same motion across the whole page. `render_harness`'s panel wait and `margin.CARD_AT_REST` already filter on `document.timeline`, so they keep their own readings. `CARD_AT_REST` also has to wait out motion that is held paused, and `restingIn` doesn't count paused motion. **Verification.** On main the Firefox case times out after 120 s in `at_rest` with the falsifying example from the issue. With this change, both parametrizations of `test_floating_box_motion.py` pass. These also pass: the edited `test_chrome_contracts`/`test_composing` tests, `test_render_thread_snapshots.py`, the `test_render_floating_panel` tests that use `panel_paint.settled`, `test_render_gate.py`, `pnpm run check:framework` and ruff. `test_render_gate.py::test_every_idiom_in_the_catalog_stands_in_a_corpus_source` failed in the selection the same way on unmodified main in Chromium, so this change doesn't cause it. `test_margin_card_holds_its_top_while_read_and_its_reply_while_written` failed at the branch's original base because of its own outdated Send expectation. #5879 fixed that on main, and with main merged in it passes here, together with `test_floating_box_motion.py`. Closes #5880 — 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.
The nightly journey
test_margin_card_holds_its_top_while_read_and_its_reply_while_writtenstill expected the behavior that #5770 deliberately replaced. #5770 made a send from a margin card beside its words keep the card's top and move the reply box down: the send empties the box, and an empty box holds no line being typed. That PR updatedtests/browser/margin/test_card_reply.py, but journeys run only in the scheduledcirun, so this one first failed in scheduled run 43007021682, the first that included #5770. In that run the reply box stood 80px below where the old assertion expected it (406.33 == 326.33 ± 0.5).The journey now checks #5770's behavior. After Send, the card's top and its earlier turn stay where they were and the reply box moves down. The agent's answer then grows the card down past the box while its top holds. The typing half of the journey is unchanged: there the card holds its reply's foot and grows up. No product code changes.
On main
07638492e, the test fails as it did in CI and passes with this change, in four consecutive local Chromium runs.Refs #4225 — automated triage