Repository navigation
test(SnapPaging): edge-move touches land on the scene's clock - #11068
Conversation
During an edge button's move, the touch cases sent their tap after the thaw. A loaded runner's round trips could deliver it after the move ended, so the row rested on the move's target and the case failed raw. The touch-down is now held to 100 ms into the move on the scene's clock. One that reaches the page later fails as LiftPlacementError. The press-in-settle freeze logs the row on every frame it checks. A row that crossed its freeze window between two frames more than the starvation gap apart fails as FrameStarvationError. The swipe case judges the release the page reads against the advance speed, as the file's swipe helper does.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is a draft from a fork. Next step: a maintainer adds the ci:run label and the pull request is marked ready for review, which starts CI.
The change is test-only. The edge-move touch cases now land at a fixed point of the move on the scene's clock, and a late touch or starved frames now fail as the harness's named errors (LiftPlacementError, FrameStarvationError, touch pacing errors) instead of as raw assertions.
- Non-blocking:
logShownkeeps sampling layout on every frame, for up to 2,000 frames, after the freeze it serves has landed. Stopping it once the freeze lands would keep that work out of the frames this change protects.
[Automated review]
| el.getBoundingClientRect().left - | ||
| items[0].getBoundingClientRect().left, | ||
| }); | ||
| if (log.length < 2000) { |
There was a problem hiding this comment.
Non-blocking: this loop re-arms on every frame until it holds 2,000 entries, but only freezeWhenHeldIn's catch path reads the log. After freezePageWhen resolves, the loop keeps doing two getBoundingClientRect reads per frame through the edge press, the thaw, the move and the touch: main-thread work in the frames this change protects on a starved runner. You could stop it once the freeze lands, for example with if (log.length < 2000 && !freeze?.frozen) (the install exposes frozen), or with a flag set after freezePageWhen resolves.
Maintainer impact
On a starved runner, three SnapPaging interaction cases failed with raw assertions or a plain freeze timeout. Two are touch cases during an edge button's move, with a 150 ms and a 40 ms hold. The third checks that the scroll offset holds through a swipe. A raw failure reads as a product red, though such a run proves nothing about the product.
Intended invariant
On a runner with CI's CPU limits, the cases prove what they proved. A run whose input or frames the runner held back fails by name, as the harness's
LiftPlacementError,FrameStarvationErrorand touch pacing contracts state.Change
holdInputUntil). One that reaches the page later fails asLiftPlacementError.FrameStarvationError, throughrequireFrames. Any other timeout fails as before.Evidence
Scope
Components: SnapPaging
Testing
TouchPageStallError.LiftPlacementErrorand 6FrameStarvationError.LiftPlacementErrorand 3FrameStarvationError.tscreports 0 errors. No comment sentence on the changed lines runs over 25 words.