Skip to content

fix(Layer): hold a press that landed during an input hold but arrives late - #13436

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:input-hold-late-press
Nov 22, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:input-hold-late-press

Conversation

@vjeux

@vjeux vjeux commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

User impact

On a phone, a tap that lands while a menu enters can pick a row. It can happen when a busy main thread delivers the tap after the entrance ends. Device runs of #8080 found it under Reduce Motion, at its earlier and current heads.

Problem and solution fit

While a touch presentation enters, the layer runtime's input hold swallows each new finger press. It judged a press when the engine dispatched it. A long task can end the hold and delay a press past that end. The shield is gone then, so the press picks the row.

After a release in a long task, the press hold now judges a press by its event time, on the page's clock (timeOn). A press that went down during the ended hold is held to its end. Both of a finger's starts carry one time, so one press gets one verdict.

Expected behavior and authority

spec:AST-094 FR35: a tap that lands while a touch presentation is still entering MUST NOT close it, or reach anything beneath it. architecture:layer-runtime INV16: the runtime's one input hold keeps that input away. FR24 still holds: nothing stays after the last instance unmounts.

Smallest restoration

  • While a layer is held, the press hold asks for one frame at a time. The release cancels the request.
  • Only a release after a long task waits for late presses. Then no frame ran for more than two of the hold's frame intervals.
  • For at most LATE_PRESS_MS, 500 ms, the wait takes a late press within the ended hold's scope. It holds that press to its end.
  • Later-stamped input, or the layers leaving the page, ends it. A release in time waits for nothing. No API or default changes.

Evidence

  • Reproduction before the change: in Chromium, a finger goes down while the task that ends a hold runs. The engine dispatches it after the end, and its tap clicks the action beneath.
  • Result after the change: that press is held to its end, and the next tap clicks.
  • Representative unchanged path: a release in time leaves no listener, timer or frame request. A late press beside a 'surface' hold reaches the page.
  • Regression test or other mutation-sensitive proof: twelve unit cases and both new browser cases fail with main's inputHold.ts.

Scope

Components: the Layer input hold (Layer/inputHold.ts)

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  1. Red first (test), with this pull request's tests and fixture and main's inputHold.ts, at main 0ed091c:
    • jsdom: inputHold.test.tsx fails 12 of 58. They cover the late, split and long presses, wall-clock stamps, the 30 Hz and frame-end cases, and the scope. The others pin the cap, the unmount, the frame requests, the release in time and the hidden tab.
    • Chromium, real touch through its DevTools protocol: both new cases fail, __tests__/inputHold.interaction.browser.spec.ts:396 and :431.
    • In the first, the page's task runs 300 ms of work, the release, then 40 ms more. The finger goes down in the first part.
    • The page heard the press after the release, though its time is before it. Its click landed on the action.
    • In the second, the finger also stays down 600 ms past the release. Its pointerdown, touchstart, pointerup, touchend and click reached the page.
    • The first case fails the same way at feat(DropdownMenu): a finger's open grows the menu out of its trigger #8080's earlier head 4651f21 and at fix(menu press): cancel a pick's touchend on the node the touch began on #11859's head ff541aa. Both carry main's inputHold.ts.
    • With the first head's inputHold.ts (7af3891), the long press and the wall-clock stamp fail. In the :431 case, the press's pointerup, touchend and click reached the page.
  2. With the change, at e43cef4 (test):
    • inputHold.test.tsx passes 58 of 58. The browser spec passes 17 of 17 in Chromium, and each new case 12 of 12 when repeated.
    • The suites of the hold's callers pass, 3,779 of 3,779. These are the gesture host, alert, sheet, popover, layer, menu press, menus, dialog, drawer, nav, lightbox, media player and input-age suites.
    • A local probe, not in this pull request, measured false opens. A hold that ends with its animation opened no wait in 0 of 40 releases, at normal speed and with the CPU slowed 4×.
    • With a 150 ms task over that end, the wait opened in 40 of 40.
    • A second local probe, not part of this pull request, ran DropdownMenu's project list in Chromium with CDP touch, under Reduce Motion.
    • It put a 100 ms task into the one that ends the hold, and a finger went down during it.
    • With main's inputHold.ts, at feat(DropdownMenu): a finger's open grows the menu out of its trigger #8080's head b01d48c, 10 of 10 such late presses acted. With this change, at 2b75997, 0 of 10 acted.
    • On main 0ed091c and at this head, the story's hold ends with its CSS entrance. There the probe put the task into that entrance's end.
    • Then 12 of 12 late presses acted on main, and 0 of 12 at this head.
    • WebKit skips the new browser case. Its test input stamps each touch when it dispatches it, so no page can see the earlier time.
    • Strict ESLint and Prettier pass on the changed files.
  3. What the gate covers. A late press goes down after the long task begins, so the task's gap is at least the press's lead before the release.
    • At 120 Hz, the wait opens for gaps over about 17 ms. At 60 Hz, over about 33 ms.
    • The device runs saw leads of 28 to 35 ms. At 120 Hz, the gate covers all of them. At 60 Hz, it covers a shorter lead only when its task began earlier.
    • The device record gives no frame interval.
  4. The strict pnpm preflight --browser passes at e43cef4, and it reports "ready to flip".
    • It ran with ASTRYX_STRICT_LINT=1. Its Chromium interaction step passes 1,904 tests and skips 54.
    • That step's selection reads: "Chromium selection: the full suite (packages/core/src/Layer/tests/inputHold.fixture.ts is shared code)."
  5. No real phone has run this head yet.
    • An Android emulator (test), Chrome 145, ran Storybook builds of this head, e43cef4, and of its parent on main, 0ed091c.
    • The run's record is https://github.com/vjeux/astryx/blob/cc99c2406b1efaed7db967bb35c68dfecd7a058f/index.md.
    • It ran DropdownMenu's "Readiness / tall content overflow" story (core-dropdownmenu--tall-content-overflow). Its menu holds touch input until its CSS entrance ends.
    • It ran at animation scale 0 under reduced motion, at scale 1, and at scale 1 with a 4× CPU slowdown.
    • A page script put a 100 ms task into the entrance's end, just before the hold's release. A finger went down during it.
    • On main, such late presses picked the row. That was 12 of 12 at scale 0, 12 of 12 at scale 1 and 9 of 9 at 4× CPU.
    • At this head, none of them acted: 0 of 12, 0 of 12 and 0 of 10.
    • At 4× CPU, the counts come from a pass that armed the task 170 ms after the hold began. An earlier pass armed it later, so some holds ended before its task began. In that pass's late cases, 5 of 5 acted on main and 0 of 6 at this head.
    • A second, fresh emulator with the Pixel 9 Pro profile ran the same cell under reduced motion. On main, 4 of 4 late presses acted. At this head, 0 of 4 acted.
  6. An earlier Android emulator run (test), Chrome 145, used fix(menu press): cancel a pick's touchend on the node the touch began on #11859's head ff541aa with this pull request's five files applied, byte-identical to e43cef4.

@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 6:27pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 21, 2026
@astracat-bot

astracat-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 11:33 PM UTC

@cixzhang cixzhang added ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) labels Nov 21, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec 7af3891

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · e43cef4

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
LayerProvider 4.4 kB (0) · 20 B CSS (0) — ✓ · ✓ · ✗
MobileNav 79.4 kB (+746 B) · 11.8 kB CSS (0) — — · — · —
BottomSheet 76.1 kB (+729 B) · 7.8 kB CSS (0) — — · — · —
75 more components
Component Size LoC Visual · A11y · RTL
TopNav 81.3 kB (+709 B) · 12.1 kB CSS (0) — — · — · —
DateInput 208.5 kB (+693 B) · 18.9 kB CSS (0) — — · — · —
Dialog 28.4 kB (+671 B) · 7.3 kB CSS (0) — — · — · —
AppShell 101.3 kB (+664 B) · 14.9 kB CSS (0) — — · — · —
DateTimeInput 232.4 kB (+663 B) · 20.6 kB CSS (0) — — · — · —
lab/MediaCaptionsButton 223.7 kB (+658 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaFullscreenButton 223.7 kB (+658 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaSeekButton 223.7 kB (+658 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTime 223.7 kB (+658 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTimeSlider 223.7 kB (+658 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaVolume 223.7 kB (+658 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlayButton 223.7 kB (+657 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlaybackRate 223.7 kB (+656 B) · 1.5 kB CSS (0) — — · — · —
CommandPalette 83.3 kB (+654 B) · 13.5 kB CSS (0) — — · — · —
Drawer 57.8 kB (+646 B) · 8.7 kB CSS (0) — — · — · —
Popover 104.6 kB (+645 B) · 15.5 kB CSS (0) — — · — · —
SideNav 124.3 kB (+643 B) · 12.5 kB CSS (0) — — · — · —
Pagination 153.5 kB (+642 B) · 20.0 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 128.0 kB (+641 B) · 773 B CSS (0) — — · — · —
lab/ChatReactionBar 129.2 kB (+638 B) · 1.1 kB CSS (0) — — · — · —
lab/Schedule 118.1 kB (+635 B) · 3.9 kB CSS (0) — — · — · —
richtext/RichTextEditorToolbar 315.5 kB (+622 B) · 454 B CSS (0) — — · — · —
lab/CommentComposer 185.9 kB (+618 B) · 1.9 kB CSS (0) — — · — · —
lab/CommentThread 381.5 kB (+618 B) · 2.4 kB CSS (0) — — · — · —
TimeInput 180.6 kB (+613 B) · 17.8 kB CSS (0) — — · — · —
lab/VideoPlayer 231.3 kB (+606 B) · 2.1 kB CSS (0) — — · — · —
Markdown 208.7 kB (+602 B) · 23.4 kB CSS (0) — — · — · —
lab/Comments 388.4 kB (+590 B) · 2.5 kB CSS (0) — — · — · —
Table 124.5 kB (+587 B) · 21.1 kB CSS (0) — — · — · —
lab/AudioPlayer 233.7 kB (+587 B) · 1.8 kB CSS (0) — — · — · —
MoreMenu 113.9 kB (+584 B) · 19.8 kB CSS (0) — — · — · —
PowerSearch 318.4 kB (+577 B) · 27.3 kB CSS (0) — — · — · —
TableCell 106.7 kB (+577 B) · 20.1 kB CSS (0) — — · — · —
ContextMenu 105.4 kB (+571 B) · 19.6 kB CSS (0) — — · — · —
DropdownMenu 113.6 kB (+570 B) · 19.8 kB CSS (0) — — · — · —
Selector 120.4 kB (+560 B) · 19.7 kB CSS (0) — — · — · —
TableHeaderCell 106.5 kB (+560 B) · 20.0 kB CSS (0) — — · — · —
AlertDialog 133.4 kB (+552 B) · 16.2 kB CSS (0) — — · — · —
MultiSelector 108.8 kB (+38 B) · 18.9 kB CSS (0) — — · — · —
lab/PageControl 79.0 kB (+26 B) · 709 B CSS (0) — — · — · —
TopNavMenu 86.9 kB (+16 B) · 12.4 kB CSS (0) — — · — · —
ContextMenuItem 38.6 kB (+14 B) · 7.3 kB CSS (0) — — · — · —
ToggleButtonGroup 42.0 kB (+14 B) · 3.7 kB CSS (0) — — · — · —
lab/TabBar 84.5 kB (+14 B) · 1.8 kB CSS (0) — — · — · —
lab/NavigationScreen 86.1 kB (+13 B) · 1.5 kB CSS (0) — — · — · —
lab/NavigationStack 86.1 kB (+13 B) · 1.5 kB CSS (0) — — · — · —
NavHeadingMenu 18.8 kB (+12 B) · 3.5 kB CSS (0) — — · — · —
Toast 107.0 kB (+12 B) · 11.5 kB CSS (0) — — · — · —
lab/ChatVirtualizer 57.7 kB (+12 B) · 223 B CSS (0) — — · — · —
ButtonGroup 44.8 kB (+11 B) · 3.7 kB CSS (0) — — · — · —
ToggleButton 94.5 kB (+11 B) · 11.3 kB CSS (0) — — · — · —
TopNavHeading 87.5 kB (+11 B) · 12.4 kB CSS (0) — — · — · —
Switch 111.1 kB (+10 B) · 10.4 kB CSS (0) — — · — · —
TabMenu 84.0 kB (+10 B) · 12.3 kB CSS (0) — — · — · —
BreadcrumbItem 102.2 kB (+9 B) · 14.0 kB CSS (0) — — · — · —
Lightbox 150.8 kB (+9 B) · 12.3 kB CSS (0) — — · — · —
SideNavHeading 87.8 kB (+9 B) · 12.5 kB CSS (0) — — · — · —
Slider 116.2 kB (+9 B) · 9.2 kB CSS (0) — — · — · —
SegmentedControl 103.5 kB (+6 B) · 7.2 kB CSS (0) — — · — · —
DropdownMenuSubMenu 80.3 kB (+4 B) · 11.0 kB CSS (0) — — · — · —
SelectorOption 24.6 kB (+2 B) · 6.8 kB CSS (0) — — · — · —
Tokenizer 112.5 kB (+2 B) · 21.9 kB CSS (0) — — · — · —
ListItem 81.1 kB (+1 B) · 12.5 kB CSS (0) — — · — · —
CheckboxListItem 82.0 kB (0) · 12.5 kB CSS (0) — — · — · —
Item 20.8 kB (0) · 6.2 kB CSS (0) — — · — · —
RadioListItem 78.1 kB (0) · 11.1 kB CSS (0) — — · — · —
lab/TabBarItem 3.9 kB (0) · 1.8 kB CSS (0) — — · — · —
lab/TransferList 138.7 kB (0) · 1.2 kB CSS (0) — — · — · —
lab/TransferListSelector 150.6 kB (0) · 1.4 kB CSS (0) — — · — · —
DropdownMenuCheckboxItem 29.3 kB (−1 B) · 7.6 kB CSS (0) — — · — · —
DropdownMenuItem 28.5 kB (−1 B) · 7.1 kB CSS (0) — — · — · —
DropdownMenuRadioItem 29.4 kB (−1 B) · 7.6 kB CSS (0) — — · — · —
lab/TabBarMoreList 104.2 kB (−1 B) · 1.8 kB CSS (0) — — · — · —
layer — — — · ✓ · —
Layer — — ✓ · ✓ · —

Package size: @astryxdesign/core 7.96 MB packed (+3.9 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

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. Judging a press by the time the finger went down is the right fix for the late tap, and the new Chromium case proves it for a short press; the points below need fixing before approval.

  • A press that a long task delivered late and that stays down more than 500 ms after the release is not held to its end: the timer armed at the release still calls stop() while the press is down, so its pointerup, touchend and click reach the page, and calling settle() after the late press is added to pointers or touches, with a regression case, fixes it.
  • noteInputAt and wasHeldAt decide on their own whether event.timeStamp is on the page's clock, while utils/inputAge.ts timeOn already owns that decision, wall-clock stamps included, so please judge both by timeOn, or extend it and say why.
  • The changeset says such a tap "no longer acts when a busy page delivers it after the entrance", but the hold covers only a release after a gap of more than two frame intervals and a press that arrives within 500 ms, so please narrow the wording to that.
  • The defect was found on Pixel phones and the fix depends on Chrome's touch time stamps, so the description needs an Android Chrome run at this head (emulator or Pixel), stated in text: device, browser, head, animation scale, and the held-menu result under reduced motion.
Claims and files checked

Review mode: same-head; reason: none

  • Claim: on a phone, a tap that lands while a menu enters can pick a row, as device runs of an earlier menu pull request found under reduced motion. Verified from that pull request's device section (5 of 16 held presses acted); that the cause was late delivery is inferred.
  • Claim: main judged a press when the engine dispatched it. Verified: main's pointerdown branch calls holdsPressAt at dispatch.
  • Claim: a long task can deliver a press after the release, and its tap then clicks the action beneath. Verified: the new Chromium case fails with main's inputHold.ts, and the click lands on the popover action.
  • Claim: after a long-task release, a press that went down during the ended hold is held to its end. False for a press that stays down more than 500 ms after the release.
  • Claim: both of a finger's starts carry one time, so one press gets one verdict. Verified: wasHeldAt judges pointerdown and touchstart by event.timeStamp; unit case.
  • Claim: FR35 and INV16 govern, and FR24 still holds. Verified: resource counts after a release in time, at the cap, on unmount and in a hidden tab.
  • Claim: the hold asks for one frame at a time, and the release cancels it. Verified: watchFrames and release; unit case.
  • Claim: only a release after more than two of the hold's frame intervals with no frame waits for late presses. Verified: isAfterLongTask, LATE_RELEASE_FRAMES = 2.
  • Claim: the wait keeps the ended hold's scope, for at most 500 ms. Verified: wasHeldAt; the surface-scope unit case.
  • Claim: later-stamped input or the layers leaving ends the wait, a release in time waits for nothing, and no API or default changes. Verified: noteInputAt, the layer watch, unit cases; the API generator lists no rows.
  • Claim: ten unit cases and the new browser case fail with main's inputHold.ts. Verified: 10 of 56 fail, and the browser case fails.
  • Claim: the browser case also fails at two earlier heads of related pull requests. Not reproduced.
  • Claim: with the change, 56 of 56 unit and 16 of 16 Chromium cases pass, and the new case passes when repeated. Verified: 56 of 56, 16 of 16, and 8 of 8 repeated.
  • Claim: the callers' suites pass, 3,771 of 3,771. Partly verified: 3,714 of 3,714 without the media player suites.
  • Claim: 0 of 40 releases in time opened a wait, and 40 of 40 did with a 150 ms task. Not reproduced.
  • Claim: WebKit skips the new browser case because its test input stamps touches at dispatch. Verified in the spec; the WebKit reason was not run.
  • Claim: strict ESLint and Prettier pass on the changed files. Verified.
  • Claim: the gate opens for gaps over about 17 ms at 120 Hz and 33 ms at 60 Hz, against device leads of 28 to 35 ms. Verified: twice the frame interval; the earlier device runs report those leads.
  • Claim: one defect, no tagalongs, no new public API, default or interaction model, and no internal context. Verified.
  • Claim: no real phone has run this head. Stated; it leaves the Android evidence missing.
  • Claim (changeset): a tap that lands during an entrance no longer acts when a busy page delivers it later. False as worded: the long-task gate and the 500 ms cap bound it.
  • File packages/core/src/Layer/inputHold.ts: a late press escapes after 500 ms, and the clock check duplicates utils/inputAge.
  • File packages/core/src/Layer/inputHold.test.tsx: clear, but it has no case for a late press held past LATE_PRESS_MS.
  • File packages/core/src/Layer/__tests__/inputHold.interaction.browser.spec.ts: clear; it covers a short late tap.
  • File packages/core/src/Layer/__tests__/inputHold.fixture.ts: clear.
  • File .changeset/input-hold-late-press.md: its wording is broader than the fix.

Automated review (maintainer link)

Comment thread packages/core/src/Layer/inputHold.ts Resolved
Comment thread packages/core/src/Layer/inputHold.ts Resolved
Comment thread .changeset/input-hold-late-press.md Resolved
Comment thread packages/core/src/Layer/inputHold.ts Resolved
… late

A busy main thread can dispatch a finger's press after the task that ends
an input hold, though the finger went down while the hold was on. The
press hold judged each press when it arrived, so such a press reached the
page: a tap that landed while a menu entered could pick a row.

The press hold now judges a press by its event's own time, on the page's
clock (utils/inputAge's timeOn). After a release in a long task, a press
that went down during the ended hold is taken, within that hold's scope,
if it arrives at most LATE_PRESS_MS after the end. A press it takes is
held to its end, as one held during the hold is. The hold reads a long
task from the frames the page drew while it held: no frame for more than
LATE_RELEASE_FRAMES of its frame intervals. Both of a finger's starts
carry one time, so one press gets one verdict.

A release in time waits for nothing, as before. Input stamped at or after
the end, the cap, or the layers leaving the page end the wait.
@vjeux
vjeux force-pushed the input-hold-late-press branch from 7af3891 to e43cef4 Compare November 21, 2026 18:17
@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec e43cef4

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The code is unchanged since the last review and no code point stands; the new Android emulator run is the one remaining point before approval.

  • The Android Chrome run is on a build of #11859's head with this pull request's five files applied, not on this head, and the touch-presentation spec asks for Android evidence at the exact head (or carried across a main merge of this same pull request), so please take the same forced-task run at this head, where DropdownMenu's own entrance hold runs the late-press path under a finger, and state it in text: emulator or Pixel, browser, head, animation scale (normal and removed), slow-device profile, the result, and the spot check on a second device.

Two non-blocking comment-style notes (inputHold.ts lines 111 and 925) still stand.

Claims and files checked

Review mode: same-head; reason: none

  • Claim: on a phone, a tap that lands while a menu enters can pick a row when a busy main thread delivers it after the entrance ends, as the menu pull request's device runs found under reduced motion. Verified from that pull request's device section; not re-run on a device.
  • Claim: the hold judged a press when the engine dispatched it, so a press a long task delays past the release reaches the row. Verified: main's pointerdown branch asks holdsPressAt at dispatch, and both new Chromium cases fail with main's inputHold.ts.
  • Claim: after a release in a long task, a press is judged by its event time on the page's clock (timeOn), and a press that went down during the ended hold is held to its end. Verified: timeOfInput, wasHeldAt and settle() after a held press (inputHold.ts:911, :968, :1109, :1157); the long-press Chromium case.
  • Claim: both of a finger's starts carry one time, so one press gets one verdict. Verified: the split-press unit case.
  • Claim: the touch-presentation input rule and the one-input-hold rule govern, and nothing stays after the last instance unmounts. Verified: unit cases count listeners, timers and frame requests after a release in time, after a long press, at the cap, on unmount and in a hidden tab.
  • Claim: while a layer is held the hold asks for one frame at a time, and the release cancels it. Verified: watchFrames and release; unit case.
  • Claim: only a release after more than two of the hold's frame intervals with no frame waits for late presses. Verified: isAfterLongTask, LATE_RELEASE_FRAMES = 2; the 30 Hz and frame-end unit cases.
  • Claim: for at most 500 ms the wait takes a late press within the ended hold's scope and holds it to its end. Verified: wasHeldAt; the cap and surface-scope unit cases.
  • Claim: later-stamped input or the layers leaving end the wait, a release in time waits for nothing, and no API or default changes. Verified: noteInputAt, the layer watch and unit cases; no public surface changes.
  • Claim: in Chromium the delayed tap clicks the action on main, and with the change it is held and the next tap clicks. Verified: both new browser cases.
  • Claim: a release in time leaves no listener, timer or frame request, and a late press beside a surface hold reaches the page. Verified: unit cases.
  • Claim: twelve of 58 unit cases and both new browser cases fail with main's inputHold.ts. Verified.
  • Claim: the first browser case fails the same way at an earlier head of the menu pull request and at a related pull request's head, both carrying main's inputHold.ts. Both carry main's file (verified); the failure there was not reproduced.
  • Claim: at this pull request's first head, the long-press and wall-clock unit cases fail, and the second browser case lets the release, end and click through. Verified.
  • Claim: with the change, 58 of 58 unit cases, 17 of 17 Chromium cases, and each new case 12 of 12 when repeated pass. Verified; the unit cases pass again here.
  • Claim: the callers' suites pass, 3,779 of 3,779. Verified.
  • Claim: a local probe saw no wait in 0 of 40 releases in time and a wait in 40 of 40 with a 150 ms task. Not reproduced; the probe is not in the pull request.
  • Claim: a second local probe on DropdownMenu in Chromium saw 10 of 10 late presses act without the change and 0 of 10 with it. Not reproduced; the probe is not in the pull request.
  • Claim: WebKit skips the new browser cases because its test input stamps touches at dispatch. Verified for both new cases in the spec; WebKit was not run.
  • Claim: strict ESLint and Prettier pass on the changed files. Verified.
  • Claim: the gate opens for gaps over about 17 ms at 120 Hz and 33 ms at 60 Hz, which covers the device leads of 28 to 35 ms at 120 Hz. Verified: twice the median frame interval.
  • Claim: the strict preflight with browser checks passes at this head and reports "ready to flip", with the full Chromium suite selected. Stated; the full suite was not re-run here (the preflight prints "ready to flip" only when nothing failed or went unbuilt).
  • Claim: no real phone has run this head. Stated.
  • Claim: an Android emulator ran a build of a related pull request's head with this pull request's five files applied, byte-identical to this head. Verified: the build's five files match this head's; the rest of its tree is that pull request's, with DropdownMenu, Popover surface-motion and menu-press changes on an older main.
  • Claim: on that build, late presses picked the row without the change (4 of 4, 3 of 3, 7 of 7) and none acted with it (0 of 1, 0 of 4, 0 of 8), and every press stamped before the release was held. Stated in text; it is not at this head.
  • Claim: main has no page that runs this path at the menu pull request's hold timing, so the run is not at this head. True for that timing; this head's DropdownMenu entrance hold (DropdownMenu.tsx:1308) runs the same path under a finger.
  • Claim: one defect, no tagalongs, no new public API, default or interaction model, and no internal context. Verified.
  • Claim (changeset): a tap during an entrance no longer acts when a long task ends the entrance, and it is held if it arrives within 500 ms of that end. Verified: isAfterLongTask and the wasHeldAt cap.
  • File packages/core/src/Layer/inputHold.ts: clear; two non-blocking comment notes.
  • File packages/core/src/Layer/inputHold.test.tsx: clear; 12 new cases fail with main's hold.
  • File packages/core/src/Layer/__tests__/inputHold.interaction.browser.spec.ts: clear; both new cases fail with main's hold.
  • File packages/core/src/Layer/__tests__/inputHold.fixture.ts: clear.
  • File .changeset/input-hold-late-press.md: clear.

Automated review (maintainer link)

ended: (hold: EndedHold) => void;
}

/** A hold that has ended: what it held, and when it began and ended. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (comment style): this restates the fields. The constraint a reader needs is the clock. Suggested: /** An ended hold. `from` and `to` are on its window's `performance.now()` clock, which `event.timeStamp` uses. */

};

/**
* Forgets each ended hold that `isDone` names, and each one past its late

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (comment style): this leaves out the branch that forgets a hold whose layer left the page. Suggested: Forgets each ended hold that `isDone` names, that is past its late window, or whose layer left the page. Returns whether it forgot one.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because the pull request is a draft; its checks run once it is marked ready for review.

The Android emulator run at this exact head closes the one open point from the last review, and no code point stands. Two non-blocking comment-style notes (inputHold.ts lines 111 and 924-927) still stand.

Claims and files checked

Review mode: same-head; reason: none

  • Claim: on a phone, a tap that lands while a menu enters can pick a row when a busy main thread delivers it after the entrance ends, as the menu pull request's device runs found under reduced motion. Verified from that pull request's device results; not re-run on a phone.
  • Claim: the hold judged a press when the engine dispatched it, so a press a long task delays past the release reaches the row. Verified: main's pointerdown branch asks holdsPressAt at dispatch, and both new Chromium cases fail with main's inputHold.ts.
  • Claim: after a release in a long task, a press is judged by its event time on the page's clock (timeOn), and one that went down during the ended hold is held to its end. Verified: timeOfInput, wasHeldAt and settle() after a held press (inputHold.ts:911, :968, :1109, :1157); the long-press Chromium case.
  • Claim: both of a finger's starts carry one time, so one press gets one verdict. Verified: the split-press unit case.
  • Claim: the touch-presentation input rule and the one-input-hold rule govern, and nothing stays after the last instance unmounts. Verified: unit cases count listeners, timers and frame requests after a release in time, after a long press, at the cap, on unmount and in a hidden tab.
  • Claim: while a layer is held the hold asks for one frame at a time, and the release cancels it. Verified: watchFrames and release; unit case.
  • Claim: only a release after more than two of the hold's frame intervals with no frame waits for late presses. Verified: isAfterLongTask, LATE_RELEASE_FRAMES = 2; the 30 Hz and frame-end unit cases.
  • Claim: for at most 500 ms the wait takes a late press within the ended hold's scope and holds it to its end. Verified: wasHeldAt; the cap and surface-scope unit cases.
  • Claim: later-stamped input or the layers leaving end the wait, a release in time waits for nothing, and no API or default changes. Verified: noteInputAt, the layer watch and unit cases; no public surface changes.
  • Claim: in Chromium the delayed tap clicks the action on main; with the change it is held and the next tap clicks, and a late press beside a surface hold reaches the page. Verified: both new browser cases and the surface-scope unit case.
  • Claim: twelve of 58 unit cases and both new browser cases fail with main's inputHold.ts, and the first browser case fails the same way on two related pull requests' heads that carry main's file. The twelve and both cases verified; both related heads carry main's file (verified), and their failure was not reproduced.
  • Claim: at this pull request's first head, the long-press and wall-clock unit cases fail, and the second browser case lets the release, end and click through. Verified.
  • Claim: with the change, 58 of 58 unit cases, 17 of 17 Chromium cases and 12 of 12 repeats of each new case pass. Verified; the unit cases pass again here.
  • Claim: the callers' suites pass, 3,779 of 3,779. Verified.
  • Claim: local probes saw no wait after releases in time, a wait after a 150 ms task, and DropdownMenu late presses that act on main but not with the change. Not reproduced; the probes are not in the pull request.
  • Claim: WebKit skips the new browser cases because its test input stamps touches at dispatch. Verified: both cases skip without scripted touch times; WebKit was not run.
  • Claim: strict ESLint and Prettier pass on the changed files. Verified.
  • Claim: the gate opens for gaps over about 17 ms at 120 Hz and 33 ms at 60 Hz, which covers the device leads of 28 to 35 ms at 120 Hz. Verified: twice the median frame interval.
  • Claim: the strict preflight with browser checks passes at this head and selects the full Chromium suite. Stated; not re-run.
  • Claim: no real phone has run this head. Stated.
  • Claim: an Android emulator with Chrome 145 ran Storybook builds of this head and of its parent on main, in DropdownMenu's tall-content story, whose menu holds touch input until its entrance ends. Verified: the story and its entrance hold exist at this head, and the run's committed record names the same builds, browser and keyboard.
  • Claim: with a 100 ms task forced into the entrance's end, late presses picked the row on main (12 of 12 with animations removed, 12 of 12 at normal scale, 9 of 9 at 4× CPU) and none acted at this head (0 of 12, 0 of 12, 0 of 10), with 5 of 5 against 0 of 6 in an earlier 4× CPU pass. Verified against the run's record; not re-run.
  • Claim: a second, fresh emulator with a Pixel 9 Pro profile gave 4 of 4 on main against 0 of 4 at this head. Verified against the run's record; not re-run.
  • Claim: an earlier emulator run on a related pull request's head with these five files applied held every press stamped before the release. Stated; that build's five files match this head's (verified), and the rest of its tree is the other pull request's.
  • Claim: one defect, no tag-alongs, no new public API, default or interaction model, and no internal context. Verified.
  • Claim (changeset): a tap during an entrance no longer acts when a long task ends the entrance, and it is held if it arrives within 500 ms of that end. Verified: isAfterLongTask and the wasHeldAt cap.
  • File packages/core/src/Layer/inputHold.ts: clear; two non-blocking comment notes.
  • File packages/core/src/Layer/inputHold.test.tsx: clear; 12 new cases fail with main's hold.
  • File packages/core/src/Layer/__tests__/inputHold.interaction.browser.spec.ts: clear; both new cases fail with main's hold.
  • File packages/core/src/Layer/__tests__/inputHold.fixture.ts: clear.
  • File .changeset/input-hold-late-press.md: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 21, 2026 23:57

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Engineering-owner approval at this exact head (e43cef4), posted by Cindy's agent on her instruction. CodeBunny approves at this head, CI is green, and the exact-head Android evidence is attached.

This branch was successfully deployed

1 active deployment
Preview — e43cef46 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants