Skip to content

ci-fix: nightly ring walk hangs on pageSettled — a reaction chip below the fold never finishes its label reveal #396

Closed

Description

@leaf-agent

Failure

ci on main, nightly leg: tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus. It has been red on every completed main run since 06daeef3 — edd1c5a5, 1061340d, e0b25638 — and it still reproduces deterministically on today's tree, after #383 and #385. Last green run: 934bfc4c, the commit before #365.

FAILED tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus
  playwright._impl._errors.TimeoutError: Leaf wait probe pageSettled did not become true within 30000ms

Diagnosis

The walk hangs in page_at_rest at scope = "the response bar" on ship-review. moving() reports three animations that never land, all on one reaction chip's .lf-margin-button-label: the reveal's opacity, transform, and visibility transitions from chrome.css's .lf-margin-button:is(:hover, :focus-visible, .lf-focus-visible) rule. Each carries delay: 90, duration: 90, and each stays at progress: 0 — still inside its delay — while startTime moves forward and currentTime returns to 0 between samples a second apart.

Nothing about the chip changes while that happens. Sampled twelve times at 120ms: :hover false, :focus-visible true, class list, aria-expanded, --lf-label-x/-y, data-lf-label-side and the button's box all identical every time. So the reveal is not being retriggered by a flickering state — it is being restarted without ever advancing.

What is different about this chip is where it stands. Its box is y: 983 in a 900px-tall window: the chip holds focus (document.activeElement is the chip) and sits below the fold. Chromium throttles compositable animations on content outside the viewport, and opacity and transform are exactly the two properties here that composite. A reveal that can never finish leaves pageSettled false forever, and the gate has no deadline of its own past the probe's 30 seconds.

#365 is what put a chip in that position: it made a reaction a .lf-margin-button, which is what gave it a hover/focus label to reveal.

Why no fix was produced

Both repairs are a product decision rather than a mechanical one, and I could not pick between them from the code:

  • The layer stops revealing a label for a control that is out of view. The reveal is pure CSS keyed on :focus-visible, and CSS cannot ask whether a box is on screen, so this means the runtime adding and removing a class from an IntersectionObserver — new machinery on every margin button, for a label nobody can see.
  • The walk does not leave a focused control below the fold. A control that holds focus and is not on screen is arguably the finding rather than the animation it leaves running, and test_every_ring... is the test whose whole subject is whether the reader can see where the keyboard is. That reading would be against the walk, or against whatever moved the chip after the focus landed.

moving() is not the place to fix it either way: excusing an animation because its element is off screen would make the gate's "the page has stopped" claim conditional on where the window happens to be.

Reproduction
uv run pytest --run-nightly -q -n0 tests/test_render_controls.py \
  -k test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus

Roughly 3.5 minutes to the failure. render_cases_layout.py's page_at_rest is where to hang the instrumentation: catch the probe timeout and read document.getAnimations() and the animating element's closest('.lf-margin-button') before re-raising.

Activity

  1. leaf-agent commented on Sep 7, 2026

    @leaf-agent
    CollaboratorAuthor

    This is the red #394 and #373 are already cutting, and the diagnosis above is not the operative cause.

    I reproduced the failure on main at 5b503dd7 — deterministic, 3m33s to the pageSettled timeout, matching the report. I then rebased #394 onto that same commit and re-ran the same node id: green, 3m30s. #394 changes three runtime files (context.js, keyboard/dispatch.js, living-margin.js) and touches neither the reveal CSS nor anything that decides where a chip sits, so a fix that lands there rules out viewport-position throttling as the cause.

    The animation samples in the diagnosis actually point the same way. startTime advancing while currentTime returns to 0 is a transition being restarted, not one stalled inside its delay — Chromium's off-screen throttling stops an animation advancing, it does not reset its start time. #394's MutationObserver evidence supplies the mechanism: the .lf-margin-item.lf-docked holding that chip is moved between MAIN and its SECTION about 25 times a second, and re-parenting an element restarts its CSS transitions. Every property that sampling checked — :focus-visible, class list, --lf-label-x/-y, the box — is genuinely unchanged across that loop, which is why the twelve samples looked static.

    So neither of the two product decisions weighed above needs making. The chip sitting below the fold with focus is incidental; nothing needs an IntersectionObserver, and the walk does not need to avoid leaving focus off screen. Which branch lands is the open question — #394 guards the moveHost edge and #373 keeps the row docked so moveHost is never reached; the review on #394 reads them as composing rather than conflicting. Worth noting for that decision that #394 is verified green against today's main, one commit past its own base.

    I'd suggest closing this once one of them merges rather than carrying a third diagnosis of the same loop.

    Verification

    Both runs used the reproduction from the issue body, on this runner with the host Chrome:

    uv run pytest --run-nightly -q -n0 tests/test_render_controls.py \
      -k test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus
    tree result
    main @ 5b503dd7 1 failed in 213.37s — Leaf wait probe pageSettled did not become true within 30000ms
    #394 (91b0bfeb) rebased onto 5b503dd7 1 passed in 210.27s

    The rebase was clean — #394 branches from e6adf0b2, and the only commit between that and 5b503dd7 is #390.

    I did not independently re-run #373, so its own claim to this test is still on the prior review's word rather than mine.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions