Repository navigation
test(motion, SideNav): the rail proofs judge the frames a loaded page draws, not a frame rate - #9518
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| SideNav | 63.4 kB (0) · 10.9 kB CSS (0) | — | ✓ · ✓ · ✓ |
| SideNavCollapseButton | 43.4 kB (0) · 9.8 kB CSS (0) | — | ✓ · ✓ · ✓ |
| SideNavHeading | 55.9 kB (0) · 10.6 kB CSS (0) | — | ✓ · ✓ · ✓ |
2 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| SideNavItem | 51.8 kB (0) · 10.4 kB CSS (0) | — | ✓ · ✓ · ✓ |
| SideNavSection | 6.6 kB (0) · 3.7 kB CSS (0) | — | ✓ · ✓ · ✓ |
Package size: no published package changed; no new dependencies.
API changes: none in this pull request
Committed API report behind this build: core 1 row; run pnpm api:report.
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
This looks ready to approve. The four proofs now read the motion on its own clock or count the frames actually drawn, and both specs pass at this head in Chromium, with the reversal starting 0.0 px from where the collapse stopped. One optional follow-up: in the two-state case, expect(moving.length).toBeGreaterThan(5) is now met by the six held collapse reads alone, so an explicit guard (six collapsing reads and one expand start) would state what the case checks.
[Automated review]
| // The collapse read on its own clock once it rides, held from the task | ||
| // that starts it: frames that come late can neither run it out before | ||
| // these reads nor move it between them. | ||
| for (const ms of [20, 40, 60, 80, 100, 120]) { |
There was a problem hiding this comment.
Non-blocking: these six held reads all fall inside the moving window (shown 253.9 to 165.8 px here), so expect(moving.length).toBeGreaterThan(5) further down is now met before any expanding frame is read. With a 2 s block after the expand start, the case passes with no expanding frame judged. If that is intended, an explicit guard (six collapsing reads and one expand start) would say so.
There was a problem hiding this comment.
Fixed in 2e490ae: the case now holds the expand on its own clock too, with explicit guards (6 collapsing reads, 1 expand start, 6 expand held), and still judges every drawn expanding frame.
2f38442 to
e6eba7e
Compare
There was a problem hiding this comment.
This looks ready to approve. The four proofs now read each motion on its own clock, both specs pass in Chromium, and the held rail check still catches a rail copy running 50 ms ahead of the content (47.9 px). One optional follow-up: in the two-state case, expect(moving.length).toBeGreaterThan(5) is met by the six held collapse reads alone, so an explicit guard (six collapsing reads and one expand start) would state what the case checks.
[Automated review]
… draws, not a frame rate On a loaded runner four edge-motion proofs failed with nothing wrong in the motion: - The two-state edge case (spec:AST-105 FR9) read its collapse on two real frames and the expand's start on the first frame after it. A late frame could end the collapse before the reads (no copy seen), leave too few frames in motion, or land one frame into the expand (46.8 and 53.0 px against 30). The collapse and the expand are now each read held, on their own clock, at 20 to 120 ms once they ride, and the expand's start in the task that makes it, before any frame. The two agree to 0.0 px, so the bound is the reveal case's 1.5 px. - The resized-pane case read its collapse on two real frames before holding it at 120 ms. A late frame could end the collapse first, so the hold found nothing to hold (48 px where more than 50 is needed). It is now read held the same way. - The rail tap (component:SideNav FR6) required more than 20 sampled frames over the whole tap: a 60 Hz count, mostly of frames before the motion. The sampler now judges the glide on its own clock: in the press's own task, once the change rides, it holds the page's running animations, seeks them to every 50 ms of the content's glide by their own starts, reads the rail's edge against the content's at each, and puts each back on its own start. Every 50 ms of the glide is judged whatever frames a loaded runner draws, and every frame drawn is still judged. - Read at rest, the rail counted the toggle's own press feedback, which the motion's end already leaves out; its late release read as one animation still running.
e6eba7e to
2e490ae
Compare
There was a problem hiding this comment.
This looks ready to approve. The two-state and resized-pane cases and the rail tap now read each motion on its own clock, both specs pass in Chromium (and the animated-layout spec in WebKit), and the tighter checks still catch a reversal dated one frame early (10.2 px) and a rail copy running 50 ms ahead (47.9 px), even with the main thread held 700 ms.
[Automated review]
Maintainer impact
Four edge-motion proofs fail on a loaded runner with nothing wrong in the motion, because each read depends on frame timing:
moving > 5, or the collapse ends unread.running: 1).Intended invariant
spec:AST-105FR9 (the two-state form: one held copy, the edge on its column, a reversal from where the collapse got to), andcomponent:SideNavFR6 withcomponent:AppShellFR17 (the rail's edge on the content's, no width animation, the copy gone at rest). The claims stay; only how a run reads them changes.Change
Evidence
Scope
Testing
For WebKit, use the CI WebKit job's container command (
internal/interaction-harness/scripts/webkit-container.mjs) with--cpus=4,CI=1,LP_NUM_THREADS=4and 1 worker.Local gates at
2e490ae6a6(this head), one commit on main653624f84b, under the repository's.nvmrcnode (24.22.1):pnpm check:repo,pnpm check:knowledgeandpnpm check:changesets. The unit tests that read these spec files pass (6 files, 159 tests).1d04d40fd3, fix(core): a layout change made late in a long task plays its motion instead of skipping past it #9274 (b158fee2a8) and fix(core): a layout motion's copy carries on the CSS animations and transitions running in it #9534 (c23f803a1d).Seams at this head, main's cases against this change's:
moving > 5(5)frames > 20running: 1Mutants at this head:
heldPositions >= 10check passes 3 of 3; this one fails 3 of 3 (10 positions against 15).Why the frames run short: an idle run shows no long task in the rail's glide (10 of 10, 43 to 45 frames in the 735 ms glide), while pinned with 8 workers one 255 to 459 ms task starts 8 to 41 ms after the glide does. That is contention, not the motion's own cost.
Not this change: pinned at 8 workers, the rail spec's "under Reduce Motion a tap only cross-fades… with a slow CPU" also fails on main's copy (13 of 32, no fade seen), which #9274 addresses. This change runs no code in that case before its assertions. The comment-provenance baseline check fails on main itself at
653624f84b; this change touches only test files, which that rule excludes.