Repository navigation
test(interaction-harness): the frozen arm shows only pre-block steps - #10189
Conversation
The self-test's main-thread arm failed on a loaded WebKit runner: moved on 2 of the control's frames, where its check allowed 0 or 1. That bound assumed one frame at the block's start could still show the last step. Traced on a starved runner, the compositor presented the page's last steps from before the block well inside it: up to three of them, as late as 230 ms in. The arm now logs each step with its time. The check traces every new position shown in the judged part to a step the page set in the 800 ms before the block, within one cast step. A step from inside the block fails it. The verdict still fails the arm, with its stall longer than the control's. How many frames it counts as moved is no longer pinned: that depends on how many late steps a runner shows.
|
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.
Tracing each new position in the judged part to a step set in the 800 ms before the block tests what the frozen arm is for, without depending on how many late frames a loaded runner presents.
Next step: mark the pull request ready for review and have a maintainer add the ci:run label so CI runs, since the branch is in a fork.
[Automated review]
…e Motion cross-fade and the touch hit area through Core's internal touch entry (#9669) * chore(core): Lab's PageControl reaches the shared animator, the Reduce Motion cross-fade and the touch hit area through Core's internal touch entry Internal entries land with their first user. Lab's PageControl animates its strip and dots with each element's one shared animator, where the strip's slide and a dot's size and fade compose. It reads the Reduce Motion cross-fade's timing, and it grows toward a 44 px target under a finger with the touch hit area that Core's own controls use. So `@astryxdesign/core/internal/touch` also re-exports, by name: - `animatorFor`, an element's shared animator, as Core's components reach it (no public API has the name); - `reducedMotionFade`; - `useTouchHitArea` and `touchHitAreaStyles`, the touch hit area's hook and its layer. Named re-exports only, of code already on main: no behavior change, no docs, no root re-export, no new entry, and the `@astryx/no-core-internal-import` lint rule already limits the entry to Core and Lab. The entry's test checks it re-exports the same values Core imports by path, and the touch bundle test lists the four names among those the public entry does not export. * Merge branch 'main' into c23/l1-pagecontrol-core * Merge branch 'main' into c23/l1-pagecontrol-core # Conflicts: # packages/core/src/internal/touch.test.ts # packages/core/src/internal/touch.ts # scripts/touch-support-bundle.test.mjs * Merge main into the PageControl lab entry branch (#10189 landed) * Merge main into the PageControl core re-exports branch * Merge main into the PageControl touch entry branch * Merge main into the PageControl touch entry branch Co-authored-by: Cindy Zhang <[email protected]>
…e, a finger scrubs, every pointer pages (#9684) * chore(core): Lab's PageControl reaches the shared animator, the Reduce Motion cross-fade and the touch hit area through Core's internal touch entry Internal entries land with their first user. Lab's PageControl animates its strip and dots with each element's one shared animator, where the strip's slide and a dot's size and fade compose. It reads the Reduce Motion cross-fade's timing, and it grows toward a 44 px target under a finger with the touch hit area that Core's own controls use. So `@astryxdesign/core/internal/touch` also re-exports, by name: - `animatorFor`, an element's shared animator, as Core's components reach it (no public API has the name); - `reducedMotionFade`; - `useTouchHitArea` and `touchHitAreaStyles`, the touch hit area's hook and its layer. Named re-exports only, of code already on main: no behavior change, no docs, no root re-export, no new entry, and the `@astryx/no-core-internal-import` lint rule already limits the entry to Core and Lab. The entry's test checks it re-exports the same values Core imports by path, and the touch bundle test lists the four names among those the public entry does not export. * feat(lab): PageControl, UIPageControl's indicators: a tap steps a page, a finger scrubs, every pointer pages PageControl is a row of page indicators, the current one highlighted, that pages like UIPageControl on iOS 26 (measured on the iOS 26.2 simulator): - What it draws: 9.67 px indicators 8 px apart, at most ten slots; with more pages the row is a window whose edge slots shrink and slide on UIKit's spring; the old indicator fades out after a change. - How it pages: the app owns the page (`page`, counted from 1 as Pagination counts it, `totalPages` and `onChange`). A tap on either side of the current indicator asks for the next or the previous page (mirrored in RTL); a finger that travels 16 px scrubs to the indicator under it and jogs past a window's edge; a press held 155 ms shows the held platter and dims the others. A vertical swipe stays the page's scroll. - Every pointer: with a mouse or a pen a click steps one page toward its side and a drag scrubs; the platter, the dimming, the window's slide and the fades stay the touch presentation, on a coarse pointer. - Reduce Motion: every change fades in 200 ms, nothing travels. - Accessibility: one adjustable `slider` ("Page 3 of 5"); the arrow keys, Home and End change the page. Under a coarse pointer an invisible hit area grows the control toward 44 px, as far as its neighbours allow. - A mouse scrub on a cropped long row holds the row still until the lift, so the page stays the dot under the pointer. Its measured values live in its own table (pageControlTable.ts): only PageControl reads them, so they stay in Lab. It reaches Core's pan and tap recognizers, each element's shared animator, the Reduce Motion cross-fade, the touch hit area and the touch presentation through Core's internal touch entry. `astryx discover` lists it, and the registry has its route. Its timing holds on a loaded runner. A jog step commits in the timer's own task (`flushSync`): a render scheduled after it could wait behind a busy page's other tasks past the next step, and two steps would show as one. A jog step counts from when the previous one was due, so a timer that runs late does not slow the run (after a stall longer than a step, from the late step: no burst). The window's slide starts 50 ms after the change at a start time on the document timeline, for the strip and every dot, which a busy main thread cannot push back as it would a timer. The held-platter proof dates each read on the page's clock from the touch, the clock the 155 ms runs on, and the slide proof dates the change at the lift's first event, the task the change commits in, not by the next frame or the end of that task. The slide's storyboard arms the harness's hold before the tap (`armHold`), so the page holds the motion as it starts, however late the test reads it. The RTL scrub holds the finger 6 px past the content's edge, where the jog steps about once a second, so exactly one step comes before the lift with hundreds of milliseconds to spare. The unit tests' media-query stub answers from the case's pointer at every read: Core's gesture host keeps the `(pointer: coarse)` list it asked for when the document's host was created, so a stub that froze its answer let an earlier mouse case's pointer reach a later touch case (that case failed after any mouse case, and passed alone). Its hit area is Core's shared one: `useTouchHitArea` keeps the insets live, paused while a scrub runs, and `touchHitAreaStyles.layer` draws the band, as in CheckboxInput, RadioListItem, ListItem and InfoTip. * Merge branch 'main' into c23/l1-pagecontrol-core * Merge the updated lower stack branch into c23/l1-pagecontrol * Merge branch 'main' into c23/l1-pagecontrol-core # Conflicts: # packages/core/src/internal/touch.test.ts # packages/core/src/internal/touch.ts # scripts/touch-support-bundle.test.mjs * Merge the updated lower stack branch into c23/l1-pagecontrol # Conflicts: # internal/shadcn-registry/routes.lock.json # packages/cli/assets/discover/official-packages.json # packages/lab/src/index.ts * Merge main into the PageControl lab entry branch (#10189 landed) * Merge the updated lower stack branch into the PageControl branch (own diff unchanged) * fix(lab): PageControl's held look and current indicator change at once under Reduce Motion Under Reduce Motion a press colour's onset and a selection colour apply at once. So a held finger's platter and the dots' dimming show with no fade, and only their release keeps the 200 ms fade on a coarse pointer. The current indicator changes at once on every page change. * Merge main into the PageControl core re-exports branch * Merge the PageControl core re-exports branch into the Lab PageControl branch * Merge main into the PageControl touch entry branch * Merge main into the PageControl touch entry branch * Merge the PageControl touch entry branch into the Lab PageControl branch Co-authored-by: Cindy Zhang <[email protected]>
Maintainer impact
The harness self-test "against a compositor-only control in the same window" fails on loaded WebKit runners. Its frozen arm "moved on 2 of the 49 frames the control moved", where the check allowed 0 or 1.
Intended invariant
The harness's busy-window verdict fails a main-thread animation through a block: it shows no motion from inside the block, and its stall outlasts the control's.
Change
The check allowed one move: a frame presented as the block starts can still show the last step. Traced on starved runners, on the control's clock, the compositor presented steps from before the block well inside it: up to three, as late as 230 ms in. The verdict counts each as a move.
The arm now logs each step with its time on the page clock. Each new position shown in the judged part must be a step set in the 800 ms before the block, within one cast step. A step from inside the block fails it. The verdict still fails the arm, with its stall longer than the control's; the moved count is no longer pinned.
Evidence
WebKit in the CI container image, Chromium on a 2-core pin, the arms interleaved on one machine:
main's check fails 5, each where two late steps showed. Under live load, it failed the count check in 2 of 48 WebKit runs on a 2-core pin and 1 of 16 Chromium runs.Scope
Testing
Run with the container on two cores. As commits not for landing:
main: 8205ae7;Prettier, ESLint,
pnpm lint, the harness's type check andreview:preare clean.