Skip to content

fix: measure reply card growth independently of shift attribution - #4585

Merged
leaf-agent merged 3 commits into
mainfrom
fix/issue-4402
Oct 28, 2026
Merged

leaf-agent merged 3 commits into
mainfrom
fix/issue-4402

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

The reply-placement test required Chrome to attribute a layout shift to the card itself. On current main, the card grows upward by 80px with its foot fixed, but the recorded source is its shadow-bearing ground, whose visual-overflow rectangle stays unchanged. That leaves the filtered growth list empty despite the card growing.

Measure the card's border box across animation frames instead. Require one upward step and a stationary bottom edge, preserving #1587's intent that a sent reply grows once around its field. This checks layout at frame boundaries rather than relying on layout-shift source selection; runtime behavior is unchanged.

The reported case fails before this change and passes afterward. All nine Chromium cases of test_send_grows_thread_around_the_words pass, and the reported case also passes at sixfold CPU throttling. The earlier successful main run 40136868334 contains a passing result for this case; run 40466044032 contains the empty-list failure.

The hook receipt-lock test also uses a controlled clock that advances only during lock waits. Page preparation could otherwise consume its two-second budget and correctly return a delivery pointer before the test reached the contention it meant to exercise. The original test reproduced the CI JSON-decoding failure with a 2.1-second planning delay; the corrected test passes with that delay and retains the partial inline delivery, pending sibling and expired-deadline assertions. Both focused hook deadline tests pass. Local hook checks used Playwright 1.64.0 to match the browser available on this runner; the branch-pinned browser was unavailable. Runtime behavior is unchanged.

Closes #4402 — automated triage

The layout-shift source can be the shadow-bearing ground rather than the card, and its visual overflow can stay fixed even as the card grows upward. Sample the border box across animation frames instead, requiring a single upward step and a stationary foot. This preserves the single-growth behavior from #1587 without tying it to Chrome attribution.

Closes #4402
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Fixed the CI lint failure in 365beb2: the frame comparison now uses itertools.pairwise(). Ruff 0.16.1 reproduced RUF007 before the change; lint and format checks now pass. The failed CI run's Python tests passed.

Recorded the push for the queued review and landing workflows. With await_ci: false, this repair session leaves CI verification and landing to those workflows.

Page planning can consume the real two-second budget before the test reaches its held receipt lock, yielding a valid pointer where it expects inline JSON. Reproduced with a 2.1-second planning delay. Advance a local clock only for lock waits and assert that the wait consumes the deadline, retaining the partial delivery and pending sibling assertions.
@leaf-agent
leaf-agent merged commit 48013ca into main Oct 28, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4402 branch October 28, 2026 12:02
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.

Reply placement test records no painted card growth

1 participant