Skip to content

test: expect a margin card to keep its top on Send in the nightly margin journey - #5879

Merged
leaf-agent merged 1 commit into
mainfrom
fix/margin-card-send-journey
Nov 12, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/margin-card-send-journey

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The nightly journey test_margin_card_holds_its_top_while_read_and_its_reply_while_written still 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 updated tests/browser/margin/test_card_reply.py, but journeys run only in the scheduled ci run, 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

…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
leaf-agent merged commit a310613 into main Nov 12, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/margin-card-send-journey branch November 12, 2026 08:36
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant