Repository navigation
test(BottomSheet): judge a soft flick by the release the page read - #10661
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 |
|---|---|---|---|
| BottomSheet | 65.5 kB (0) · 7.5 kB CSS (0) | — | ✓ · ✓ · — |
| BottomSheetSwitcher | 17.9 kB (0) · 3.4 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: cli 29 rows, core 35 rows; 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.
Requesting changes: the half-detent proofs should judge the release the page read, but the band they judge it against copies the sheet's release rule instead of asking it.
halfLandingBand(BottomSheetDetent.interaction.browser.spec.ts:110-131) re-implementsresolveSnapPoint's touch release rule (projection, minimum speed, flick at or past its projection, drag slop) and already disagrees with it at the edges: at the proofs' geometry Core lands 540 px/s, and anything just above 2,040 up to 2,050 px/s, on half, which the band rejects; decide the page's release by callingresolveSnapPointwith the argumentsuseSheetGesturespasses, and fail by name unless it returns the half detent.
Non-blocking: since this branch's merge base, the harness's boundaries.releasePxPerS judges a play at a component threshold. After a rebase, consider using or extending it so that BottomSheet and SnapPaging judge a page's release one way.
[Automated review]
The two flick proofs that land on the half detent judged the release the page read against the script's, within a share of it. A page whose own listeners take a few ms reads a slower flick, so the play threw TouchPageStallError while the sheet still landed on half. Each now asks Core's release rule where the release the page read lands: resolveSnapPoint, with the arguments the sheet passes for a touch release. The release is Core's velocity reading of the page's own event stamps. Unless the rule lands it on half, the proof fails by name. A unit checks those arguments for a long and a short travel.
1527c64 to
33f4f31
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is still a draft; marking it ready for review runs it.
The half-detent proofs now ask resolveSnapPoint, with the arguments the sheet passes for a touch release, where the release the page read lands. That resolves the earlier request to stop re-deriving the release rule, and the landing assertions still decide each proof.
[Automated review]
Maintainer impact
In WebKit, the two BottomSheet flick proofs that land on the half detent fail with
TouchPageStallErroron loaded runners. They failed four times on Nov 7–8, 2026, including both attempts of a release's interaction check. In those runs the page's listeners took 4–6 ms an event, so the page read 929–1000 px/s where the script throws 1,225. The sheet still lands on half at that speed.Intended invariant
A flick proof judges the release the page read, not the script's. The touch driver reads it: Core's velocity estimator over the page's own event stamps (
PlayedEvent.release). The proof asks Core's release rule where that release lands:resolveSnapPoint, with the argumentsuseSheetGesturespasses for a touch release. With the hook's ownsheet.releaseconstants and the measured detents, the proof follows the rule if it changes. Unless the rule lands the release on half, the proof fails by name. The landing assertions do not change.Change
releaseTolerance. They judge the page's release withpageRelease,landingOfandexpectLandsOnHalf. In Chromium the page reads the script's stamps, so the check takes the script's release.HALF_FLICK_TOLERANCEgoes, with its comment that half starts at 1,008 px/s. That is UIKit's flick threshold; slower releases still land on half through the projection.useSheetGestures, is copied with aSYNCnote.Evidence
TouchPageStallError(vjeux/astryx@1445a1d). Over two runs the page read 765–891 px/s, slower than in CI's failures.Scope
Testing
All runs use
CI=1, CI's WebKit container (4 CPUs) and a Storybook build of main c99ad4a. They run the two half-detent proofs unless noted.TouchPageStallErrorTouchPageStallErrorTouchPageStallErrorHow the 4-worker numbers compare with CI. CI's failures on Nov 7–8 read 929–1000 px/s, with listeners taking 4–6 ms. This branch passes that case. With the 5 ms stall the page reads 765–891 px/s (main's arm, over two runs), and this branch passes it 6 of 6. At 4 workers, 7 of its failures read 355–533 px/s, where the sheet lands on tall. In the other 3, one listener took 47–56 ms, so the page read a resting finger. Both are heavier than any of those CI runs. Main failed those runs too, and also runs that read 625–892 px/s, which this branch passes.
Gates.
pnpm test:node(17,553 pass), typecheck (core), eslint and prettier pass.Overlap. No open pull request touches this spec except three drafts of more than 250 files (#8242, #8344, #8375), each over 1,400 commits behind main.