Files
pad/web/e2e/lib
xarmian 225205052b test(e2e): the lightbox scale settles when its transform transition ends, not when two reads happen to agree (BUG-3213) (#1536)
* test(e2e): the lightbox scale settles when its transform transition ends, not when two reads happen to agree (BUG-3213)

settleScale accepted two equal reads of the rendered matrix as "settled".
Under an 8-worker load the renderer can produce no frame between two polls,
so a mid-transition scale read as final: the touch spec's pre-zoom stopped at
1.19-2.20 when it needed more than 2.3, on 11/120 runs on main and on c0819dd4^
alike.

"Settled" now means no live transform CSSTransition on the viewer image,
checked after flushing style. Two animation frames are awaited first: Chromium
delivers touch moves aligned to frames, and without the flush the pinch oracle
read one move step early (exactly 6.25px = 50px/8 in X, 17/120). The old
fixpoint's polling delay had been hiding that.

The zoom spec's private copy of the same fixpoint now uses the shared helper.

Claude-Session: https://claude.ai/code/session_01UcaMsmoCt8u7VpJhCNxiJJ

* test(e2e): settleScale awaits each transform transition's finished in the page instead of polling (BUG-3213)

expect.poll's 100/250/500ms backoff, paid once per zoom step, stretched
the zoom spec's 20-step zoomToMax toward its 30s budget under load. A
cancelled (retargeted) transition rejects finished, so the wait loops
until no transform transition is live.

Claude-Session: https://claude.ai/code/session_01UcaMsmoCt8u7VpJhCNxiJJ

* test(e2e): zoomToMax presses in bursts and settles once per burst, so an honest settle does not stretch its callers toward the timeout (BUG-3213)

Each '+' computes from the viewer's zoom state, so a burst of four lands
exactly four steps; settleScale waits for the transition to end, so a
burst that does not climb is the clamp. Measured x40 at 8 workers
(p50/max): controls-at-max 14.1/15.6 on main -> 9.7/12.9, pan-clamp
17.2/19.6 -> 14.2/18.7, resize-clamp 15.2/19.5 -> 11.6/17.2.

Claude-Session: https://claude.ai/code/session_01UcaMsmoCt8u7VpJhCNxiJJ
2026-09-25 05:13:44 -04:00
..