Repository navigation
fix(Layer): hold a press that reaches the page just after an input hold ends - #13526
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 01db14e |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| MobileNav | 79.9 kB (+191 B) · 11.8 kB CSS (0) | — | — · — · — |
| TopNav | 81.7 kB (+186 B) · 12.1 kB CSS (0) | — | — · — · — |
| AppShell | 102.2 kB (+180 B) · 14.9 kB CSS (0) | — | — · — · — |
73 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| lab/ChatReactionBar | 130.0 kB (+180 B) · 1.1 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 128.8 kB (+175 B) · 773 B CSS (0) | — | — · — · — |
| Popover | 105.1 kB (+172 B) · 15.5 kB CSS (0) | — | — · — · — |
| Dialog | 28.6 kB (+161 B) · 7.3 kB CSS (0) | — | — · — · — |
| Drawer | 58.2 kB (+158 B) · 8.7 kB CSS (0) | — | — · — · — |
| Pagination | 154.3 kB (+157 B) · 20.1 kB CSS (0) | — | — · — · — |
| lab/AudioPlayer | 234.7 kB (+157 B) · 1.8 kB CSS (0) | — | — · — · — |
| PowerSearch | 319.4 kB (+156 B) · 27.3 kB CSS (0) | — | — · — · — |
| lab/Comments | 389.5 kB (+155 B) · 2.5 kB CSS (0) | — | — · — · — |
| lab/VideoPlayer | 232.3 kB (+154 B) · 2.1 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 382.5 kB (+145 B) · 2.4 kB CSS (0) | — | — · — · — |
| Markdown | 210.0 kB (+141 B) · 23.4 kB CSS (0) | — | — · — · — |
| SideNav | 125.3 kB (+141 B) · 12.5 kB CSS (0) | — | — · — · — |
| lab/MediaFullscreenButton | 224.7 kB (+141 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlaybackRate | 224.7 kB (+141 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlayButton | 224.7 kB (+141 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaSeekButton | 224.7 kB (+141 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaVolume | 224.7 kB (+141 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaCaptionsButton | 224.7 kB (+140 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaTimeSlider | 224.7 kB (+140 B) · 1.5 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 107.1 kB (+139 B) · 20.0 kB CSS (0) | — | — · — · — |
| lab/MediaTime | 224.7 kB (+139 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/Schedule | 118.6 kB (+137 B) · 3.9 kB CSS (0) | — | — · — · — |
| Table | 125.2 kB (+136 B) · 21.1 kB CSS (0) | — | — · — · — |
| lab/CommentComposer | 186.5 kB (+136 B) · 1.9 kB CSS (0) | — | — · — · — |
| BottomSheet | 76.5 kB (+135 B) · 7.8 kB CSS (0) | — | — · — · — |
| ContextMenu | 106.1 kB (+135 B) · 19.6 kB CSS (0) | — | — · — · — |
| AlertDialog | 133.8 kB (+134 B) · 16.2 kB CSS (0) | — | — · — · — |
| TableCell | 107.3 kB (+133 B) · 20.2 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 316.3 kB (+129 B) · 454 B CSS (0) | — | — · — · — |
| MoreMenu | 114.4 kB (+125 B) · 19.8 kB CSS (0) | — | — · — · — |
| DateTimeInput | 233.1 kB (+123 B) · 20.6 kB CSS (0) | — | — · — · — |
| DropdownMenu | 114.1 kB (+122 B) · 19.8 kB CSS (0) | — | — · — · — |
| Selector | 121.1 kB (+120 B) · 19.7 kB CSS (0) | — | — · — · — |
| DateInput | 209.3 kB (+118 B) · 18.9 kB CSS (0) | — | — · — · — |
| CommandPalette | 83.7 kB (+115 B) · 13.5 kB CSS (0) | — | — · — · — |
| TimeInput | 181.4 kB (+94 B) · 17.9 kB CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 80.7 kB (+4 B) · 11.0 kB CSS (0) | — | — · — · — |
| Slider | 117.1 kB (+4 B) · 9.3 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 102.5 kB (+2 B) · 14.0 kB CSS (0) | — | — · — · — |
| TopNavMenu | 87.2 kB (+2 B) · 12.4 kB CSS (0) | — | — · — · — |
| lab/ChatVirtualizer | 57.8 kB (+1 B) · 223 B CSS (0) | — | — · — · — |
| lab/TransferListSelector | 151.7 kB (+1 B) · 1.4 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 82.6 kB (0) · 12.6 kB CSS (0) | — | — · — · — |
| ContextMenuItem | 38.9 kB (0) · 7.3 kB CSS (0) | — | — · — · — |
| DropdownMenuCheckboxItem | 29.4 kB (0) · 7.6 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 28.6 kB (0) · 7.1 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioItem | 29.5 kB (0) · 7.6 kB CSS (0) | — | — · — · — |
| Item | 20.9 kB (0) · 6.2 kB CSS (0) | — | — · — · — |
| LayerProvider | 4.4 kB (0) · 20 B CSS (0) | — | ✓ · ✓ · — |
| Lightbox | 151.2 kB (0) · 12.3 kB CSS (0) | — | — · — · — |
| ListItem | 81.7 kB (0) · 12.6 kB CSS (0) | — | — · — · — |
| NavHeadingMenu | 18.9 kB (0) · 3.5 kB CSS (0) | — | — · — · — |
| RadioListItem | 78.6 kB (0) · 11.2 kB CSS (0) | — | — · — · — |
| SegmentedControl | 103.6 kB (0) · 7.2 kB CSS (0) | — | — · — · — |
| SelectorOption | 24.7 kB (0) · 6.8 kB CSS (0) | — | — · — · — |
| SideNavHeading | 88.1 kB (0) · 12.5 kB CSS (0) | — | — · — · — |
| Switch | 111.6 kB (0) · 10.5 kB CSS (0) | — | — · — · — |
| Toast | 107.3 kB (0) · 11.5 kB CSS (0) | — | — · — · — |
| ToggleButton | 94.8 kB (0) · 11.3 kB CSS (0) | — | — · — · — |
| ToggleButtonGroup | 42.1 kB (0) · 3.7 kB CSS (0) | — | — · — · — |
| Tokenizer | 112.9 kB (0) · 21.9 kB CSS (0) | — | — · — · — |
| TopNavHeading | 87.8 kB (0) · 12.4 kB CSS (0) | — | — · — · — |
| lab/NavigationScreen | 86.4 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
| lab/NavigationStack | 86.4 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
| lab/PageControl | 79.1 kB (0) · 709 B CSS (0) | — | — · — · — |
| lab/TabBarItem | 3.9 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| lab/TabBarMoreList | 104.9 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| lab/TransferList | 139.7 kB (0) · 1.2 kB CSS (0) | — | — · — · — |
| ButtonGroup | 44.8 kB (−1 B) · 3.7 kB CSS (0) | — | — · — · — |
| MultiSelector | 109.1 kB (−1 B) · 18.9 kB CSS (0) | — | — · — · — |
| TabMenu | 84.3 kB (−1 B) · 12.3 kB CSS (0) | — | — · — · — |
| lab/TabBar | 84.5 kB (−4 B) · 1.8 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 7.97 MB packed (+1.3 kB); no new dependencies.
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested: the fix checks out in jsdom and Chromium, but its phone claim still has no phone evidence.
- The title, description and release note say a tap a phone delivers just after an entrance ends is now held, but only desktop Chromium with a scripted touch timestamp shows it (WebKit skips the case and no phone ran this head), while
spec:AST-094's browser-evidence requirement andspec:AST-013FR10 ask for real iOS Safari device results and Android Chrome emulator or Pixel results at this head, so please add those before and after results to the description, with each run's frame rate and how late the held press arrived (the wait is about 17 ms at 120 Hz), or narrow the title and release note to what Chromium shows.
The code itself looks right: the new wait restores FR35 for a press stamped before an in-time release, cleans up within two frame intervals as FR24 asks, and changes no public API. The spec approval on this head does not cover this gap, because the pull request changes no spec record.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0): none.
- Claim: before, a late press was awaited only after a release in a long task: verified (
inputHold.tson main,ended). - Claim: an in-time release now waits two frame intervals for a press that landed during the hold, within the hold's scope: verified (
inputHold.ts:1276-1285,:978-985). - Claim: a long-task release still waits 500 ms: verified (
inputHold.ts:1281-1283). - Claim: a later-stamped input, the cap, or the layers leaving end the wait, and nothing stays afterwards: verified (
inputHold.ts:897-971, the FR24 jsdom cases). - Claim: no API or default change: verified (API surface comparison of base and head builds: no rows).
- Claim: in Chromium, a finger stamped 3 ms before an in-time release clicked the action on main and is held now: verified (5 of 5 fail on main, 10 of 10 pass here).
- Claim: six jsdom cases and the browser case fail with main's
inputHold.ts: verified (6 of 61; 5 of 5). - Claim: the jsdom file passes 61 of 61 and the browser spec 18 of 18 in Chromium: verified.
- Claim: the callers' suites pass: verified for the callers' folders (148 files, 3,385 tests), including the gesture host and alert motion idle cases.
- Claim: WebKit skips the new browser case: verified (
inputHold.interaction.browser.spec.ts:436). - Claim: ESLint and Prettier pass on the changed files: verified.
- Claim: the full preflight run is in progress: a status, not checkable.
- Claim: on a phone, a late-delivered tap could pick a row and is now held: not shown on any phone or emulator (finding above).
- Release note: held when it arrives within two frame intervals of the end: verified for the rule; the phone part is unshown (finding above).
- File
packages/core/src/Layer/inputHold.ts: clear. - File
packages/core/src/Layer/inputHold.test.tsx: clear. - File
packages/core/src/Layer/__tests__/inputHold.interaction.browser.spec.ts: clear. - File
packages/core/src/Layer/__tests__/inputHold.fixture.ts: clear. - File
.changeset/input-hold-in-time-release.md: finding (phone claim unshown).
01db14e to
de3342a
Compare
|
/approve-spec de3342a |
There was a problem hiding this comment.
Changes requested: the late-press fix itself checks out, but the new shared start verdict holds fingers it should leave alone.
- The touchstart that follows a held pointerdown now holds every finger in that touch event (
packages/core/src/Layer/inputHold.tslines 1166-1172), so when two fingers start together during a non-modal sheet's entrance, one on the sheet and one on the page beside it, the page finger's touchend is canceled and its tap never clicks, which breaksspec:AST-094FR35's rule that the page stays live around a non-modal sheet; please give the stored verdict only to the touch (and, at lines 1115-1116, the pointerdown) whose target matches the held start, and add a jsdom case with two fingers in one touch event under a'surface'hold.
The earlier request for phone evidence no longer applies, since the title and release note now describe what the jsdom and Chromium cases prove. One non-blocking nit: the press hold's JSDoc leaves "through a" on a line of its own (lines 793-795). Required CI has not run on this draft head yet.
Claims and files checked
Review mode: full; reason: history
- Claim: before, a release in time waited for no late press, so a press that went down just before it and arrived after it reached the page: verified (the old
endedreturned early; the new Chromium case fails 5 of 5 with the old hold, where the press clicks the action). - Claim: a release in time now waits two frame intervals for a press stamped during the hold, within the hold's scope: verified (
inputHold.ts:1302-1312,:989-996). - Claim: a release in a long task still waits 500 ms: verified (
inputHold.ts:1307-1308). - Claim: a later-stamped input, the cap, or the layers leaving end the wait, and no listener, timer or frame request stays: verified (
inputHold.ts:943-947,:919-928,:972-982, and the jsdom resource cases). - Claim: a finger's or pen's pointerdown and touchstart give the same time and share one verdict, even after the wait: verified for one finger (Chromium gives both starts the same time; three jsdom cases), but the verdict reaches every finger in the touch event (finding above).
- Claim: FR24 still holds and nothing stays at idle: verified (jsdom listener and timer counts through the cap, the early end and the unmount).
- Claim: no API or default changes: verified (API surface comparison of builds: no rows in any package).
- Claim: nine jsdom cases and the new browser case fail with the old hold: verified (9 of 64; 5 of 5).
- Claim: the jsdom file passes 64 of 64, the browser spec 18 of 18, and the new case when repeated: verified (10 of 10 repeats).
- Claim: the callers' suites pass, including the gesture host's and the alert motion's idle cases: verified (4,593 tests in 209 files across the hold's callers).
- Claim: WebKit skips the new browser case: verified (
inputHold.interaction.browser.spec.ts:436). - Claim: ESLint and Prettier pass on the changed files: verified.
- Claim: the full preflight run and the Android phone run are in progress, and iOS is unmeasured: status statements, not checkable.
- Release note: a tap that lands just before an entrance ends and arrives within two frame intervals after it is held, where before it could pick a menu row: verified (jsdom and Chromium cases; menus take the same hold).
- File
packages/core/src/Layer/inputHold.ts: finding (shared start verdict); non-blocking comment wrap. - File
packages/core/src/Layer/inputHold.test.tsx: clear. - File
packages/core/src/Layer/__tests__/inputHold.interaction.browser.spec.ts: clear. - File
packages/core/src/Layer/__tests__/inputHold.fixture.ts: clear. - File
.changeset/input-hold-in-time-release.md: clear.
…ld ends A phone dispatches a press some milliseconds after the finger lands. So a press that went down just before a hold's release can arrive just after it, when the shield is gone. The press hold waited for a late press only after a release in a long task, so such a press reached the page. The press hold now waits after every release. After a release in time, it takes a press stamped during the ended hold, within its scope, for LATE_RELEASE_FRAMES of the hold's frame intervals. After a release in a long task, it waits LATE_PRESS_MS, as before. The first input stamped at or after the release, the cap, or the layers leaving the page end the wait. Then no listener, timer or frame request stays. A finger's or a pen's press starts twice, with a pointerdown and a touchstart that give the same time and target. An engine can dispatch the touchstart after the wait ends, though the pointerdown came inside it. So the second start follows the verdict of the first: a press is judged once. Two fingers that land together give the same time, so the target tells them apart.
de3342a to
907fb62
Compare
|
/approve-spec 907fb62 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this draft head yet; it runs once the pull request is marked ready for review.
The late-press wait after an in-time release checks out in jsdom and Chromium, and the two starts of one press now share a verdict only when their time and target match, so a second finger on the page beside an entering non-modal sheet keeps its click. One non-blocking suggestion: split the 30-word sentence in the press hold's JSDoc (packages/core/src/Layer/inputHold.ts lines 797-799) into short single-topic sentences.
Claims and files checked
Review mode: full; reason: history
- Claim: before, a release in time waited for no late press, so a press that went down just before it and arrived after it reached the page: verified (the base's
endedreturned early outside a long task; the new Chromium case fails 5 of 5 with the base's hold, where the press clicks the action). - Claim: a release in time now waits up to two of the hold's frame intervals for a press stamped during the hold, within its scope: verified (
inputHold.ts:1328-1338,:1012-1019). - Claim: a release in a long task still waits 500 ms: verified (
inputHold.ts:1333-1334). - Claim: the first input stamped at or after the release, the cap, or the layers leaving end the wait, and no listener, timer or frame request stays: verified (
inputHold.ts:966-970,:942-951,:995-1005, and the jsdom resource cases). - Claim: a finger's or pen's pointerdown and touchstart give the same time and target, and the second follows the first even after the wait: verified (
inputHold.ts:850-863,:1138-1157,:1190-1215; three jsdom pairing cases). - Claim: two fingers that start together under a non-modal layer's hold keep their own verdicts: verified (two jsdom cases, which fail with the earlier pairing and pass here).
- Claim: FR24 still holds and nothing stays at idle: verified (listener and timer counts through the cap, the early end and the unmount).
- Claim: no API or default changes: verified (API surface comparison of nine built packages lists no rows).
- Claim: nine jsdom cases and the new browser case fail with the base's hold: verified (9 of 66; 5 of 5).
- Claim: the jsdom file passes 66 of 66, the browser spec 18 of 18, and the new case when repeated: verified (12 of 12 repeats).
- Claim: the callers' suites pass, including the gesture host's idle case and the alert motion's unmount case: verified (3,469 tests in 149 files across the hold's callers; the description's tally covers a different file set).
- Claim: WebKit skips the new browser case: verified (
inputHold.interaction.browser.spec.ts:436). - Claim: strict ESLint and Prettier pass on the changed files: verified.
- Claim: the changeset and knowledge checks pass: verified.
- Claim: the full preflight run and the Android phone run are in progress, and iOS is unmeasured: status statements, not checkable.
- Release note: a tap that lands just before an entrance ends and arrives within two frame intervals of the end no longer acts, where before it could pick a menu row: verified (jsdom and Chromium cases; menus take the same hold).
- File
packages/core/src/Layer/inputHold.ts: non-blocking comment-style note. - File
packages/core/src/Layer/inputHold.test.tsx: clear. - File
packages/core/src/Layer/__tests__/inputHold.interaction.browser.spec.ts: clear. - File
packages/core/src/Layer/__tests__/inputHold.fixture.ts: clear. - File
.changeset/input-hold-in-time-release.md: clear.
| * it holds, it waits LATE_PRESS_MS. A finger's or a pen's press is judged | ||
| * once: its pointerdown and its touchstart give the same time and target, | ||
| * and the second follows the first, even after the wait. A moving mouse |
There was a problem hiding this comment.
Non-blocking (comment style): this sentence runs 30 words over three topics in the passive voice. A shorter form with one topic per sentence: "A finger's or a pen's press starts twice, with a pointerdown and a touchstart. Both give the same time and target. The second start takes the first start's verdict, also after the wait."
User impact
A tap that lands just before a menu's entrance ends can pick a row, when the browser delivers it just after the end.
Problem and solution fit
While a touch presentation enters, the layer runtime's input hold swallows each new finger press. Since #13436, it judges a press by its event time. But it waited for a late press only after a release in a long task. A release in time waited for nothing.
So a press that went down just before a release in time and arrived just after it reached the page. Now a release in time waits for such a press too, for two of the hold's frame intervals at most.
Expected behavior and authority
spec:AST-094FR35: a tap that lands while a touch presentation is still entering MUST NOT close it, or reach anything beneath it.architecture:layer-runtimeINV16: the runtime's one input hold keeps that input away. FR24 still holds: the wait exists only right after a hold, so nothing stays at idle.Smallest restoration
LATE_RELEASE_FRAMES(2) of the hold's frame intervals.Evidence
inputHold.ts.Scope
Components: the Layer input hold (
Layer/inputHold.ts)Testing
inputHold.ts, at main 3560b58:inputHold.test.tsxfails 9 of 66. They cover the traced press, the wait's bound, its listeners, the input that ends it, the 30 Hz wait and the unmount.__tests__/inputHold.interaction.browser.spec.ts:432, fails 5 of 5.inputHold.test.tsxpasses 66 of 66. The browser spec passes 18 of 18 in Chromium, and the new case 12 of 12 when repeated.pnpm preflight --browserpasses at 907fb62, and it reports "ready to flip".ASTRYX_STRICT_LINT=1. Its Chromium interaction step passes 1,916 tests and skips 54.