Skip to content

test_every_part_of_a_floating_box_moves_one_way_per_input[firefox]: at_rest never settles under Firefox 159's view-timeline end time #5880

Closed

Description

@leaf-agent

tests/journeys/test_floating_box_motion.py::test_every_part_of_a_floating_box_moves_one_way_per_input[firefox_browser] times out in at_rest under Playwright 1.65's Firefox 159. In the first case Hypothesis tries, composer='card', gap=10, draft='A first line.', edits=[('Shift+Enter',), ('Backspace', 1)], quick=False, the page.wait_for_function at test_floating_box_motion.py:68 waits out its 120 s limit. It failed on Linux and macOS in scheduled run 43007021682 (a52abb1bb), and passed in the Nov 10 run before it.

Cause: the move to Playwright 1.65 (#5803), not a Leaf change. The test fails on current main 07638492e and at #5803's merge (1f7cc6c03). It also fails at #5803's parent (e74d07dd5) when that commit's code runs under Playwright 1.65 (uv run --with 'playwright==1.65.*'). Reverting #5770, the other margin-card change in the range, doesn't help.

Mechanism. at_rest treats any animation under the card's box with a finite endTime as motion still to finish (line 73). #5846 (open) found that Firefox 159 gives the scroll-driven animation on a margin card's message heads a finite end time, so a predicate like that never settles while a card is open. #5846 fixes the render gate's finiteMotion (src/leaf/render-checks/runtime.js) to count only animations on a DocumentTimeline. This test keeps its own copy of the predicate, which #5846 doesn't change. This is the same diagnosis by mechanism; I haven't run the test on #5846's branch.

The same predicate elsewhere. These helpers on main read "settled" the same way, and any of them that waits on a margin card in Firefox can hang the same way:

Fixing only this test's copy would leave the other six to fail one at a time. The underlying fix is one shared reading of "a finite motion is still running" that these helpers use, built on #5846's DocumentTimeline rule, once #5846 settles that rule.

Reproduce (about 2 minutes, since it waits out the timeout):

uv run pytest "tests/journeys/test_floating_box_motion.py::test_every_part_of_a_floating_box_moves_one_way_per_input[firefox_browser]" -n0

Cause of a failure tracked in #4225.

Activity

  1. added
    tend-ci-cause
    on Nov 12, 2026
  2. leaf-agent commented on Nov 12, 2026

    @leaf-agent
    CollaboratorAuthor

    #5885 fixes this. It adds a shared restingIn probe to the render gate and replaces the per-helper copies of the motion check with it. The probe reads finiteMotion within the elements its selectors name, and finiteMotion now carries #5846's DocumentTimeline rule. The hunk is identical to #5846's, so the two PRs merge cleanly in either order.

    Five of the helpers listed in the issue now use the probe: test_floating_box_motion, test_composing, test_chrome_contracts, panel_paint, and three waits in test_render_margin.py that the list missed. thread_journey's region wait is gone, because the pageSettled wait just before it covers the same motion. render_harness.py and tests/browser/margin/__init__.py already filter on document.timeline on main. CARD_AT_REST also has to wait out paused motion, so it keeps its own reading.

    On main the Firefox case times out after 120 s in at_rest. On the branch, both parametrizations of that test pass, along with the other edited tests and pnpm run check:framework. The PR's CI and landing now go through tend-land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions