Skip to content

DropdownMenu: a finger in the open menu is tracked as UIMenu's list tracks it - #8195

Closed
vjeux wants to merge 1117 commits into
meta:mainfrom
vjeux:uikit/c19-menu-selection
Closed

vjeux wants to merge 1117 commits into
meta:mainfrom
vjeux:uikit/c19-menu-selection

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8089, #8508, #8110. Review only this PR's change: vjeux/astryx@08a9bc9...eb42283

User need

A finger in an open DropdownMenu lights its row at once, and rows as a long menu scrolls. iOS waits, and scrolls with nothing lit.

Evidence

iOS 26.2 simulator, Safari (blue dot: finger). Resting finger (4× slower): main lights the row on the touch, this PR 152 ms later. Quick drag: main lights rows as it scrolls; this PR lights none.

main this PR
resting finger main this PR
quick drag main this PR

Android Chromium 158 (emulator, finger injected at 60 Hz): at rest, ~180 ms after main; nothing lit in the drag.

main this PR
resting finger (clip removed) (clip removed)
quick drag (clip removed) (clip removed)

Problem and solution fit

iOS 26.2, 3- and 30-row menus:

  • A resting finger lights its row ~160 ms in; the lift or a tap picks it.
  • A quick 40 pt drag scrolls the long menu, nothing lit, and scrubs the short one.
  • After a 200 ms rest, a drag still scrolls, clearing the highlight.

That is the list's content-touch delay (150 ms), now under every finger, Android included (AST-094); a mouse keeps the pointer model. MenuSelectionGestureRecognizer begins after that delay for a still finger, at the lift for a tap, at once after travel past the slop in a menu that fits; in a scrolling menu, travel fails it and the browser scrolls. A second finger ends it, nothing acting (FR4). It drives the shared tracker (#8110) while the menu shows. Where the primary pointer is fine (FR19, FR24) the menu joins no gesture system; a finger's tap acts once through the press model.

Current specification

spec:AST-094 FR26–FR30 govern a finger in the menu, its rows taking FR11's cell profile. module:DropdownMenu/useMenuPress (current) points there, unchanged.

Public delta and caller burden

Design and alternatives

Rejected: a pointer-machine timer (only an unclaimed recognizer leaves scrolling to the browser).

Writing rubric results

R1 narration: none.
R2 research: none.
R3 evidence: none in the record.
R4 rejected alternatives: none.
R5 change references: none.
R6 open questions: none.

Scope

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm vitest run hooks, DropdownMenu, ContextMenu, MoreMenu, Selector, MultiSelector, motion, gestures and utils at this head: 2843 passed, incl. a closed menu adding no listeners (DropdownMenu itself, without a visibility stub), a fine primary pointer joining no gesture system while a finger's tap acts once (it fails if the touch model's gate on the recognizer is removed), and a second finger on another row ending a coarse finger's press with its lit row cleared, in the gesture system's touch stream.
  • pnpm test:interaction DropdownMenuTouch* on that build: Chromium 28/28, WebKit (Playwright image) 23 + 5 skipped (no native pan from scripted touches); the DropdownMenu and MoreMenu a11y specs (Chromium) 152 passed, and fix(DropdownMenu): a cancelled touch clears the row a finger lit #8508's window-blur case runs on the gesture host's fix (fix(gestures): pointer-read fingers get the blur refusal and the pinch rule of the Touch Events path #8309 1be6b6c; MenuPress 18/18 at this head). The edge-autoscroll proof now lifts 12 px above the menu's bottom edge: at 4 px the point sat in the menu's 4 px bottom padding, so once the list reached its end no row was under the lift and nothing was picked (DropdownMenuTouchSelection at this head: Chromium 8/8, WebKit 7 + 1 skipped).
  • Android Chromium 158 emulator: the clips above.
  • pnpm build, pnpm typecheck and CI=true pnpm lint with no error; CLI isolation and golden reads 47/47; the CI duration guard's and motion node-load tests; check:knowledge, check:changesets.

Stack (merge in this order): #8076 and #8298 → #8078 → #8508 and #8186 → #8080; #8446 → #8089; #8083 → #8084 and #8346 → #8110; then this PR.

@vercel

vercel Bot commented Oct 24, 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 Oct 27, 2026 2:47am UTC

Request Review

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

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟡 Reviewed (for maintainers only) Oct 27, 2026, 3:47 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 24, 2026
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Modified Components

AlertDialog (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 191B 191B 0B
Lines of Code 182 473 -
Complexity Medium High (25) -
ContextMenu (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 1.1KB 1.1KB 0B
Lines of Code 678 678 -
Complexity Very High Very High (86) -
MoreMenu (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 219B 219B 0B
Lines of Code 87 87 -
Complexity Low Low (4) -

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 56.7KB 83.9KB +27.2KB ⚠️ 12.4KB 12.5KB +64B
core/AppShell 57.9KB 58.1KB +242B 11.6KB 11.6KB 0B
core/AvatarGroupOverflow 39.9KB 40.2KB +303B 6.4KB 6.4KB 0B
core/Banner 47.8KB 48.1KB +289B 9.9KB 9.9KB 0B
core/BaseTypeahead 54.3KB 54.6KB +246B 9.9KB 9.9KB 0B
core/BreadcrumbItem 66.4KB 81.6KB +15.2KB ⚠️ 11.0KB 11.0KB 0B
core/Button 43.3KB 43.5KB +273B 9.2KB 9.2KB 0B
core/Calendar 54.9KB 55.2KB +290B 10.0KB 10.0KB 0B
core/Carousel 50.2KB 50.5KB +316B 10.2KB 10.2KB 0B
core/ChatComposer 60.5KB 60.7KB +255B 10.8KB 10.8KB 0B
core/ChatComposerInput 55.6KB 55.8KB +252B 10.1KB 10.1KB 0B
core/ChatComposerTokenElement 55.6KB 55.8KB +252B 10.1KB 10.1KB 0B
core/ChatDictationButton 46.5KB 46.8KB +264B 9.5KB 9.5KB 0B
core/ChatLayout 48.8KB 49.1KB +273B 9.9KB 9.9KB 0B
core/ChatLayoutScrollButton 46.4KB 46.6KB +255B 9.6KB 9.6KB 0B
core/ChatSendButton 45.8KB 46.1KB +265B 9.2KB 9.2KB 0B
core/CheckboxInput 49.9KB 50.2KB +263B 9.3KB 9.3KB 0B
core/CheckboxListItem 54.0KB 54.3KB +230B 10.5KB 10.5KB 0B
core/ClickableCard 12.8KB 13.1KB +289B 6.9KB 6.9KB 0B
core/CodeBlock 60.5KB 60.8KB +278B 10.7KB 10.7KB 0B
core/Collapsible 11.7KB 12.0KB +291B 4.2KB 4.2KB 0B
core/CommandPalette 50.7KB 51.0KB +288B 11.8KB 11.8KB 0B
core/CommandPaletteItem 8.4KB 8.7KB +280B 3.5KB 3.5KB 0B
core/ComplexSelector 55.8KB 56.1KB +337B 10.6KB 10.6KB 0B
core/ContextMenu 77.7KB 92.8KB +15.1KB ⚠️ 14.5KB 14.5KB 0B
core/ContextMenuItem 16.6KB 16.8KB +290B 5.2KB 5.2KB 0B
core/DateInput 94.0KB 94.2KB +262B 14.6KB 14.6KB 0B
core/DateRangeInput 69.4KB 69.6KB +254B 11.2KB 11.2KB 0B
core/DateTimeInput 104.2KB 104.4KB +251B 15.1KB 15.1KB 0B
core/DialogHeader 48.8KB 49.1KB +280B 9.8KB 9.8KB 0B
core/DrawerHeader 48.9KB 49.2KB +249B 11.2KB 11.2KB 0B
core/DropdownMenu 72.7KB 102.5KB +29.8KB ⚠️ 14.6KB 14.6KB 0B
core/DropdownMenuCheckboxItem 16.1KB 16.4KB +284B 5.6KB 5.6KB 0B
core/DropdownMenuDivider 6.6KB 6.6KB 0B 3.6KB 3.6KB 0B
core/DropdownMenuGroup 6.1KB 6.1KB 0B 3.3KB 3.3KB 0B
core/DropdownMenuItem 15.4KB 15.7KB +287B 5.2KB 5.2KB 0B
core/DropdownMenuRadioGroup 6.0KB 6.0KB 0B 3.2KB 3.2KB 0B
core/DropdownMenuRadioItem 16.2KB 16.5KB +275B 5.6KB 5.6KB 0B
core/DropdownMenuSubMenu 58.1KB 72.9KB +14.8KB ⚠️ 9.5KB 9.5KB 0B
core/FileInput 54.1KB 54.3KB +211B 10.3KB 10.3KB 0B
core/IconButton 43.3KB 43.6KB +273B 9.2KB 9.2KB 0B
core/Item 11.4KB 11.6KB +273B 4.7KB 4.7KB 0B
core/LayerProvider 63.2KB 63.5KB +302B 10.1KB 10.1KB 0B
core/Lightbox 51.2KB 51.4KB +249B 9.8KB 9.8KB 0B
core/Link 43.5KB 43.8KB +288B 7.6KB 7.6KB 0B
core/ListItem 53.5KB 53.7KB +252B 10.5KB 10.5KB 0B
core/Markdown 144.5KB 159.5KB +15.1KB ⚠️ 17.2KB 17.2KB 0B
core/MobileNav 51.0KB 51.3KB +264B 10.1KB 10.1KB 0B
core/MobileNavToggle 46.2KB 46.5KB +259B 9.4KB 9.4KB 0B
core/MoreMenu 72.9KB 102.7KB +29.8KB ⚠️ 14.6KB 14.6KB 0B
core/MultiSelector 76.2KB 76.4KB +251B 14.5KB 14.5KB 0B
core/NumberInput 55.7KB 55.9KB +228B 10.7KB 10.7KB 0B
core/Outline 28.6KB 28.9KB +290B 4.0KB 4.0KB 0B
core/Pagination 87.7KB 102.3KB +14.6KB ⚠️ 15.2KB 15.2KB 0B
core/Popover 49.8KB 50.1KB +239B 12.0KB 12.0KB 0B
core/PowerSearch 149.1KB 163.8KB +14.7KB ⚠️ 18.5KB 18.5KB 0B
core/RadioListItem 52.1KB 52.4KB +275B 9.7KB 9.7KB 0B
core/SegmentedControlItem 8.6KB 8.9KB +285B 3.9KB 3.9KB 0B
core/SelectableCard 12.8KB 13.1KB +294B 7.1KB 7.1KB 0B
core/Selector 79.1KB 93.9KB +14.8KB ⚠️ 14.8KB 14.8KB 0B
core/SelectorOption 14.5KB 14.8KB +251B 5.1KB 5.1KB 0B
core/SideNav 58.0KB 58.3KB +272B 10.6KB 10.6KB 0B
core/SideNavCollapseButton 46.6KB 46.9KB +242B 9.5KB 9.5KB 0B
core/SideNavHeading 54.7KB 55.0KB +241B 10.1KB 10.1KB 0B
core/SideNavItem 54.4KB 54.7KB +265B 10.1KB 10.1KB 0B
core/Step 32.4KB 32.7KB +279B 5.3KB 5.3KB 0B
core/Stepper 47.4KB 47.7KB +265B 9.6KB 9.6KB 0B
core/Switch 48.4KB 48.7KB +280B 9.3KB 9.3KB 0B
core/Tab 9.7KB 10.0KB +294B 4.1KB 4.1KB 0B
core/TabMenu 51.6KB 51.9KB +274B 10.0KB 10.0KB 0B
core/Table 84.0KB 99.0KB +15.0KB ⚠️ 15.0KB 15.0KB 0B
core/TableCell 78.8KB 93.9KB +15.1KB ⚠️ 14.6KB 14.6KB 0B
core/TableHeaderCell 78.6KB 93.7KB +15.1KB ⚠️ 14.6KB 14.6KB 0B
core/TableSelectionToolbar 52.4KB 52.6KB +278B 11.2KB 11.2KB 0B
core/TextInput 53.5KB 53.8KB +250B 10.5KB 10.5KB 0B
core/Thumbnail 50.6KB 50.9KB +290B 11.0KB 11.0KB 0B
core/TimeInput 80.8KB 81.1KB +252B 13.6KB 13.6KB 0B
core/Timestamp 27.5KB 27.5KB 0B 9.5KB 9.5KB 0B
core/Toast 59.8KB 60.1KB +258B 9.7KB 9.7KB 0B
core/ToggleButton 44.1KB 44.4KB +243B 9.3KB 9.3KB 0B
core/Token 29.6KB 29.9KB +289B 4.5KB 4.5KB 0B
core/Tokenizer 64.8KB 65.1KB +297B 11.7KB 11.7KB 0B
core/TopNav 51.9KB 52.1KB +277B 10.4KB 10.4KB 0B
core/TopNavHeading 54.2KB 54.4KB +235B 9.9KB 9.9KB 0B
core/TopNavItem 9.0KB 9.3KB +283B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 54.2KB 54.4KB +264B 10.7KB 10.7KB 0B
core/TopNavMegaMenuItem 9.1KB 9.4KB +281B 4.1KB 4.1KB 0B
core/TopNavMenu 53.6KB 53.8KB +249B 10.1KB 10.1KB 0B
core/TreeList 32.5KB 32.8KB +274B 4.7KB 4.7KB 0B
core/Typeahead 61.5KB 61.7KB +281B 11.3KB 11.3KB 0B

Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included.

⚠️ Touch-only size budget

These components grew past the touch-only budget (2 KB gzip JavaScript or 1 KB gzip CSS per component). If the growth runs only on a coarse pointer, load its JavaScript lazily so the import does not carry it, or justify the cost in the pull request description; CSS stays in the package stylesheet, so justify it.

Component JavaScript CSS
core/AlertDialog +27.2KB ⚠️ +64B
core/BreadcrumbItem +15.2KB ⚠️ 0B
core/ContextMenu +15.1KB ⚠️ 0B
core/DropdownMenu +29.8KB ⚠️ 0B
core/DropdownMenuSubMenu +14.8KB ⚠️ 0B
core/Markdown +15.1KB ⚠️ 0B
core/MoreMenu +29.8KB ⚠️ 0B
core/Pagination +14.6KB ⚠️ 0B
core/PowerSearch +14.7KB ⚠️ 0B
core/Selector +14.8KB ⚠️ 0B
core/Table +15.0KB ⚠️ 0B
core/TableCell +15.1KB ⚠️ 0B
core/TableHeaderCell +15.1KB ⚠️ 0B

Bundle Size Summary

Gzip figures measure each package's entry file, not the code an import pulls in.

Package Entry (ESM) Entry gzip before Entry gzip after Delta
@astryxdesign/core 4.9KB 1.2KB 1.2KB 0B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 34.3KB 34.3KB +43B

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

55 of 502 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 753,933
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,072
RichTextEditor Markdown parity: side by side probe dark 558,840
RichTextEditor Markdown parity: side by side probe light 540,756
Chat Full AI Chat probe light 230,823
Chat Full AI Chat probe dark 229,805
AppShell With Mobile Nav probe light 217,010
AppShell With Mobile Nav probe dark 216,960
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
AppShell Playground neutral dark 65,198
AppShell Playground neutral light 63,788
Chat Default neutral dark 36,304
Chat Default neutral light 35,767
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232

and 35 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | 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.

This pull request cannot be approved yet. It intentionally changes module:DropdownMenu/useMenuPress FR2 and FR7 for fingers and adds the public touchTracking option, but the amendment lives only in the description. Write the amended claims into useMenuPress.spec.md on this pull request; an engineering owner then records the decision by commenting /approve-spec <full head SHA> (the author may do so as an engineering owner). These fixes are needed whatever that decision is:

  • Attach the selection recognizer only while the menu is open: today every mounted DropdownMenu installs the gesture host's document and window listeners, which is what fails CommentThread.test.tsx:552 in test-ui (2/4).
  • End the gesture with nothing acting when a second finger lands, as FR4 requires; the recognizer currently ignores it and the first finger's lift still picks a row.
  • Make .changeset/dropdownmenu-touch-selection.md a patch with a [feature] tag so required lint passes.
  • Land the predecessor pull requests first so this diff is its own 1,076 lines rather than 32,868.

[Automated review]

Comment thread packages/core/src/hooks/useMenuPress.ts Outdated
detach: () => void;
} | null>(null);
useIsomorphicLayoutEffect(() => {
const element = isSelectionEnabled ? options.menuRef.current : null;

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.

This attaches the selection recognizer whenever touchTracking is 'uikit' and the menu element exists, which for DropdownMenu is from its first commit, while the menu is closed. GestureHost.attach then installs 14 document and window listeners on every page that renders a menu; CI test-ui (2/4) fails on CommentThread.test.tsx:552 because of the new document pointercancel listener. Attach only while the menu is open (or on the first touch that lands in it) and detach on close.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 141c0a0: the recognizer attaches only while the menu shows. A menu in a popover follows the popover's beforetoggle; one outside a popover attaches while it is in the document. That replaces the isOpen option, which is gone. A jsdom case checks that a closed popover adds no document listeners and that the open attaches.

const isSelectionEnabled =
options.touchTracking === 'uikit' && (options.isEnabled ?? true);
useIsomorphicLayoutEffect(() => {
selection.setEnabled(isSelectionEnabled);

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.

architecture:react-component-runtime INV3 asks a new Effect to name the external system it synchronizes. Turning isEnabled off mid-press cancels the recognizer here, which reaches a consumer's onHighlight(null) through the tracker; a one-line comment naming the gesture recognizer covers it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 141c0a0: each effect names what it synchronizes (the recognizer's listener, its enabled flag, the gesture host).

}

protected override acceptsTouch(touch: GestureTouch): boolean {
// One finger selects; another landing while it is down is ignored.

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.

Current module:DropdownMenu/useMenuPress FR4 says the model MUST treat a second pointer as the end of the gesture with nothing acting. Ignoring the second finger lets the first finger's lift still run a row, and FR4 is not among the claims this pull request says it amends. Cancel (or fail) the press on a second touch and cover it in the DropdownMenu finger suite.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 141c0a0: a second finger cancels a press that has begun, or fails one that hasn't, so nothing acts. The touch itself isn't taken, so the browser's pinch is unaffected, and a late click for the first finger is swallowed. Two jsdom cases with two finger() contacts, before and after the row lights; both fail on the old code.

@@ -0,0 +1,7 @@
---
'@astryxdesign/core': minor

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.

Required lint fails on this file: the body needs a [category] tag, and while core is 0.x only [breaking] may declare minor (scripts/check-changesets.mjs). patch with a [feature] tag passes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 141c0a0: patch with a [feature] tag.

});
});

it('a mouse released outside closes the menu; a finger released outside leaves it open', async () => {

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.

The finger half of this case still dispatches touch-type pointer events, which the 'uikit' path ignores (useMenuPress.ts:912), so it passes without reaching finger tracking. Driving it with the finger() helper keeps current FR3 (a finger released outside leaves the menu open) covered on the new path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 141c0a0: the tracked-finger suite has a finger() case for FR3 (a finger lifted outside acts on nothing and leaves the menu open). DropdownMenu tracks every finger this way now, Android included.

@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.

This pull request cannot be approved yet. It intentionally changes module:DropdownMenu/useMenuPress FR2 and FR7 for fingers and adds the public touchTracking and isOpen options, but the amendment lives only in the description: write the amended claims and both options into useMenuPress.spec.md on this pull request, and an engineering owner then records the decision by commenting /approve-spec <full head SHA> (the author may do so as an engineering owner). These fixes are needed whatever that decision is:

  • End the gesture with nothing acting when a second finger lands, as FR4 requires; today the recognizer ignores it and the first finger's lift still picks a row.
  • Make .changeset/dropdownmenu-touch-selection.md a patch with a [feature] tag so the required lint check passes.
  • Document options.isOpen in useMenuPress.doc.mjs, and drive the FR3 finger test through the new finger path.
  • Land the predecessor pull requests first so this diff is its own 1,103 lines rather than 32,895.

[Automated review]

Comment on lines +88 to +93
protected override acceptsTouch(touch: GestureTouch): boolean {
// One finger selects; another landing while it is down is ignored.
if (this.numberOfTouches >= 1) {
return false;
}
return super.acceptsTouch(touch);

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.

Current module:DropdownMenu/useMenuPress FR4: "The model MUST treat pointercancel and a second pointer as the end of the gesture with nothing acting". Refusing the second touch here means the arena delivers it to nothing, so the first finger's lift still ends this recognizer and the tracker runs the row under it; FR4 is not among the claims the description amends. Cancel (or fail) the press when a second touch lands, and cover it in the DropdownMenu finger suite with two finger() contacts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 141c0a0; see the reply above (a second finger ends the press with nothing acting, covered with two finger() contacts).

@@ -0,0 +1,7 @@
---
'@astryxdesign/core': minor

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.

Required lint fails on this file at check:changesets ("body must start with a [category] tag"), and while core is 0.x only [breaking] may declare minor (scripts/check-changesets.mjs:91-94). '@astryxdesign/core': patch with a body that starts with [feature] passes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 141c0a0: patch with a [feature] tag.

* recognizer only while it is, so a closed menu adds no listeners.
* @default true
*/
isOpen?: boolean;

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.

isOpen is a new public option of an exported hook, and the record's Public contract row does not name it (nor touchTracking). Its default (true) also means a third-party caller who opts into 'uikit' and leaves it out attaches the gesture host's document and window listeners whenever the menu element exists. Worth settling with the owner whether the hook can work this out itself (for instance by attaching on the first touch inside the menu) before it becomes API.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 141c0a0: isOpen is gone. The hook works it out from the menu's popover (attached while it shows), so a third-party caller who opts into 'uikit' adds no listeners while the menu is closed. touchTracking is now in the record's Public contract row as proposed.

Comment on lines +1130 to +1137
useEffect(() => selection.addListener(onSelection), [selection, onSelection]);
const isSelectionEnabled =
options.touchTracking === 'uikit' &&
(options.isEnabled ?? true) &&
(options.isOpen ?? true);
useIsomorphicLayoutEffect(() => {
selection.setEnabled(isSelectionEnabled);
}, [selection, isSelectionEnabled]);

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.

architecture:react-component-runtime INV3 asks a new Effect to name the external system it synchronizes. Neither the subscription nor the enabled-flag sync does, and the second can reach a consumer's onHighlight(null): when isOpen or isEnabled turns false mid-press, setEnabled(false) cancels the recognizer and its listener cancels the tracker. One comment each naming the gesture recognizer covers it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 141c0a0: both effects name the gesture recognizer they synchronize, including that turning it off mid-press cancels the tracker.

});
});

it('a mouse released outside closes the menu; a finger released outside leaves it open', async () => {

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.

The finger half of this case still dispatches touch-type pointer events, which the 'uikit' path ignores (useMenuPress.ts:916-922), so it passes without reaching finger tracking. Driving it with the finger() helper over rows placed with placeRows keeps current FR3 (a finger released outside leaves the menu open) covered on the new path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 141c0a0; see the FR3 reply above.

Comment on lines 92 to 97
{
name: 'options.touchTracking',
type: "'pointer' | 'uikit'",
description:
"How a finger or pen that lands in the menu is tracked. 'pointer' (the default): the highlight follows it from the touch-down. 'uikit': as the list of an iOS menu tracks it \u2014 the row under a resting finger lights after UIKit\u2019s content-touch delay (150 ms), a tap acts at the lift, and in a menu that scrolls a finger that travels first scrolls it (nothing lights or acts) while in a menu that fits it slides the highlight at once. A mouse is unaffected.",
},

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.

options.isOpen is missing here, though this list documents every other option except the hitTest test seam. A builder who follows the docs and opts into 'uikit' will leave isOpen at its default and keep the recognizer attached while the menu is closed; an entry beside touchTracking saying why to pass it fixes that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

isOpen is removed, so there is nothing to document. The touchTracking entry says DropdownMenu and its sub-menus ask for 'uikit'.

cixzhang added a commit that referenced this pull request Oct 24, 2026
…presentation (#8273)

## Exact decision needed

Whether callers can keep a stable component's existing surface when the component gains touch behavior, and through what API.

## Existing authority searched

- `architecture:public-component-api` INV4 (keep derivable decisions internal), INV9 (released behavior changes under `spec:AST-017`), INV3 (one prop, one concept).
- `spec:AST-002` FR2–FR3: derivable differences, thresholds, and tuning stay internal.
- `spec:AST-017` FR3 and DEC-17: a functional default change names the prop that restores the old default; FR21 and FR27: an omitted experimental opt-in leaves stable behavior unchanged, which covers experimental surfaces only.
- No current record requires a caller opt-out for touch behavior on a stable component.
- Search terms: presentation, opt-out, touch default, restoring prop, adaptive, touch mode. Overlapping open pull requests: #8229 (Popover `presentation`), #8195 (DropdownMenu touch tracking), #8052 (AST-094 resolver), #8062 (shared touch resolver), #7977 and #8001 (touch sheets behind `experimental.presentation`).

## Decision

- `architecture:public-component-api` INV16: a stable component that, under a coarse pointer, presents a different surface or switches how an open surface follows input takes one `presentation` prop, and a value such as `presentation="popover"` keeps its fine-pointer surface on every device. Touch behavior is the default where it serves touch users; the caller's explicit choice always wins. Every such touch mode is reachable by callers; thresholds and tuning stay internal. Touch styling and touch-only behavior other records define (press paint, the iOS text-size floor, a row swipe, a tooltip's touch trigger) stay with those records.
- `spec:AST-017` FR3 and DEC-23: for a touch default, that `presentation` value is the restoring input the Changeset names.

## Rejected alternatives

- Touch behavior that callers cannot turn off or pin.

## Claim scope and non-goals

Caller control over touch presentations and modes on stable components. Which components adopt touch defaults, the touch behavior itself, and whether a given touch default is breaking stay with their owners.

## Evidence and implementation relationship

Selector, MultiSelector, DropdownMenu, MoreMenu, ContextMenu, and the date and time inputs already take `presentation`. Related open work, not edited here: #8229 adds `presentation` to Popover (its `'popover'` default conforms); #8195 adds a touch-tracking mode to DropdownMenu, which INV16 requires callers to be able to reach; the `spec:AST-094` revision in #8052 carries the touch presentation resolver. No implementation is included.

## Writing rubric results

- R1 narration: none.
- R2 research in the record: none.
- R3 evidence naming a change: none; verification names test states.
- R4 rejected alternatives over one line or outside a decision: one, inside DEC-23, one line.
- R5 pull request or issue references remaining: none.
- R6 ruled open questions still listing options: none.

## Scope

- [x] This PR contains specification records only.
- [x] It records observable behavior and preserves equivalent internal implementations.
- [x] Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
- [x] Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
- [x] It records one intentional durable decision, not a rescue for a separable tagalong.
- [x] The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
- [x] Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
- [x] Public text and artifacts contain no internal Meta context.

## Validation

- `pnpm check:knowledge` (CI lint)
- Prettier
- `git diff --check`
@cixzhang

Copy link
Copy Markdown
Contributor

Posted by Cindy's agent on her behalf.

Parts of this PR re-implement behavior that already exists, or is being specified, as a shared part of core. Converging keeps one implementation per behavior:

This is about where the behavior lives, not about the PR's intent.

@vjeux

vjeux commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Agreed: one implementation.

  • Slide to select: menuSelectionRecognizer's tracking moves onto the one shared tracker, with useMenuPress's (FR1–FR3).

vjeux and others added 2 commits October 26, 2026 15:37
…rns to joins that dip

Under Reduce Motion a call that names an opacity while an earlier dip's
move still waits to land took the dip branch. So a call naming the opacity
the dip already returns to, with no travel of its own, opened a second dip
from where the first had got to: mid fade out the element faded out twice,
and in the dip's own task the browser got a second, identical fade. A swipe
row's release does exactly that: its move's layer plays the travel as a
dip, then its state layer lands opacity 1 on the same element in the same
task. Such a call now joins the waiting dip: the planner returns joins, the
fade goes on as it was, the call takes the landing over and settles when
the dip ends, and the call it replaces lands with it, each value keeping
the call whose move it is. A call that names travel, or another opacity,
plans as before. Four tests (the planner's, mid dip, in the dip's task,
and a release played then landed) fail on the previous code.
Inside a trace, waitForAnimation and watch.started() read the element through
handles, which find no element rather than wait for one, so a wait on an
element the page removed rejected with "no animation started on the
element" instead of "the element is not in the document", unlike the
untraced path. At its deadline, a traced wait with no element now rejects
as missing. Traced twin of the missing-element self-test; it fails on the
previous code.

Co-authored-by: Christopher Chedeau <[email protected]>

@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.

This pull request needs changes before it can be approved. The finger model in an open DropdownMenu follows the engineering owner's ruling on the content-touch delay and matches its governing claims, so what remains is scope:

  • The architecture:layer-runtime INV13 and Exit copy text is still here, although an engineering owner asked for it to land only through #8186.
  • The diff carries fourteen open predecessor pull requests (35,670 authored lines against this change's own 1,900), including AlertDialog's new presentation prop, so landing them first, or rebasing once they merge, keeps this pull request to its own change.

[Automated review]

correct, and the runtime polls nothing: an anchor that a scrolled
container hides is followed again when an intersection observer reports it
back in view.
- **INV13 — One exit copy per closing layer.** A layer's close plays on at most

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.

An engineering owner asked for INV13 and its Exit copy section to come out of this pull request, since they belong to #8186; they are still here at this head, with their verification row, change-coupling and owning-code lines.

onAction,
width = 400,
width: widthProp,
presentation = 'adaptive',

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.

This default moves every existing AlertDialog to the touch alert under a coarse primary pointer. spec:AST-094 FR25 lists the released defaults touch presentations move and AlertDialog's is not one, and the draft AlertDialog record names no presentation. It arrives from #8083 and #8084; landing those first keeps it out of this pull request.

vjeux and others added 16 commits October 26, 2026 16:05
…med or not

The planner's comment on the cross-fade's length said it is not a theme
role and no theme lengthens it. Under spec:AST-094 DEC-11 no motion role is
themeable: the fade's length is no role at all, and nothing lengthens it.
A promotion keeps the stylesheet's will-change reasons beside its own, and
read them with getComputedStyle as it started: in a drag's first move, that
forces a style recalculation inside the input handler. The stylesheet's
value is now read in a task of its own after the element is attached, and
again after each demotion, so a promotion uses what was read. One that
comes before that read (an element attached in this task that moves at
once) still reads it then. A test that counts style reads in the promoting
task fails on the previous code; one for the element that moves at once
passes on both.
… edges only in their edge zone, an off-zone edge pan decides at 10 px) into the experimental touch layer
…rred unmount runs

It read will-change right after attach(null), before the unmount's
microtask, so it passed while that microtask could still promote the
element and leave timers behind. It now awaits the microtask, then checks
will-change and that no timer is left. It fails on meta#8521's earlier head
(97436b2), before the unmount cleared what the landing rebuilt.
…ith one passive listener and press-time document listeners

family:action-groups FR5 (and the AST-094 FR19/FR24 exception proposed with
it): the behavior applies to every pointer, mouse and pen included, so a
group must hear a press where the primary pointer is fine, where the host
otherwise registers nothing. attach() takes { actionGroup: true }: under a
fine pointer the group element gets one passive pointerdown listener; a
press on it adds document pointermove, pointerup and pointercancel
listeners (and window blur, plus the click listener for the click the lift
owes), and they go at the release. Only the group's own recognizers and
consumer take that press. Under a coarse pointer the host's usual listeners
serve the group, as every other recognizer.

Tests (failing first): idle under a fine pointer, only the group's one
passive pointerdown and nothing for a recognizer that is not a group; a
press adds the document listeners and the release removes them; a
recognizer that is not a group on the press path takes no part; detach
removes the group listener, and a coarse pointer keeps the usual
listeners.
meta#8056 landed squashed; main's motion README, animator and its tests equal
meta#8056's final head (2b264d3), so this PR's versions, built on that head,
stand.
…ond route around ./internal/*

Lab's per-module tsconfig paths (core's motion, gestures and
touchPresentation) and the Sandbox/docsite resolver that served them opened
a route around architecture:react-component-runtime INV13's ./internal/*
subpath exports. Nothing in Lab imports those paths here; they're dropped,
and the import guard now fails on any Lab import core doesn't export and on
any Lab tsconfig alias for core.

Co-authored-by: Christopher Chedeau <[email protected]>
 landed) into the experimental touch layer

# Conflicts:
#	packages/core/src/motion/README.md
…n a larger screen

Cindy's D27: menus stay beside their trigger; the covering placement is
rejected. The covering placement (centered over the trigger, 8 px off the
viewport's sides, opening upward from the lower half, its height cap and
first-row handoff) and its UIKit constants are removed; the menu takes the
layer's placement on every screen. A mouse open still creates no touch
motion (spec:AST-094 FR24), and the docs keep the content-touch-delay
wording. Tests: a phone's menu opens at the layer's placement and keeps the
caller's (jsdom), and below its trigger without covering it, from the upper
and the lower half (real browser).

Co-authored-by: Christopher Chedeau <[email protected]>
… detaches

The deferred unmount demotes the detached node, and demote asks for a fresh
will-change read; the detached node now gets none, so no timer outlives the
element (architecture:react-component-runtime INV5).

Co-authored-by: Christopher Chedeau <[email protected]>
…edge-zone strip decides at UIKit's 15 px

The host's arena environment had no viewSize, so under the real host a
screen-edge pan never saw its edge zone while a touch was down and decided
at 10 px, while its attach-time touch-action (read through the default
environment) had already claimed the axis (spec:AST-094 FR18).

Co-authored-by: Christopher Chedeau <[email protected]>
…into the menu placement

# Conflicts:
#	.changeset/gesture-browser-negotiation.md
#	.changeset/uikit-constants-table.md

@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.

This pull request needs changes before it can be approved. The finger timing in an open DropdownMenu follows current spec:AST-094 FR11, and what remains is listed below:

  • The architecture:layer-runtime INV13 and Exit copy text is still here, although an engineering owner asked for it to land only through #8186.
  • In a menu whose rows fit, the selection recognizer claims the finger once its press begins, while FR11 says that press stays unclaimed; leaving it unclaimed, as in a menu that scrolls, fixes it.
  • The diff carries seventeen open predecessor pull requests (31,798 authored lines against this change's own 1,905), including AlertDialog's new presentation prop, so landing them first, or rebasing once they merge, keeps this pull request to its own change.

[Automated review]

Comment on lines +105 to +107
override get claimsTouches(): boolean {
return !this.scrolls();
}

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.

In a menu that fits this returns true, so the press claims the finger once it begins (150 ms in, or after 10 px) and the gesture host gives the menu root its blocking touchmove listener. Current spec:AST-094 FR11 now records the ruling on this menu: "A press in a list that no scroll can claim stays unclaimed, which FR19 allows (DEC-14)." Returning false here, as a menu that scrolls already does, matches it; the menu's touch-action: pinch-zoom (useMenuPress FR4) still keeps a one-finger move from panning. The test at menuSelectionRecognizer.test.ts:129-132 and the header comment at :16-21 would change with it.

Comment on lines +475 to +480
- **INV13 — One exit copy per closing layer.** A layer's close plays on at most
one exit copy, made by `placeLayerExitCopy`: drawn where the layer was drawn,
inert, hidden from assistive technology, without ids, form names, or form
owner, shown only in the top layer, and removed by its owner when the close
settles. Placing a second copy for the same layer removes the first; another
layer's copy stays.

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.

An engineering owner asked for INV13 and its Exit copy section to come out of this pull request, since they belong to #8186; they are still here at this head, with their verified_by, verification, change-coupling and owning-code lines.

onAction,
width = 400,
width: widthProp,
presentation = 'adaptive',

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.

This default moves every existing AlertDialog to the touch alert under a coarse primary pointer. spec:AST-094 FR25 lists the released defaults touch presentations move and AlertDialog's is not one, and the draft AlertDialog record names no presentation. It arrives here from #8083 and #8084; landing those first keeps it out of this pull request.

onActivate: row =>
activateRef.current(row, syntheticRelease(row, releaseRef.current)),
}));
useEffect(() => () => trackerRef.current?.dispose(), []);

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.

Minor: architecture:react-component-runtime INV3 asks a new Effect to name the external system it synchronizes; a one-line comment saying this releases the tracker's fade timers at unmount covers it.

@vjeux

vjeux commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

In a menu whose rows fit, the press still claims the finger once it begins, which the review's second point flags: spec:AST-094 FR11 now says a press in a list that no scroll can claim stays unclaimed (DEC-14). One commit on this head, vjeux/astryx@308d3d5...562e5b5, makes claimsTouches return false there as it already does in a menu that scrolls; the menu's touch-action still keeps a one-finger move from panning. Its recognizer case checks that a begun press claims nothing, which fails at this head. The same commit names what the tracker's unmount Effect releases (the review's fourth point). It's yours to take or leave.

@vjeux
vjeux marked this pull request as draft October 29, 2026 22:33
vjeux pushed a commit to vjeux/astryx that referenced this pull request Nov 3, 2026
…egan-elsewhere; a recognizer's own scroll is not the browser taking the finger

From CodeBunny on meta#8195, fixed once here where the host enters:
- spec:AST-094 FR28: a touch with no recognizer or consumer on its path
  never reached the arena, so a recognizer tracking a finger was never
  told about a second finger beside it (a menu press could not end on
  one). GestureArena.untrackedBegan reports such a touch to recognizers
  that are tracking touches; it creates no record, claim or lock, and its
  moves and end stay the page's.
- spec:AST-094 FR30: a recognizer that scrolls a scroller itself (a menu's
  edge autoscroll) was cancelled by its own write. The internal
  GestureHost.ownScroll(scroller) makes onScroll skip that scroller until
  two frames pass; a real pan in that window still reports itself through
  pointercancel or touchcancel.
Three tests; two fail on the previous head.
@vjeux vjeux closed this Nov 4, 2026
cixzhang added a commit that referenced this pull request Nov 10, 2026
…ugh the layer runtime's presentation hold (#8591)

* Merge #8176 (b38d1eec84) into the Chrome-on-Android ride

#8176's head merges #8076's 4adaf8b77e (main 61480b5c with #8257). No
conflicts; `timing.ts` is #8176's, with #8484's keyboard export.

* test(gestures): attaching reads no computed style

The host read getComputedStyle(element).touchAction at a recognizer's
first attach, to keep a caller's own touch-action in force; inside a
mount that forces a style recalc over everything just mounted (C21's
200-row year wheel: 9.2 ms at 1x, rows written afterward recalc again).
Failing on this head: attaching calls getComputedStyle, and a caller's
stylesheet value is intersected at once. A caller's inline value applies
at once with no read; a stylesheet's is checked after the frame has
painted.

* perf(gestures): attaching reads no computed style

A caller's inline touch-action is the style's own, read with no recalc, and
applies at once. A stylesheet's needs a computed read, which now waits
until the next frame has painted, when styles are clean, instead of
running inside the attach, where it forced a style recalc over whatever
had just mounted. The check is batched: the host's own values come off
every pending element, one read serves them all, and the writes follow.
Until it runs (a frame or two after the element mounts) the host's own
value stands, so a caller's narrower stylesheet value can read wider for
that long; no touch starts on an element in the frame it mounts in.

* Merge #8309 (#8076 4adaf8b77e; the lock after admission; no style read on attach) into #8315

* Merge main (#8257: the touch motion roles are internal) into the motion clock and Reduce Motion plan

The motion README takes main's internal-roles sentence with this layer's
animator; uikit.test.ts takes main's version (rows, docAbove) and keeps the
check of values bound from an exported group, which timing.ts's Reduce
Motion fade bindings need.

* Merge 3d201a04ee (#8056 with main through #8257's landing) as a dependency

* docs(core): each gesture hook Effect names what it syncs

architecture:react-component-runtime INV3 asks every Effect to name the
external system it synchronizes: the listener ref, the recognizer's
target-action listener and isEnabled, the host attachment, the tracker's
options, tracking expansion, press consumer and enabled state, the unmount
flag, and the attachment's node.

* docs(motion): the animator, README, reducedMotionFade and the browser proof describe the roles' table values (DEC-11)

* Merge #8067 (f581948d) into the motion-role animator

* perf(keyboard): one layout read per keyboard change, shared by every reader

architecture:react-component-runtime INV11 allows the keyboard module at
most one layout read per keyboard change. `getMobileKeyboardHeight`
measured again on every call, and the layout guide, each component's
`useKeyboardHeight` and ChatLayout's commit all call it after the module
has already measured the report: one show read the visual viewport's
height 6 times in Full AI Chat in Chromium, 13 times in the module's test
with the guide, a listener and two hooks.

While the module listens, `getMobileKeyboardHeight` returns the height it
measured at the last report. Every change of the visual viewport or the
window is a report, so a reader between two reports still sees the current
height; with nothing listening yet, it measures.

Tests: the module's test counts one read for a report with the guide, a
listener and two hooks reading the height (red before: 13), and an
interaction test counts one read for a show in Full AI Chat (red on the
previous build: 6).

* fix(ChatLayout): a text control composer tapped with nothing focused is focused without the reveal

spec:AST-099 FR4 says every route into the composer's text, a tap
included, focuses it without scrolling the page. The tap route claimed only
contenteditable text: a `<textarea>` or `<input>` passed as ChatComposer's
input (its documented plain textarea) was left to the browser, and with
nothing focused no blur reaches the focus takeover, so Safari revealed the
field by scrolling the document.

The tap route now claims an unfocused text control in the composer that
brings up a keyboard, and delivers it as it delivers contenteditable text:
focused with `preventScroll`, with the caret where the standard
`caretPositionFromPoint` maps the point inside the control, or after its
text where the browser maps none. A focused control keeps its own taps (the
browser moves the caret); a checkbox or an `inputmode="none"` field is never
claimed.

Tests (useChatKeyboard.test.tsx): ChatLayout with a textarea composer,
under a coarse pointer, cancels the tap's default and focuses the textarea
with `preventScroll` (red before: the browser's own focus); the claim takes
an unfocused text control and leaves a focused one, a checkbox and an
`inputmode="none"` field; the caret lands at the mapped offset, or after
the text.

* docs(ChatLayout): the composer rides in step in Safari; in Firefox and Chrome it moves once reported

spec:AST-099 FR8 asks a ride within one frame of the keyboard on the
measured keyboards, with Android emulator evidence against Gboard; Firefox
for Android has FR2–FR5 only, and reports the keyboard once it is up. This
branch plays UIKit's keyboard spring from the browser's report there, and
times no ride to Gboard. The docs said the composer rides in step in
Firefox for Android and rides the keyboard in Chrome on Android.

ChatLayout's docs (English, Chinese, dense), the browser-support guide and
the changeset now say: in Safari on iOS the composer rides on top of the
keyboard in step with it; in Firefox for Android and Chrome on Android it
moves above the keyboard once the browser reports it; under Chrome's
`interactive-widget=resizes-content` it stays above it without moving.

* fix(motion): a hidden element lends no borrow, and a stop that finishes a dip lands its move with it

Under Reduce Motion on a touch screen:
- A move over a stylesheet opacity of 0 dips nothing (it lands at once), but
  kept 0 as a borrow that outlived it, so a later move once the element
  showed read it as invisible and landed in view. A borrow now exists only
  while its dip runs.
- stop() on a dip's opacity finished the fade but left the move's pending
  jump to land later, at opacity 1. A finished fade now lands the travel
  waiting for it at the same instant.

* refactor(interaction): the animation-state waits move to their own pull request

This pull request keeps curve sampling (hold, seek, sample, release, the
curve end); the recorder, waitForAnimation, watchAnimations and waitForRest,
with their self-tests, land separately on top. The holding self-tests that
waited with them now poll the page for a running or idle animation. Chromium:
19 tests, 5x repeat, pass.

* feat(interaction): animation-state waits for interaction proofs

The harness's animation-state instruments, split out of the curve-sampling
pull request so each stays reviewable:

- a page-side recorder that sees every animation from its first frame or
  creation, so one that starts and ends before a test looks is still
  reported, with its finish time and start (kept when the page cancels it);
- waitForAnimation: the running animations on an element past a minimum
  progress, or the ones that finished since the last wait, with their curve
  interval through the playback rate (a run going backward is dated from
  when it began);
- watchAnimations: a watch taken before an action, for an entrance on a
  page's first contact;
- waitForRest: rest judged by presented transform, translate, rotate, scale
  and opacity, not playState, so an end value held by the keyframes is not
  waited out, and a backward run's end delay and curve are.

Self-tests cover each in real Chromium.

Co-authored-by: Christopher Chedeau <[email protected]>

* Merge main (2af4d305: #8257, the motion roles internal) into the animator

# Conflicts:
#	packages/core/src/motion/README.md
#	packages/core/src/motion/uikit/uikit.test.ts

* Merge main (2af4d305) into the experimental touch layer

* Merge #8055 (89614c7f: a hidden element lends no borrow; a stop that finishes a dip lands its move); a pseudo-element's own opacity hold is owned

Conflicts in animator.ts take this layer's Reduce Motion plan, which gains
#8055's rule in its own terms: a stylesheet that hides the element lends
nothing, so the move lands at once with no dip and no borrow. #8055's stop
rule already holds under the plan (the opacity pass lands the waiting move);
its test passes unchanged. uikit.test.ts takes #8055's ordering.

Also fixed (CodeBunny on 3d201a04): a pseudo-element shown with
set({opacity: 1}) over a stylesheet that hides it holds that value with an
animation, which now counts as an owned opacity (writesOwnOpacity), so a
move or a fade by role returns to it instead of borrowing the hiding 0.

* Merge 5d9e4ec203 (#8056 on #8055's 89614c7f with a pseudo-element fix) as a dependency

* Merge #8076 (bd9246df: main 2af4d305 with #8257) into the keyboard module

# Conflicts:
#	packages/core/src/BottomSheet/BottomSheetPanel.tsx

* docs(motion): coast's edge spring plays its table value; scroll.bounce is not a motion role

* Merge #8073 (8a8ac32170: the hooks follow a replaced node and name their Effects; #8072 61e891d73d) into #8076

Both of cixzhang's rules kept: #8073's useNodeAttachment (a replaced node
re-attaches, deps re-attach, each Effect names what it syncs) and #8076's
guards, so neither the isEnabled sync's cancel nor a press tracker's
release calls a caller back from an Effect. Both sides' tests stay.

* Merge #8176 (af953bdb: #8076 and main 2af4d305) into the Popover's grow from its trigger

A semantic merge:
- Popover.tsx: the grow-from-trigger motion (usePopoverSurfaceMotion) sits
  beside main's bottom-sheet presentation (usePresentationSurface and the
  controlled-surface latch). It runs only when the anchored layer shows; a
  render-prop trigger records its anchor through setRenderTrigger.
- motion/uikit/springs.ts takes main's per-spring constants and adds
  POPOVER_PRESENT_SPRING and POPOVER_DISMISS_SPRING with their rows;
  index.ts and the motion README list both keyboard and popover.
- layer-runtime.md takes main's INV14/INV15 status paragraph.

* Merge #8067 (7b26ef27: #8056 5d9e4ec2, #8055 89614c7f) into the motion-role animator

* Merge the maintainer's #8176 head (af953bdb9f) into the keyboard module

Her af953bdb9f merges #8076's bd9246df2e (main 2af4d305, with #8229's
Popover presentation) into this branch, with her resolution of
BottomSheetPanel.tsx against #8229. No conflicts with this branch's
commits since 2d520a6a9c: the result is her head plus those commits (the
keyboard-height Effect's INV3 comment, one layout read per keyboard
change, the text control tap route, and the Safari/Firefox/Chrome docs).

`timing.ts` checked: #8076's with exactly #8484's change.

* Merge bd9246df2e (#8076 with main) as a dependency

# Conflicts:
#	packages/core/src/gestures/GestureHost.ts

* Merge #8176 (e0a88c4f08) into the Chrome-on-Android ride

#8176's local head reads the layout once per keyboard change, focuses a
text control composer tapped with nothing focused without the reveal, says
the composer moves above the keyboard once reported in Firefox and Chrome
for Android, and merges the maintainer's af953bdb9f (#8076's bd9246df2e,
main 2af4d305 with #8229). No conflicts; `timing.ts` is #8176's.

* test(core): drop the delegated-pressable selection case; the host no longer has delegated consumers

#8076 carries the host without delegated consumers, which nothing used,
so #8309's FR41 case for a delegated pressable has no subject left. The
press-tracked and attached cases still cover native selection on a hold
that does nothing (spec:AST-094 FR41).

* Merge #8309 (3ccbd7a2: #8076 bd9246df, main, the host's injected lock) into the gesture hook fixes

* docs(ChatLayout): in Chrome on Android the composer rides Gboard's slides in step

#8176 says the composer moves above the keyboard once Chrome reports it,
since it times no ride to Gboard (spec:AST-099 FR8 asks a ride within one
frame of the keyboard, with Android emulator evidence). This branch times
the ride to Gboard's measured slides, with that evidence: ChatLayout's docs
(English, Chinese, dense) and the browser-support guide say the composer
rides Gboard's slides in step in Chrome on Android, while a Tall
BottomSheet makes its room once Chrome reports the keyboard. Firefox for
Android keeps #8176's wording: it moves once Firefox reports the keyboard.

* Merge #8076 bd9246df2e (main 2af4d305a6)

# Conflicts:
#	docs/architecture/layer-runtime.md

* Merge #8076 (bd9246df2e: main 2af4d305a6) into #8270

* Merge #8270 (#8076 bd9246df2e) into #8309

* Merge cixzhang's #8309 head (3ccbd7a2ab: #8076 bd9246df2e merged in, the delegated-pressable case dropped)

Her merge and her test change are kept; this PR's after-paint touch-action
check and the zero-delay lock case stay beside them.

* test(gestures): the gesture host bundles only the UIKit groups it reads

Every recognizer and press tracker attaches through the host, so what it
imports ships with every touch component (architecture:component-style-
authoring INV6). The esbuild bundle of the host alone must carry the press
and click groups it reads and never the whole table. It fails on this head:
the host imports UIKIT_GESTURES, the union of every group (the same test as
the offer on #8072).

* perf(gestures): the gesture host imports only the press and click groups

The host read its values off UIKIT_GESTURES, the union of every group, so
any component attaching a recognizer or press tracker bundled all eleven
groups. It imports UIKIT_PRESS and UIKIT_CLICK (#8468's per-group exports),
as the offer on #8072 does at that layer, and the bundle test passes.

* Merge #8309 (#8076 bd9246df2e; her restack; the host's per-group imports) into #8315

* Merge cixzhang's #8315 head (2a0d0650e3: her #8309 restack)

* Merge #8315 (2a0d0650: #8309, #8076 bd9246df, main 2af4d305) into the host line

GestureHost.ts keeps this branch's host additions: the per-event press
tracker's option, the page holds, a kept press's manipulation style, and
listening for a finger-scroll watch, on its coarse-pointer gate. It also
takes the lower line's rule that a disabled recognizer leaves the browser
everything (FR24), and a passed-in coarse read is read again on each
update. GestureHost.test.ts keeps this branch's kept-press and selection
lock tests beside the lower line's.

* Merge 993a4ca926 (#8336 resolved against main through #8315 and #8309) as a dependency

* perf(core): the gesture host reads the haptic switch's marker from a one-constant module

From #8320's check, fixed once here: the host imported
HAPTIC_SWITCH_ATTRIBUTE from haptics.ts, which pulled the whole haptics
module into every component that attaches a gesture. The marker now lives
in gestures/hapticSwitch.ts, which both the host and haptics.ts import, so
a component that plays no haptic pays nothing for it. haptics.ts still
re-exports the constant.

* fix(motion): a release past an edge springs back as a Reduce Motion cross-fade, not as momentum

Under Reduce Motion on a touch screen, decay(coast(...)) for a release past
an edge sprang back with travel at full opacity. That spring is a transition
the release starts, not a throw's momentum, so DR2's momentum exemption does
not cover it. coast marks such a curve `isTransition`, and decay hands it to
animate's Reduce Motion path (a cross-fade on a coarse pointer, at once on any
other); a coast that reaches an edge keeps its momentum, bounce included.

* Merge #8309 (7f48c369: the haptic switch marker in its own module) into the gesture hook fixes

* docs(interaction): the waits read a run reversed before it starts; a mid-run reverse or replay reads as its first run

Co-authored-by: Christopher Chedeau <[email protected]>

* Merge #8055 (15c71e1f: under Reduce Motion a coast's spring back is a transition, not momentum)

decay() keeps momentum to the translate axes and takes #8055's rule: under
Reduce Motion a curve marked isTransition (coast()'s spring back from past
an edge) plays through animate(), so the plan cross-fades it or lands it at
once, and the handle's finished waits for both. #8055's test steps the
clock to the plan's landing.

* Merge main (#8044 landed) into the animation-state waits

# Conflicts:
#	internal/interaction-harness/README.md
#	internal/interaction-harness/src/curves.ts
#	internal/interaction-harness/src/harness.interaction.browser.spec.ts

* Merge #8315 (83c36b4b: #8309's haptic switch marker in its own module) into the host line

* Merge #8258 (370c4d9e: the roles' table values in the docs; #8067 through her #8056 and #8055 fixes) into the experimental touch exports

* Merge cixzhang's #8309 head (7f48c369b5: the haptic switch marker in its own module)

* refactor(core): the plan's stop needs no step-segment landing; the steps flag goes

Under the Reduce Motion plan no segment is a step function: a waiting move
is a landing, and stop() lands it through cancelLanding('opacity'). The
step-segment landing block #8055 adds to stop() never runs here, nor does
the steps flag's sampling branch; both go.

* Merge #8309 (her haptic switch marker module folded) into #8315

* Merge cixzhang's #8315 head (83c36b4b06: her #8309 merge)

* Merge 1e5d0f4f98 (#8056: the dead stop() step-segment block removed) as a dependency

* Merge #8505 (e8b0bb62: main with #8044, plus the animation-state waits) into the storyboards

# Conflicts:
#	internal/interaction-harness/README.md

* fix(core): a finger on page content reaches tracking recognizers as began-elsewhere; a recognizer's own scroll is not the browser taking the finger

From CodeBunny on #8195, fixed once here where the host enters:
- spec:AST-094 FR28: a touch with no recognizer or consumer on its path
  never reached the arena, so a recognizer tracking a finger was never
  told about a second finger beside it (a menu press could not end on
  one). GestureArena.untrackedBegan reports such a touch to recognizers
  that are tracking touches; it creates no record, claim or lock, and its
  moves and end stay the page's.
- spec:AST-094 FR30: a recognizer that scrolls a scroller itself (a menu's
  edge autoscroll) was cancelled by its own write. The internal
  GestureHost.ownScroll(scroller) makes onScroll skip that scroller until
  two frames pass; a real pan in that window still reports itself through
  pointercancel or touchcancel.
Three tests; two fail on the previous head.

* Merge #8072 (347f0aca: FR28 began-elsewhere for untracked fingers, FR30 ownScroll) into UIControl press tracking

* Merge #8348 (main with #8044 and #8505's waits) into the frame evidence

* Merge #8045 (main with #8044 and #8505's waits) into the recorder stand-down

# Conflicts:
#	internal/interaction-harness/src/curves.ts

* fix(Popover): a touch that lands while the popover grows takes no input; its springs import by name

- spec:AST-094 FR35: while the touch presentation grows, a touch that
  lands is held. Its end is cancelled, which in Chromium also cancels the
  popover's light dismiss and the touch's click, so a tap outside, on the
  trigger or inside closes nothing, activates nothing and moves no focus;
  a one-finger drag scrolls nothing; a pinch still zooms (FR10). The hold
  listens only while it grows or such a touch is down.
- INV6: the motion imports POPOVER_PRESENT_SPRING and
  POPOVER_DISMISS_SPRING by name and registers no table: they are this
  component's measured values, not motion roles (spec:AST-094 DEC-11).
- layer-runtime.md: Current gaps keeps this line's shared exit copy (INV13,
  placeLayerExitCopy) beside main's Popover sheet-hold sentence.

* Merge #8446 (7d946d25: the harness line on main with #8505's waits) into the experimental touch layer

* test(Popover): FR35 in a real engine: a tap or drag during the grow reaches nothing

A real-touch browser test (Chromium, touch events through the harness):
a tap outside and a tap on the trigger that land while the popover grows
leave it open with focus where it was, and a one-finger drag scrolls
nothing; once it has grown, the same tap outside light-dismisses it. It
fails on the previous head (the half-grown popover closes).

* Merge 7d946d259b (#8446 resolved against main, #8044 landed) as a dependency

* Merge 5b691cda71 (main) as a dependency

* docs(motion): decay's docs and the changeset say a transition curve cross-fades under Reduce Motion

* Merge ee34b25079 (#8076 with the resolved harness line, #8446 7d946d25) as a dependency

* Merge 5b691cda71 (main) as a dependency

* Merge #8270 (#8076 ee34b25079: main 4444d70bd7) into #8309

* Merge #8076 (ee34b25079: main 4444d70bd7 with #8505's waits, through her #8446) into #8270

* Merge #8309 (#8076 ee34b25079: main 4444d70bd7) into #8315

* Merge #8073 and #8258 (2c572082: #8073's hooks follow a replaced node; #8258's docs with her #8067, #8056 and #8055 fixes) into the experimental touch layer

* Merge #8073 (b600a78a: began-elsewhere for untracked fingers and a recognizer's own scroll, from #8072) into the experimental touch layer

* fix(interaction): openStory turns Storybook's highlight module off

Storybook 10's highlight module observes #storybook-root and, on every
insertion, reads the computed style of every element on the page inside the
inserting task: one exit copy in a Button story carried 117 getComputedStyle
calls and two forced style recalculations, which a proof then counted as the
component's.

openStory sets the module's own __STORYBOOK_HIGHLIGHT_INITIALIZED before the
preview runs, so the module returns at once, and checks that its root element
is absent once the story renders (a Storybook that stops reading the flag
fails loudly). openStory(…, {storybookHighlight: true}) keeps it on, in a page
that has not turned it off. A self-test on a built story counts the reads and
style recalculations an insertion carries: none by default, every element's
with the module kept on.

* fix(interaction): a trace sets apart only the harness's own reads, never a test's evaluate

traceRendering filed every DevTools-run task that set off no page script in
devtoolsTasks. A test's own page.evaluate that calls page code directly
(a story's API, a hook) leaves no listener or timer in the trace, so its
work was filed there too, and a "no long task" proof passed over it.

The harness now marks its own page-side reads (console.timeStamp with
HARNESS_READ) in waitForAnimation and in blockMainThread without during.
devtoolsTasks holds only tasks that carry that mark and ran no page script;
every other long task, a test's evaluate included, is the page's. The
self-test adds a 60 ms page function a test's evaluate calls directly: it is
a long task, and without the mark in waitForAnimation its read is one too.

* Merge #8270 (the host header and changeset without delegated consumers) into #8309

* docs(core): the host header and the press changeset describe no delegated consumer

The gesture host has no delegated consumers and no scroll handoff, so its
header drops both, and one changeset covers the press tracking, the one
press writer and the hooks. Both texts are cixzhang's from c34bf734ea on
#8073, taken verbatim so the next #8076 merges without a conflict.

* Merge #8309 into #8315

* Merge #8309 (dd8e9462: #8076 ee34b250 with the harness line, main) into the gesture hook fixes

* fix(gestures): a keepsTouch press tracker keeps only the touch whose press it delivered

After a tap quicker than the content-touch delay, the flash shown at the
lift marked the tracker kept, and nothing cleared it, so the next touch on
a held control was kept from its first move: the host cancelled a scroll
starting there before its press was delivered (spec:AST-094 FR19).
finish() now clears the kept state, keepsTouch answers only for a tracked
touch, and a press delivered while a quick tap's flash still shows keeps
its touch.

* Merge #8315 (b9c536ff: #8309 dd8e9462, #8076 ee34b250, the resolved harness line and main) into the host line

* fix(interaction): a wait keeps waiting while the action's animation is pending

waitForAnimation and watch.started() left pending animations (no start time
yet) out of the running set, so an earlier animation that had finished
answered for the one the action started. A pending animation in scope now
keeps the wait going. Self-test: a short animation ends, then a longer one
starts; the wait returns the longer one (it returned the 40 ms one before).
The README and JSDoc say how a mid-run reverse or replay is misread.

Co-authored-by: Christopher Chedeau <[email protected]>

* docs(gestures): the host header drops the delegated-consumer paragraph

The delegated consumer was removed from the host on this branch; its
header paragraph went with it only in name.

* fix(motion): a held identity follows a node replacement, a mixed release is one handle, and REDUCED_TRANSITION keeps createAnimator's docs

- attach rebuilt only channels away from identity, so an identity the
  animator held inline over a stylesheet that differs (set({opacity: 1}) over
  opacity 0) was never written on the node that replaced the element; the
  new node showed 0 while get() read 1. The held identities now carry through
  a detach to the next node.
- decay under Reduce Motion with one axis past an edge and another coasting
  returned a handle that covered only the coasting axis; stop() left the
  cross-fade to land. The handle now covers both calls.
- REDUCED_TRANSITION moves above createAnimator's doc comment.

* test(interaction): openStory's highlight self-test runs in both engines

Storybook's highlight module scans the page on every insertion in WebKit as in Chromium, so the self-test now counts the insertion's getComputedStyle calls in both engines; only Chromium's trace counts the style recalculations they force. It no longer serves Storybook for an engine it skips.

* Merge #8055 (7ad0455a: held identities follow a node replacement; one handle for a mixed release); decay's Reduce Motion docs

- attach(): #8055's held identities, plus a pseudo-element's: its identity
  hold (a static animation the attach cancels) is held again on the next
  node; a borrowed opacity is never held. Test: a ::backdrop's hold follows
  a node replacement.
- decay(): #8055's single handle for a release with one axis past an edge,
  with `started` covering both calls. Under this layer's plan a stop
  finishes the cross-fade and lands that axis at once, while invisible, so
  #8055's test checks that nothing moves after the stop.
- Docs: the header, decay()'s and MotionCurve's comments, the motion
  README and the changeset now say that a curve marked isTransition (a
  coast's spring back from past an edge) plays through the Reduce Motion
  policy: a cross-fade on a coarse pointer, at once elsewhere.

* Merge f60e87d2cd (#8056 on #8055's 7ad0455a: held identities across a replacement, one handle for a mixed-axis release) as a dependency

* Merge 79a7a902b8 (main) as a dependency

* Merge #8270 (main 5b691cda71) into #8309

* Merge cixzhang's #8309 head (dd8e9462f5: #8076 ee34b25079 and main 5b691cda71)

* Merge main (5b691cda71) into #8270, as cixzhang's #8309 does

* Merge #8309 (her third pass folded: #8076 ee34b25079, main 5b691cda71) into #8315

* Merge cixzhang's #8315 head (b9c536ffab: her #8309 merge)

* fix(interaction): a traced waitForRest skips scroll- and view-timeline animations

Inside a trace, waitForRest waits on timers for each animation's scheduled
end. A scroll- or view-timeline animation (DateInput's wheel rows) has none:
its time is a percentage, the wait came out NaN, and the timer re-armed with
no delay until the deadline, where the untraced wait rests. It now skips
animations that are not on the document timeline, as holdAnimations does.
Self-test: a scroll-timeline row inside a trace; it rejected at the deadline
before (Chromium, 3x repeat pass).

* fix(Popover): the input hold typechecks; FR35's browser test taps 47 ms into the press

- The hold's listeners are added and removed in two branches: indexing
  the document with a union method name lost the TouchEvent overload
  (TS2345).
- The real-touch test now plays the outside tap 47 ms after the trigger's
  press began (17 ms after the popover opened) in one script, and checks
  that focus stays in the popover, where its opening put it. Repeated 3
  times in Chromium it passes; on a Storybook without the hold the
  popover closes.

* Merge #8505 (9320644717: a wait keeps waiting while the action's animation is pending) into the frame evidence

* docs(layer-runtime): Current gaps takes main's INV14/INV15 paragraph

The shared exit copy's record (INV13) belongs to its own pull requests;
this one leaves the paragraph as main has it.

* Merge #8076 (ee34b250: the harness line from #8446) into the keyboard module

trace.ts takes #8446's long-task and DevTools-task split and keeps this
line's opt-in invalidation, animation and script records.

* Merge main (79a7a902) into the keyboard module

* fix(interaction): the busy verdict judges a sparse cast from its first moved frame, and the harness's waits run on the real timers

With a compositor record, the moved criterion counted every compositor
frame in the judged part, but only a gap between two moved frames can be
credited to the compositor, so the frames before the first and after the
last moved frame read as misses: at one screencast frame in six, a
composited animation failed in 5 of 7 runs, where the same frames passed
without the record. The criterion now counts the compositor's frames from
the first to the last moved frame; the gaps before and after are the stall
check's, which already measures the window's edges.

blockMainThread(..., {during}) and sampleRects waited on the page's own
requestAnimationFrame and setTimeout, which freezeTimers holds, so neither
settled under a frozen timer gate, though the harness's own waits are
documented as not held. They now run on the gate's real frame and timeout
(the gate exposes its real setTimeout too). A unit case at one frame in six
and a self-test under a frozen gate fail on the previous code.

* fix(interaction): a scroll- or view-timeline animation does not hold up a wait

waitForAnimation and watch.started() counted a scroll- or view-timeline
animation (DateInput's wheel rows) as running; it never progresses on its
own, so the wait never answered with the animation that finished and
rejected at its timeout. Only document-timeline animations count now, as for
holdAnimations. Self-test: a scroll-timeline row beside a short animation
that ends; it rejected before (Chromium, 3x repeat pass). The installCurveEnd
doc comment sits above installCurveEnd again.

Co-authored-by: Christopher Chedeau <[email protected]>

* test(interaction): the trace verdict's fixture carries devtoolsTasks, which #8446's RenderingTrace requires

* Merge #8176 (626bceb6: #8076 ee34b250's harness line and main 79a7a902) into the Popover's grow from its trigger

* Merge #8176 (626bceb6b0) into the Chrome-on-Android ride

#8176's head, from the maintainer, merges #8076's ee34b25079 (#8446's
harness line, with main's #8044 curve sampling) and main 79a7a902, and
gives the trace verdict's fixture its devtoolsTasks. No conflicts;
`timing.ts` is #8176's, with #8484's keyboard export.

* fix(gestures): a kept press keeps only the touch it tracks

keepsTouch answered for the consumer, not for a touch, so a second finger
landing on a held control had its moves cancelled though the tracker
ignores it (spec:AST-094 FR19). TouchConsumer.keepsTouch now takes the
touch's id; PressTracker keeps only its tracked touch, and the host asks
for the moving finger.

* docs(motion): the animator's SYNC list and test header name only files this layer has, and coast says a transition lands at once on a fine pointer

* Merge #8446 (9d5c20a8: the harness line on #8505's waits) into useAnimator's browser proofs

* Merge #8076 0d1a829741 (main 4444d70bd7 with #8446, #8073, #8258)

* revert(Popover): the grow-time input hold leaves this pull request

The Popover-local touch hold (createGrowthInputHold) and its tests are
taken out. The stack delivers spec:AST-094 FR35 through the layer
runtime's presentation hold (layer-runtime INV14: a component uses the
runtime's hold rather than building its own), and the real-touch proof
travels with that change. The springs imported by name and main's
layer-runtime paragraph stay.

* Merge #8055 (8fc7f2ef: coast says a transition lands at once on a fine pointer); the changeset says the same

animator.test.ts keeps this layer's header (no compositor browser spec in
this layer). The changeset now says decay sends a spring back from past an
edge through the Reduce Motion policy: a cross-fade on a coarse pointer, at
once elsewhere.

* docs(core): the gestures README says a cell's highlight waits only inside a scroll view

The press profiles' README said a cell's highlight always waits the
content-touch delay. PressTracker waits it inside a scroll view and lights
at once outside one (spec:AST-094 FR11), as its own header says; the README
now says so too.

* Merge 79dc151e53 (#8056 on #8055's 8fc7f2ef: the Reduce Motion changeset wording) as a dependency

* refactor(core): the animator's Reduce Motion planner is its own module

What one call becomes under Reduce Motion (an opacity-only cross-fade
whose travel lands while the element is transparent, or everything at
once; a dip on a borrowed stylesheet opacity) moves from createAnimator's
closure to reducedMotionPlan.ts, a pure planner that reads the animator
through a view and returns the plan; the animator turns the plan into its
segments and runs the landings. No behavior change: the animator's tests
pass unchanged, and the planner has its own.

Co-authored-by: Christopher Chedeau <[email protected]>

* Merge #8076 (0d1a829741) into the Chrome-on-Android ride

#8076's head is a fast-forward of the ee34b25079 #8176 carries: #8073's
began-elsewhere for untracked fingers and a recognizer's own scroll, and
the motion roles' table values in the docs. No conflicts; `timing.ts` is
#8076's with exactly #8484's change. This branch takes it ahead of #8176,
whose next head brings it too.

* refactor(core): play(curves) and pseudo-element support move to stacked pull requests

This pull request keeps the animator's Reduce Motion plan (now its own
planner module), the browser-set start of a call from rest, promotion,
atRest, rebase and animatorFor. Two features it carried move up the stack,
each with its own tests and changeset:
- play(curves), baking any closed-form curve like a spring;
- driving a pseudo-element (a dialog's ::backdrop).
The changeset is split the same way.

Co-authored-by: Christopher Chedeau <[email protected]>

* feat(core): the animator plays any closed-form curve

play(curves) bakes any curve given as value and velocity functions of
time (a spring chasing a moving target from solveSpringTowardRamp, a
fitted UIKit curve) exactly like a spring: presentation values,
velocities, stop, finished and the shared clock work the same, a later
animate starts from the curve's value and velocity, and under Reduce
Motion a curve that moves is travel the policy replaces. Tests and a
changeset of its own.

Co-authored-by: Christopher Chedeau <[email protected]>

* feat(core): the animator drives a pseudo-element

createAnimator(element, {pseudoElement: '::backdrop'}) animates a
pseudo-element: with no inline style, a static filling animation holds
its value after a curve ends and after set; a custom property on its host
promotes it; a Reduce Motion dip borrows and hands back the
pseudo-element's own opacity, and its holds follow a node replacement.
animatorFor keeps one animator per element and pseudo-element. Tests and
a changeset of its own.

Co-authored-by: Christopher Chedeau <[email protected]>

* test(interaction): the long-task self-test judges the harness read, not the page's frames around it

"a harness read inside a trace is not the page's long task…" also asserted
that no long task started anywhere in the read's window. On CI's runner each
frame of the fixture's 1,200 running rows took 51-54 ms, the page's own long
tasks, and failed it; at 4x CPU locally they take 126-220 ms. The read
itself was set apart correctly.

The test now asserts the read's own classification, and removes the rows
before the timer, click and direct-call windows, so each holds only its own
work. It passes at 4x CPU, where the previous assertion failed.

* Merge #8505 (462d82caaf: a scroll- or view-timeline animation does not hold up a wait) into the frame evidence

* Merge branch 'interaction-harness-3-frames' into uikit/f3-recorder-standdown

* perf(utils): the scrollbar thickness is measured once per document and zoom

`layoutViewportHeight` took a classic horizontal scrollbar out by
measuring its thickness with a probe element on every call where the page
overflows horizontally: the probe writes to the document and forces a
layout, and the keyboard module's measurement, BottomSheet's obstruction
and ChatLayout's lift each call it per keyboard change, so one change
cost more than the one layout read
architecture:react-component-runtime INV11 allows.

The thickness does not change between reports: it is measured once per
document and device pixel ratio (a browser zoom changes how many CSS px a
classic scrollbar takes) and reused.

Test (useMobileKeyboard.test.ts): three measurements of a wide page with
15 px scrollbars probe once (red before: 3). A test-only reset keeps each
test's scrollbars its own.

* docs(changeset): in Chrome the composer moves once reported, and a Tall sheet adds its room

The browser-support changeset said the on-screen keyboard's components
"ride the keyboard" in Chrome by default, which contradicts the guide it
announces ("move above the keyboard once Chrome reports it"), and a Tall
BottomSheet never moves: it adds scroll room. The changeset and the guide
now say that in Chrome ChatLayout's composer moves above the keyboard once
Chrome reports it and a Tall BottomSheet adds its scroll room then, and
that under `interactive-widget=resizes-content` neither changes.

* fix(interaction): a scroll-driven animation at its end is not a finished curve

waitForAnimation's finished branch read every recorded animation, so a
scroll- or view-timeline animation that reached its end (a scroller scrolled
to its end) came back as finished with a NaN duration and interval. The
recorded set now keeps document-timeline animations only. The scroll-timeline
self-test scrolls its scroller to the end first; it returned the NaN entry
before (Chromium, 3x repeat pass). The README, JSDoc and file header name
watchAnimations where they list what moves the wait window and what the file
exports.

Co-authored-by: Christopher Chedeau <[email protected]>

* Merge 2cb04fe6f6 (#8522, the top of #8056's split: core, play(curves), pseudo-element support) as a dependency

# Conflicts:
#	packages/core/src/motion/README.md
#	packages/core/src/motion/animator.ts

* Merge f1b4c05434 (main) as a dependency

* Merge #8505 (a9be409b35: a scroll-driven animation at its end is not a finished curve) into the recorder stand-down

* fix(Popover): a fine-pointer open releases the touch presentation's listener; layer-runtime.md is main's

- After one touch open, a later fine-pointer open only reset the motion
  and left its beforetoggle listener on the popover (spec:AST-094 FR24).
  It now releases the motion with its listener. Test: a touch open, then a
  fine-pointer one, removes the listener.
- docs/architecture/layer-runtime.md goes back to main's: the exit copy's
  record belongs to its own pull request.

* Merge #8287 (dbac8444ff) into the keyboard module: Chrome on Android rides Gboard

spec:AST-099 FR8 asks Core's keyboard-aware surfaces to ride the keyboard
in Chrome on Android within one frame of it on the measured keyboards, and
DEC-2 rules out a one-step relayout; on its own this branch played UIKit's
keyboard spring from Chrome's report. #8287's Chrome work comes in here, so
the change conforms on its own: Gboard's measured slides
(`motion/android/keyboard.ts`), the keyboard model's Chrome profile, the
guide's schedule picked by the VirtualKeyboard capability, `rideKeyboard`,
and their tests. #8287 closes as folded in.

Conflicts, resolved:
- The browser-support guide takes #8287's Chrome sentence (the composer
  rides the keyboard as Gboard slides it), with this branch's correction
  that a Tall BottomSheet adds its scroll room once Chrome reports the
  keyboard, and that under `resizes-content` nothing changes.
- The changesets: ChatLayout's says the dock rides in step in Safari on
  iOS and in Chrome on Android (Gboard's measured slides) and moves once
  reported in Firefox for Android; #8287's own changeset folds into it and
  is removed. The browser-support changeset says the same for Chrome.

* Merge main (30a4a2b3: #8055 landed) into the animator's Reduce Motion plan

Main carries #8055 as one commit; this branch already had its head
(8fc7f2ef), so the merge keeps this branch's animator, coast, test and
changeset files over it and takes main's other changes as they are.

* Merge #8056 (main with #8055 landed) into play(curves)

* Merge #8521 (main with #8055 landed) into pseudo-element support

* Merge f0819b956e (#8522 with main through #8055's landing) as a dependency

* fix(gestures): a watcher cancels no press under it; a page hold keeps its finger through a second one

- A recognizer that never claims (a watcher) no longer cancels its view's
  touches when it recognizes: a held press and a click under it stay
  (spec:AST-094 FR11, FR19). Its simultaneity with every recognizer is
  FR15's watcher exemption (DEC-7).
- A page hold forgot its finger once a second finger touched down; it now
  keeps the first finger's verdict, cancels nothing while two are down, and
  holds the first finger again once it is alone.
- usePressTracker says keepsTouch is fixed when the tracker is created.
Tests for the first two fail on the previous head.

* Merge #8067 (f9f1162c: #8522, main through #8055) into the motion-role animator

# Conflicts:
#	packages/core/src/motion/animator.ts

* Merge #8258 (dcfecc93: #8067 f9f1162c, main through #8055) into the experimental touch layer

# Conflicts:
#	.changeset/uikit-motion-animator.md

* refactor(core): drop the animator's unused TRAVEL alias

The travel list moved to the planner with the Reduce Motion plan; nothing
in the animator reads it any more (no-unused-vars).

* fix(keyboard): one reveal-pan watch puts a browser's own pan back, for ChatLayout too

Chrome 124 on Android (the emulator image's Google Chrome, with Gboard)
animates its own reveal of the focused composer about 150 ms after the
keyboard's report: the visual viewport pans down by the keyboard's whole
height (0 to 312 px over 130 ms) while the composer is still riding up,
so the composer ended mid-screen with ~370 px of page between it and the
keyboard (spec:AST-099 FR4: focusing the composer never pans the page).
Chromium 158 does not pan.

BottomSheet already put such a pan back (built for Firefox for Android)
inside its own hook. That detection and restore is now the keyboard
module's one building block, `watchRevealPan(window, {owns})`:
`report()` on each report that changes the height; `isRevealPan(height)`
when the visual viewport has since moved down with no touch, document
scroll or zoom, while a text field the caller owns has focus; `putBack()`
pans the visual viewport back without scrolling the document by
scrolling into view a probe fixed where it sat at the report (or the
element given). BottomSheet's hook uses it with its full-viewport dialog
as before; ChatLayout watches under a finger (spec:AST-094 FR24) and puts
the pan back on its first frame.

Tests:
- ChatLayoutKeyboard (interaction, Chromium and WebKit): after a
  keyboard show, a simulated pan by the keyboard's height is put back and
  the visual viewport rests at 0 (red before: no put-back).
- useMobileKeyboard.test.ts: the watch sees a pan of an owned field, and
  leaves alone a touch since the report, a document scroll, a zoom and a
  field it does not own; putBack scrolls a fixed probe at the report's
  offset into view and removes it, or the anchor given; its one listener
  lives only while it watches.
- Android emulator (Gboard): Chrome 124 and Chromium 158, two shows each:
  the visual viewport's offsetTop stays 0 in every sampled frame and the
  composer rests on the keyboard's top edge (frames checked).

* Merge 2267ee5154 (#8076 with main through #8055's landing, via #8067 and #8258) as a dependency

# Conflicts:
#	packages/core/src/gestures/GestureHost.ts

* Merge dbcfc30f7a (main) as a dependency

* Merge #8076 2267ee5154 (main through #8055)

* Merge #8076 (2267ee5154) into the keyboard module

#8076's head folds main through #8055's landing (the compositor
animator) and is a fast-forward of the 0d1a829741 #8287 brought in. It
merges cleanly with main dbcfc30f7a, which this branch's previous base
no longer did. No conflicts; `timing.ts` is #8076's with exactly #8484's
change.

* Merge #8076 (2267ee5154: #8073's fold with her b600a78a, main through #8055 via #8258) into #8270

The host locks selection for the touches the arena admitted, then tells
the arena about each untracked finger (her began-elsewhere): both loops
run after the arena begins the touches.

* docs(core): the gestures README gives a control's release the shared deselect clock; the animator changeset drops its no-component clause

The press profiles' README gave a control UIButton's 0.25 s release.
PRESS_PROFILES releases every surface on the list's deselect clock until a
control runs its own release, as its comment says; the README now says so.
Its test list still credited VelocityTracker's tests with checking each
strategy against the true velocity, though one filter remains: it now
names what they check. The animator's changeset said no component uses
it, which goes false in the release that carries the components that do.

* fix(interaction): a watch stamps after the newest entry, and an exit removed at its end is still reported

- Arming the recorder now records first and stamps strictly after the
  newest entry: a watch taken right after a step that changed style no
  longer reports that step's transition (created by the arm's own style
  read) as started after it.
- Each entry keeps its target's ancestors as recorded, so an exit whose
  element the page removes at its end is still reported for the container
  it left, instead of a wait rejecting with nothing recorded.

A self-test for each; both failed before (Chromium, 3x repeat pass).

Co-authored-by: Christopher Chedeau <[email protected]>

* test(core): the FR30 own-scroll case moves its finger past the press slop first

#8309 lets a scroll under a finger that has not travelled the press slop
leave the touch where it is (the page's own scroll, not the finger's pan).
The FR30 case from #8072 used a still finger, so after the merge its
unannounced scroll no longer dropped the touch for the right reason. The
finger now travels 30 px (a tolerant long press keeps tracking it) before
the recognizer's own write and the unannounced scroll that follows, so the
case checks ownScroll alone.

* Merge #8309 (a9208c41: #8076 2267ee51, main through #8055) into the gesture hook fixes

# Conflicts:
#	packages/core/src/gestures/useGestureRecognizer.ts

* test(core): the animator's tests drop an unused import and binding

solveSpringTowardRamp went with play(curves)'s tests, and a coast test
destructured an element it never reads (no-unused-vars).

* fix(interaction): after an on-screen start, the busy verdict judges the frames it credits as skipped

With a compositor record and an on-screen start, the moved criterion counted
from the first moved frame after the on-screen frame, while the gap from the
on-screen frame to it was credited as frames the screencast skipped. When the
cast skipped the frames right after the on-screen start, those credits had
no place in the denominator: four unmoved frames that fail on a full cast
("31 of 35 expected frames moved") passed as "26/30 moved and 5 skipped by
the screencast (103%)", and a clean run read 117%.

The criterion now counts the compositor's frames from the on-screen frame,
so both sides cover the same frames: the skipped cast fails like the full
one, and a clean run reads at most 100%. A busy.test.ts case pins all three.

* Merge #8505 (02ff48fafe: a watch stamps after the newest entry, and an exit removed at its end is still reported) into the frame evidence

* fix(gestures): the arena reaches deliverBeganElsewhere through internals on the new path too

#8309's new began-elsewhere fan-out calls the recognizer's protected
plumbing directly; #8315 keeps that plumbing behind internals().

* docs(Popover): the dismissal cites the shared exit copy as main's layer-runtime INV14

* Merge #8315 (e1dfdff9: #8309 a9208c41, #8076 2267ee51, main through #8055) into the host line

GestureHost.ts:
- selection locks follow the lower line's rule (only once the arena has
  admitted the contact) and keep this branch's press-tracker lock: the
  admitted consumer's lock joins the recognizers' at that moment;
- the pointer stays followed by this branch's watcher (watchPointer,
  pointerChanged), so the lower line's media-query listener is not added
  twice;
- the lone-finger pan check reads a pan by its shape, so the host bundles
  no pan module (the lower line's bundle test).
Tests: both sides' host tests; the browser spec keeps both sides' real-touch
tests, and its fixture bundles are development builds.

* docs(keyboard): rewrap two file headers the fold left uneven

The keyboard entry's @output and useChatKeyboard's @input carried a
line past the column and a broken wrap after the reveal-pan watch and
the Chrome timing came in. Comments only.

* fix(core): under Reduce Motion a move lands only while the element is transparent

A call with travel (or a waiting landing) whose opacity rose from a visible
value landed its travel at once, in view, and one whose opacity fell to a
visible value landed at the end of its fade, in view. The entrance branch
now applies only from 0 and the exit branch only to 0; any other such call
dips (fades out, lands at the bottom, fades back to its opacity), as
design:reduced-motion DR1 and DR2 ask. The tests read the opacity at the
moment the travel lands.

* docs(Popover): the touch layer cites component-style-authoring INV6 and the global touch module

Touch-only code a pointer page carries is INV6's rule. Components use the
global touch module once it is installed (proposed in #8464), so
per-component lazy swaps are paused and this module's cost is carried until
that module lands.

* Merge #8186 (df04ef94: the layer runtime's exit copy and its INV13 record) into the Popover's grow from its trigger

This branch carried #8186's earlier commits, and its layer-runtime.md had
been set back to main's, which dropped the exit copy's record (INV13, the
Exit copy section and their coupling, owning-code and verification rows)
that #8186 adds. It now carries #8186's head, and layer-runtime.md is
#8186's exactly, so the INV13 citations in layerExitCopy.ts and
popoverSurfaceMotion.ts hold.

* fix(gestures): a page hold judges a new touch afresh when it reuses an identifier

The hold kept its record for any touch that listed the held identifier, so
a new touch reusing it after the first lifted inherited the old start point
and verdict: a list pan after a backdrop pan was cancelled, and a backdrop
pan after a list pan scrolled the page (spec:AST-094 FR19). Only a finger
already down keeps its record now; the test fails on the previous head.
Also: the host's changeset says the touch components adopt it, rather than
that they use it, and a test drops an unused binding.

* docs(layer-runtime): Current gaps notes Popover's latched anchored presentation

Popover latches the presentation it chose at the open (the touch grow or
the pointer entrance) until the close settles, a presentation hold of its
own (INV14). Current gaps records it beside its sheet presentation's hold;
Popover adopts the runtime's presentation hold when that lands.

* Merge #8045 (e05cdd163a, on #8505 02ff48fafe) into the recorder stand-down

# Conflicts:
#	internal/interaction-harness/src/curves.ts

* Merge #8336 (5a59ef2e17) into #8342

cixzhang's #8336 with her Android page-hold fix, mergeable with main; on top of her 04ff5dcc50. No conflicts; the hold's files are unchanged.

* Merge #8076 (1346af4990: the README's control release and test list, the animator changeset) into #8270

* Merge #8270 (09aa3f1883 with #8076 1346af4990: the README's control release and test list) into #8309

* Merge #8309 (#8270 09aa3f1883, #8076 1346af4990) into #8315

* Merge #8315 (#8270 09aa3f1883, #8076 1346af4990) into #8336

* fix(interaction): waitForAnimation and a watch's started() stand down while a trace runs

Polled inside a traced body, each look added a Layout of an anchored element in every frame (24 in the anchored fixture's steady middle). Four reads did it, each alone: Playwright's locator.evaluate (each call makes a main-thread frame), the recorder's document-wide read, an unwatched wait's element.getAnimations(), and effect.getComputedTiming(), which updates a running animation on demand and restyles its target. While a trace runs, record() from outside the recorder and arm()'s read stand down; the wait takes the element's animations from the recorder's log, judges a started one by its own times (playState only before it has a start time), reads timing through getTiming(), and reaches the element through a handle to what the locator matches at each look. The same window now lays out 0 times.

* fix(core): a handle's stop freezes its waiting Reduce Motion travel where it is

Under the Reduce Motion plan a call's travel waits in a landing, with no
segment, so handle.stop() stopped only the call's fade, and the fade's
landing then wrote the travel at once while the element was still visible.
The handle now stops the call's waiting travel too, before its fade, as
animator.stop() does: a catch freezes the element where it is on screen
(spec:AST-094 FR6). Tests: a stop mid-dip, and a release with one axis past
an edge, keep the travel where it was.

* Merge main (#8505 landed) into the storyboards

# Conflicts:
#	internal/interaction-harness/README.md
#	internal/interaction-harness/src/curves.ts
#	internal/interaction-harness/src/harness.interaction.browser.spec.ts

* Merge #8348 (main with #8505 landed) into the frame evidence

# Conflicts:
#	internal/interaction-harness/src/curves.ts
#	internal/interaction-harness/src/harness.interaction.browser.spec.ts

* Merge #8045 (main with #8505 landed) into the recorder stand-down

# Conflicts:
#	internal/interaction-harness/src/curves.ts

* Merge #8446 (63218c8a: the harness line on main 42a30b47 with #8505) into the experimental touch layer

* docs(Popover): its changeset says Popover is the exit copy's first user

The exit copy's own changeset says nothing uses it, which is true of that
change alone; Popover's says its shrink plays on the copy, so the two read
right when they ship together.

* Merge 0400cb2e4d (#8076 with main through #8055's landing) as a dependency

* fix(Layer): embedded content stands in the exit copy as an empty box of its size

A deep copy re-creates embedded content: an iframe navigates again, autoplay
media restarts and a canvas comes back blank. Before the copy is inserted,
each iframe, object, embed, video, audio and canvas in it is swapped for an
empty box with the copied node's classes and inline style, sized to the live
node's box; the live layer is untouched. A test per kind (all six failed
before).

* Merge #8186 (0ba0b6b9: the exit copy leaves embedded content as empty boxes) into the Popover's grow from its trigger

* Merge 6c688655c6 (#8270 with #8076 0400cb2e and main 42a30b47) as a dependency

* Merge #8309 (a8650574: #8076 0400cb2e with the harness line on main) into the gesture hook fixes

* fix(core): a carried Reduce Motion move keeps its own call

When a later call carried an earlier call's waiting move, the landing knew
only its own call: setting or stopping the carried move settled the later
call as interrupted (and the earlier one later as finished), an earlier
handle's stop could freeze the later call's move on the same property, and
a call whose property a later call took over still resolved finished. Each
landed value now keeps the call whose move it is: setting or stopping it
settles that call, a handle stops only its own values, and a move a later
call takes over settles interrupted. Three tests fail on the previous head.

* Merge #8076 (0400cb2e: the harness line on main 42a30b47 with #8505) into the keyboard module

* test(gestures): the host never writes a touch-action wider than the author's, at any frame

spec:AST-094 FR18 as #8453 (DEC-8) rules it: the derived value is never
wider than the author's. The host wrote its own value at attach and read a
stylesheet's only after paint, so for a frame or two a trigger's none read
as manipulation. The case reads the author's none in the first frame and
sees nothing written before it; an element attached on screen gets its
value at that frame. Both fail on this head.

* fix(gestures): the host reads an author's touch-action in the next frame and writes nothing before it

An inline author value is the style's own and applies at once. A
stylesheet's is read once, batched, in the next frame's callback before it
paints, before the host has written any touch-action: the read styles
what that frame must style anyway, the first paint already shows the
intersection, and no frame ever shows a value wider than the author's
(spec:AST-094 FR18, DEC-8). An element attached on screen goes without its
derived value until that frame, under one. The tests that read the write
in the attach itself now take that frame first.

* test(gestures): the press tracker bundle carries only the UIKit groups it reads

NumberInput's stepper and every control reach PressTracker, which imports
the whole UIKIT_GESTURES table for three of its groups, so every one of
them ships the table (architecture:component-style-authoring INV6). The
bundle test now builds PressTracker beside the host; it fails on this
head.

* perf(gestures): the press tracker imports only the UIKit groups it reads

UIKIT_PRESS, UIKIT_PAN's hysteresis and UIKIT_CONTROL's tracking
expansion, by name: object properties do not tree-shake, so the whole
UIKIT_GESTURES table no longer ships with every control
(architecture:component-style-authoring INV6).

* test(gestures): a press tracker disabled under the finger reports nothing

Disabling a usePressTracker control while a finger is on it reported
touchCancel from the commit when it was the only enabled control (the
host's listener sync cancelled the press inside the Effect), and
touchUpInside at the lift otherwise. A disabled control tracks no touch,
and an Effect calls back no caller (react-component-runtime INV2, INV3).
Both cases fail on this head.

* fix(gestures): a press tracker disabled under the finger ends its press inside the release guard

The listener sync ends a press whose control is now disabled, and runs
the host update, with the release guard set: a disabled control tracks no
touch, so the lift reports nothing, and the Effect calls back no caller
whether the host stops listening or another control keeps it listening.

* Merge #8309 (the next-frame author read; the press tracker's per-group imports) into #8315

# Conflicts:
#	packages/core/src/gestures/__tests__/useGestureRecognizer.test.tsx

* Merge #8315 (d6a58453: #8309 a8650574, #8076 0400cb2e with #8446, main 42a30b47) into the host line

* Merge #8176 (e14f901e: #8076 0400cb2e with #8446's harness line, main 42a30b47) into the Popover's grow from its trigger

* docs(gestures): the haptic switch's label rule says what the code does

attachTapHaptic leaves a label alone when its control is tied by for, or
is itself a switch; a label wrapping its own control gets a switch that
hands each tap on to that control. The file header and the README said a
label that already labels another control gets none.

* Merge #8315 (#8309's next-frame author read; a tracker disabled under the finger; the haptic label rule) into #8336

* test(gestures): the host-line cases take the frame the host writes touch-action in

#8309's host reads an author's touch-action and writes its own in the
next frame (spec:AST-094 FR18, DEC-8). The cases here that read that
write (a kept press's manipulation, the pointer turning coarse, a
per-event-pointer swipe, a watcher beside a claiming pan) run that frame
first; what they check is unchanged.

* fix(interaction): the WebKit container runs as the invoking user under docker

Docker ran the Playwright image as root over the bind-mounted checkout, so
the test-results/ it wrote were root's and the next host run failed with
EACCES clearing them. Under docker the container now runs with the host uid
and gid (HOME=/tmp); rootless podman already maps the user. The README says
so.

* docs(interaction): a traced waitForAnimation on a CSS @keyframes animation still flushes its style

The traceRendering JSDoc and the README said waitForAnimation and a watch's
started() stand down inside a trace. That holds for script animations and
CSS transitions; on a CSS @keyframes animation (and, unwatched, a cancelled
CSS transition) they read the animation's timing, which flushes its style.
Both now say so and point to waitForRest or a wait after the trace.

* Merge 2c2397b981 (#8336 on #8315 d6a58453) as a dependency

* Merge #8336 (8588156218) into #8342

F2's line on her #8336 2c2397b981, mergeable with main; it carries #8270 6c688655c6. On top of her c32c2ba7e0; no conflicts; the hold's files are unchanged.

* fix(core): a held call still finds its start; a caught dismissal fades straight back; promotion keeps the stylesheet's will-change

- A call whose animations something paused before their first frame (a
  harness holding them, a page pausing every animation) never read a start,
  so a Reduce Motion move's landing never ran and the element stayed
  transparent. The call keeps looking each frame while its animations are
  paused without a start, until they resume (their start) or finish (its own
  clock).
- Under Reduce Motion a call that sets a value still waiting to land takes it
  over (the earlier call settles interrupted), and once nothing waiting is
  left, a call naming its own opacity replaces the earlier fade back in or
  restore: re-presenting a sheet mid-dismissal fades straight back up from
  where it was instead of dipping.
- Promotion merged only the element's inline will-change, so it replaced a
  stylesheet's will-change for the motion's length; without an inline value
  it now keeps the stylesheet's reasons beside its own and hands them back.
Three tests fail on the previous head.

* test(gestures): the host marks a recognizer's touch-action under a rule an author rule outranks

A touch-action written after a fresh subtree's first styling restyles
every descendant: opening the 200-year wheel spent 17.6 ms (4x CPU) on a
second recalc of its 218 elements when the host wrote its value in the
next frame. The cases ask for a mark set as the recognizer attaches, a
zero-specificity rule in the document or shadow root, the author's rule
in force from the first frame and the intersection written only where it
is narrower (spec:AST-094 FR18, DEC-8), and the mark gone at detach. All
four fail on this head.

* fix(interaction): rootless docker runs the WebKit container without --user

Rootless Docker maps the container's root to the invoking user, and any
other container uid to a subordinate host uid that cannot write the mounted
checkout, so --user made the WebKit run fail with EACCES there. The script
passes --user only to a rootful daemon (docker info reports no
name=rootless); the README and header say so.

* test(gestures): in a browser, the host's touch-action is in force from the attach, and a fresh subtree is styled once

Chromium and WebKit: an element reads its derived touch-action in the
attach's own task, an author rule's narrower none outranks it, and a
shadow root's element gets it too. Chromium's trace: a 300-row subtree
that mounts with a recognizer is styled once; today the host's next-frame
write restyles all 301 elements a second time. Both fail on this head.

* perf(gestures): the host marks a recognizer's touch-action under a rule an author rule outranks

As a recognizer attaches, the element carries the derived value in
data-astryx-touch-action, and its document or shadow root holds one
zero-specificity :where() rule per value (an adopted sheet, or a style
element where constructable sheets are missing). A subtree that mounts
with it is styled once: opening the 200-year wheel no longer restyles its
218 elements a second time in the next frame. Any author rule or inline
value outranks the mark, so from the first frame the value in for…
cixzhang added a commit that referenced this pull request Nov 10, 2026
…er runtime's presentation hold (#8590)

* test(gestures): attaching reads no computed style

The host read getComputedStyle(element).touchAction at a recognizer's
first attach, to keep a caller's own touch-action in force; inside a
mount that forces a style recalc over everything just mounted (C21's
200-row year wheel: 9.2 ms at 1x, rows written afterward recalc again).
Failing on this head: attaching calls getComputedStyle, and a caller's
stylesheet value is intersected at once. A caller's inline value applies
at once with no read; a stylesheet's is checked after the frame has
painted.

* perf(gestures): attaching reads no computed style

A caller's inline touch-action is the style's own, read with no recalc, and
applies at once. A stylesheet's needs a computed read, which now waits
until the next frame has painted, when styles are clean, instead of
running inside the attach, where it forced a style recalc over whatever
had just mounted. The check is batched: the host's own values come off
every pending element, one read serves them all, and the writes follow.
Until it runs (a frame or two after the element mounts) the host's own
value stands, so a caller's narrower stylesheet value can read wider for
that long; no touch starts on an element in the frame it mounts in.

* Merge #8309 (#8076 4adaf8b77e; the lock after admission; no style read on attach) into #8315

* Merge main (#8257: the touch motion roles are internal) into the motion clock and Reduce Motion plan

The motion README takes main's internal-roles sentence with this layer's
animator; uikit.test.ts takes main's version (rows, docAbove) and keeps the
check of values bound from an exported group, which timing.ts's Reduce
Motion fade bindings need.

* Merge 3d201a04ee (#8056 with main through #8257's landing) as a dependency

* docs(core): each gesture hook Effect names what it syncs

architecture:react-component-runtime INV3 asks every Effect to name the
external system it synchronizes: the listener ref, the recognizer's
target-action listener and isEnabled, the host attachment, the tracker's
options, tracking expansion, press consumer and enabled state, the unmount
flag, and the attachment's node.

* docs(motion): the animator, README, reducedMotionFade and the browser proof describe the roles' table values (DEC-11)

* Merge #8067 (f581948d) into the motion-role animator

* perf(keyboard): one layout read per keyboard change, shared by every reader

architecture:react-component-runtime INV11 allows the keyboard module at
most one layout read per keyboard change. `getMobileKeyboardHeight`
measured again on every call, and the layout guide, each component's
`useKeyboardHeight` and ChatLayout's commit all call it after the module
has already measured the report: one show read the visual viewport's
height 6 times in Full AI Chat in Chromium, 13 times in the module's test
with the guide, a listener and two hooks.

While the module listens, `getMobileKeyboardHeight` returns the height it
measured at the last report. Every change of the visual viewport or the
window is a report, so a reader between two reports still sees the current
height; with nothing listening yet, it measures.

Tests: the module's test counts one read for a report with the guide, a
listener and two hooks reading the height (red before: 13), and an
interaction test counts one read for a show in Full AI Chat (red on the
previous build: 6).

* fix(ChatLayout): a text control composer tapped with nothing focused is focused without the reveal

spec:AST-099 FR4 says every route into the composer's text, a tap
included, focuses it without scrolling the page. The tap route claimed only
contenteditable text: a `<textarea>` or `<input>` passed as ChatComposer's
input (its documented plain textarea) was left to the browser, and with
nothing focused no blur reaches the focus takeover, so Safari revealed the
field by scrolling the document.

The tap route now claims an unfocused text control in the composer that
brings up a keyboard, and delivers it as it delivers contenteditable text:
focused with `preventScroll`, with the caret where the standard
`caretPositionFromPoint` maps the point inside the control, or after its
text where the browser maps none. A focused control keeps its own taps (the
browser moves the caret); a checkbox or an `inputmode="none"` field is never
claimed.

Tests (useChatKeyboard.test.tsx): ChatLayout with a textarea composer,
under a coarse pointer, cancels the tap's default and focuses the textarea
with `preventScroll` (red before: the browser's own focus); the claim takes
an unfocused text control and leaves a focused one, a checkbox and an
`inputmode="none"` field; the caret lands at the mapped offset, or after
the text.

* docs(ChatLayout): the composer rides in step in Safari; in Firefox and Chrome it moves once reported

spec:AST-099 FR8 asks a ride within one frame of the keyboard on the
measured keyboards, with Android emulator evidence against Gboard; Firefox
for Android has FR2–FR5 only, and reports the keyboard once it is up. This
branch plays UIKit's keyboard spring from the browser's report there, and
times no ride to Gboard. The docs said the composer rides in step in
Firefox for Android and rides the keyboard in Chrome on Android.

ChatLayout's docs (English, Chinese, dense), the browser-support guide and
the changeset now say: in Safari on iOS the composer rides on top of the
keyboard in step with it; in Firefox for Android and Chrome on Android it
moves above the keyboard once the browser reports it; under Chrome's
`interactive-widget=resizes-content` it stays above it without moving.

* fix(motion): a hidden element lends no borrow, and a stop that finishes a dip lands its move with it

Under Reduce Motion on a touch screen:
- A move over a stylesheet opacity of 0 dips nothing (it lands at once), but
  kept 0 as a borrow that outlived it, so a later move once the element
  showed read it as invisible and landed in view. A borrow now exists only
  while its dip runs.
- stop() on a dip's opacity finished the fade but left the move's pending
  jump to land later, at opacity 1. A finished fade now lands the travel
  waiting for it at the same instant.

* refactor(interaction): the animation-state waits move to their own pull request

This pull request keeps curve sampling (hold, seek, sample, release, the
curve end); the recorder, waitForAnimation, watchAnimations and waitForRest,
with their self-tests, land separately on top. The holding self-tests that
waited with them now poll the page for a running or idle animation. Chromium:
19 tests, 5x repeat, pass.

* feat(interaction): animation-state waits for interaction proofs

The harness's animation-state instruments, split out of the curve-sampling
pull request so each stays reviewable:

- a page-side recorder that sees every animation from its first frame or
  creation, so one that starts and ends before a test looks is still
  reported, with its finish time and start (kept when the page cancels it);
- waitForAnimation: the running animations on an element past a minimum
  progress, or the ones that finished since the last wait, with their curve
  interval through the playback rate (a run going backward is dated from
  when it began);
- watchAnimations: a watch taken before an action, for an entrance on a
  page's first contact;
- waitForRest: rest judged by presented transform, translate, rotate, scale
  and opacity, not playState, so an end value held by the keyframes is not
  waited out, and a backward run's end delay and curve are.

Self-tests cover each in real Chromium.

Co-authored-by: Christopher Chedeau <[email protected]>

* Merge main (2af4d305: #8257, the motion roles internal) into the animator

# Conflicts:
#	packages/core/src/motion/README.md
#	packages/core/src/motion/uikit/uikit.test.ts

* Merge main (2af4d305) into the experimental touch layer

* Merge #8055 (89614c7f: a hidden element lends no borrow; a stop that finishes a dip lands its move); a pseudo-element's own opacity hold is owned

Conflicts in animator.ts take this layer's Reduce Motion plan, which gains
#8055's rule in its own terms: a stylesheet that hides the element lends
nothing, so the move lands at once with no dip and no borrow. #8055's stop
rule already holds under the plan (the opacity pass lands the waiting move);
its test passes unchanged. uikit.test.ts takes #8055's ordering.

Also fixed (CodeBunny on 3d201a04): a pseudo-element shown with
set({opacity: 1}) over a stylesheet that hides it holds that value with an
animation, which now counts as an owned opacity (writesOwnOpacity), so a
move or a fade by role returns to it instead of borrowing the hiding 0.

* Merge 5d9e4ec203 (#8056 on #8055's 89614c7f with a pseudo-element fix) as a dependency

* Merge #8076 (bd9246df: main 2af4d305 with #8257) into the keyboard module

# Conflicts:
#	packages/core/src/BottomSheet/BottomSheetPanel.tsx

* docs(motion): coast's edge spring plays its table value; scroll.bounce is not a motion role

* Merge #8073 (8a8ac32170: the hooks follow a replaced node and name their Effects; #8072 61e891d73d) into #8076

Both of cixzhang's rules kept: #8073's useNodeAttachment (a replaced node
re-attaches, deps re-attach, each Effect names what it syncs) and #8076's
guards, so neither the isEnabled sync's cancel nor a press tracker's
release calls a caller back from an Effect. Both sides' tests stay.

* Merge #8176 (af953bdb: #8076 and main 2af4d305) into the Popover's grow from its trigger

A semantic merge:
- Popover.tsx: the grow-from-trigger motion (usePopoverSurfaceMotion) sits
  beside main's bottom-sheet presentation (usePresentationSurface and the
  controlled-surface latch). It runs only when the anchored layer shows; a
  render-prop trigger records its anchor through setRenderTrigger.
- motion/uikit/springs.ts takes main's per-spring constants and adds
  POPOVER_PRESENT_SPRING and POPOVER_DISMISS_SPRING with their rows;
  index.ts and the motion README list both keyboard and popover.
- layer-runtime.md takes main's INV14/INV15 status paragraph.

* Merge #8067 (7b26ef27: #8056 5d9e4ec2, #8055 89614c7f) into the motion-role animator

* Merge the maintainer's #8176 head (af953bdb9f) into the keyboard module

Her af953bdb9f merges #8076's bd9246df2e (main 2af4d305, with #8229's
Popover presentation) into this branch, with her resolution of
BottomSheetPanel.tsx against #8229. No conflicts with this branch's
commits since 2d520a6a9c: the result is her head plus those commits (the
keyboard-height Effect's INV3 comment, one layout read per keyboard
change, the text control tap route, and the Safari/Firefox/Chrome docs).

`timing.ts` checked: #8076's with exactly #8484's change.

* Merge bd9246df2e (#8076 with main) as a dependency

# Conflicts:
#	packages/core/src/gestures/GestureHost.ts

* Merge #8176 (e0a88c4f08) into the Chrome-on-Android ride

#8176's local head reads the layout once per keyboard change, focuses a
text control composer tapped with nothing focused without the reveal, says
the composer moves above the keyboard once reported in Firefox and Chrome
for Android, and merges the maintainer's af953bdb9f (#8076's bd9246df2e,
main 2af4d305 with #8229). No conflicts; `timing.ts` is #8176's.

* test(core): drop the delegated-pressable selection case; the host no longer has delegated consumers

#8076 carries the host without delegated consumers, which nothing used,
so #8309's FR41 case for a delegated pressable has no subject left. The
press-tracked and attached cases still cover native selection on a hold
that does nothing (spec:AST-094 FR41).

* Merge #8309 (3ccbd7a2: #8076 bd9246df, main, the host's injected lock) into the gesture hook fixes

* docs(ChatLayout): in Chrome on Android the composer rides Gboard's slides in step

#8176 says the composer moves above the keyboard once Chrome reports it,
since it times no ride to Gboard (spec:AST-099 FR8 asks a ride within one
frame of the keyboard, with Android emulator evidence). This branch times
the ride to Gboard's measured slides, with that evidence: ChatLayout's docs
(English, Chinese, dense) and the browser-support guide say the composer
rides Gboard's slides in step in Chrome on Android, while a Tall
BottomSheet makes its room once Chrome reports the keyboard. Firefox for
Android keeps #8176's wording: it moves once Firefox reports the keyboard.

* Merge #8076 bd9246df2e (main 2af4d305a6)

# Conflicts:
#	docs/architecture/layer-runtime.md

* Merge #8076 (bd9246df2e: main 2af4d305a6) into #8270

* Merge #8270 (#8076 bd9246df2e) into #8309

* Merge cixzhang's #8309 head (3ccbd7a2ab: #8076 bd9246df2e merged in, the delegated-pressable case dropped)

Her merge and her test change are kept; this PR's after-paint touch-action
check and the zero-delay lock case stay beside them.

* test(gestures): the gesture host bundles only the UIKit groups it reads

Every recognizer and press tracker attaches through the host, so what it
imports ships with every touch component (architecture:component-style-
authoring INV6). The esbuild bundle of the host alone must carry the press
and click groups it reads and never the whole table. It fails on this head:
the host imports UIKIT_GESTURES, the union of every group (the same test as
the offer on #8072).

* perf(gestures): the gesture host imports only the press and click groups

The host read its values off UIKIT_GESTURES, the union of every group, so
any component attaching a recognizer or press tracker bundled all eleven
groups. It imports UIKIT_PRESS and UIKIT_CLICK (#8468's per-group exports),
as the offer on #8072 does at that layer, and the bundle test passes.

* Merge #8309 (#8076 bd9246df2e; her restack; the host's per-group imports) into #8315

* Merge cixzhang's #8315 head (2a0d0650e3: her #8309 restack)

* Merge #8315 (2a0d0650: #8309, #8076 bd9246df, main 2af4d305) into the host line

GestureHost.ts keeps this branch's host additions: the per-event press
tracker's option, the page holds, a kept press's manipulation style, and
listening for a finger-scroll watch, on its coarse-pointer gate. It also
takes the lower line's rule that a disabled recognizer leaves the browser
everything (FR24), and a passed-in coarse read is read again on each
update. GestureHost.test.ts keeps this branch's kept-press and selection
lock tests beside the lower line's.

* Merge 993a4ca926 (#8336 resolved against main through #8315 and #8309) as a dependency

* perf(core): the gesture host reads the haptic switch's marker from a one-constant module

From #8320's check, fixed once here: the host imported
HAPTIC_SWITCH_ATTRIBUTE from haptics.ts, which pulled the whole haptics
module into every component that attaches a gesture. The marker now lives
in gestures/hapticSwitch.ts, which both the host and haptics.ts import, so
a component that plays no haptic pays nothing for it. haptics.ts still
re-exports the constant.

* fix(motion): a release past an edge springs back as a Reduce Motion cross-fade, not as momentum

Under Reduce Motion on a touch screen, decay(coast(...)) for a release past
an edge sprang back with travel at full opacity. That spring is a transition
the release starts, not a throw's momentum, so DR2's momentum exemption does
not cover it. coast marks such a curve `isTransition`, and decay hands it to
animate's Reduce Motion path (a cross-fade on a coarse pointer, at once on any
other); a coast that reaches an edge keeps its momentum, bounce included.

* Merge #8309 (7f48c369: the haptic switch marker in its own module) into the gesture hook fixes

* docs(interaction): the waits read a run reversed before it starts; a mid-run reverse or replay reads as its first run

Co-authored-by: Christopher Chedeau <[email protected]>

* Merge #8055 (15c71e1f: under Reduce Motion a coast's spring back is a transition, not momentum)

decay() keeps momentum to the translate axes and takes #8055's rule: under
Reduce Motion a curve marked isTransition (coast()'s spring back from past
an edge) plays through animate(), so the plan cross-fades it or lands it at
once, and the handle's finished waits for both. #8055's test steps the
clock to the plan's landing.

* Merge main (#8044 landed) into the animation-state waits

# Conflicts:
#	internal/interaction-harness/README.md
#	internal/interaction-harness/src/curves.ts
#	internal/interaction-harness/src/harness.interaction.browser.spec.ts

* Merge #8315 (83c36b4b: #8309's haptic switch marker in its own module) into the host line

* Merge #8258 (370c4d9e: the roles' table values in the docs; #8067 through her #8056 and #8055 fixes) into the experimental touch exports

* Merge cixzhang's #8309 head (7f48c369b5: the haptic switch marker in its own module)

* refactor(core): the plan's stop needs no step-segment landing; the steps flag goes

Under the Reduce Motion plan no segment is a step function: a waiting move
is a landing, and stop() lands it through cancelLanding('opacity'). The
step-segment landing block #8055 adds to stop() never runs here, nor does
the steps flag's sampling branch; both go.

* Merge #8309 (her haptic switch marker module folded) into #8315

* Merge cixzhang's #8315 head (83c36b4b06: her #8309 merge)

* Merge 1e5d0f4f98 (#8056: the dead stop() step-segment block removed) as a dependency

* Merge #8505 (e8b0bb62: main with #8044, plus the animation-state waits) into the storyboards

# Conflicts:
#	internal/interaction-harness/README.md

* fix(core): a finger on page content reaches tracking recognizers as began-elsewhere; a recognizer's own scroll is not the browser taking the finger

From CodeBunny on #8195, fixed once here where the host enters:
- spec:AST-094 FR28: a touch with no recognizer or consumer on its path
  never reached the arena, so a recognizer tracking a finger was never
  told about a second finger beside it (a menu press could not end on
  one). GestureArena.untrackedBegan reports such a touch to recognizers
  that are tracking touches; it creates no record, claim or lock, and its
  moves and end stay the page's.
- spec:AST-094 FR30: a recognizer that scrolls a scroller itself (a menu's
  edge autoscroll) was cancelled by its own write. The internal
  GestureHost.ownScroll(scroller) makes onScroll skip that scroller until
  two frames pass; a real pan in that window still reports itself through
  pointercancel or touchcancel.
Three tests; two fail on the previous head.

* Merge #8072 (347f0aca: FR28 began-elsewhere for untracked fingers, FR30 ownScroll) into UIControl press tracking

* Merge #8348 (main with #8044 and #8505's waits) into the frame evidence

* Merge #8045 (main with #8044 and #8505's waits) into the recorder stand-down

# Conflicts:
#	internal/interaction-harness/src/curves.ts

* fix(Popover): a touch that lands while the popover grows takes no input; its springs import by name

- spec:AST-094 FR35: while the touch presentation grows, a touch that
  lands is held. Its end is cancelled, which in Chromium also cancels the
  popover's light dismiss and the touch's click, so a tap outside, on the
  trigger or inside closes nothing, activates nothing and moves no focus;
  a one-finger drag scrolls nothing; a pinch still zooms (FR10). The hold
  listens only while it grows or such a touch is down.
- INV6: the motion imports POPOVER_PRESENT_SPRING and
  POPOVER_DISMISS_SPRING by name and registers no table: they are this
  component's measured values, not motion roles (spec:AST-094 DEC-11).
- layer-runtime.md: Current gaps keeps this line's shared exit copy (INV13,
  placeLayerExitCopy) beside main's Popover sheet-hold sentence.

* Merge #8446 (7d946d25: the harness line on main with #8505's waits) into the experimental touch layer

* test(Popover): FR35 in a real engine: a tap or drag during the grow reaches nothing

A real-touch browser test (Chromium, touch events through the harness):
a tap outside and a tap on the trigger that land while the popover grows
leave it open with focus where it was, and a one-finger drag scrolls
nothing; once it has grown, the same tap outside light-dismisses it. It
fails on the previous head (the half-grown popover closes).

* Merge 7d946d259b (#8446 resolved against main, #8044 landed) as a dependency

* Merge 5b691cda71 (main) as a dependency

* docs(motion): decay's docs and the changeset say a transition curve cross-fades under Reduce Motion

* Merge ee34b25079 (#8076 with the resolved harness line, #8446 7d946d25) as a dependency

* Merge 5b691cda71 (main) as a dependency

* Merge #8270 (#8076 ee34b25079: main 4444d70bd7) into #8309

* Merge #8076 (ee34b25079: main 4444d70bd7 with #8505's waits, through her #8446) into #8270

* Merge #8309 (#8076 ee34b25079: main 4444d70bd7) into #8315

* Merge #8073 and #8258 (2c572082: #8073's hooks follow a replaced node; #8258's docs with her #8067, #8056 and #8055 fixes) into the experimental touch layer

* Merge #8073 (b600a78a: began-elsewhere for untracked fingers and a recognizer's own scroll, from #8072) into the experimental touch layer

* fix(interaction): openStory turns Storybook's highlight module off

Storybook 10's highlight module observes #storybook-root and, on every
insertion, reads the computed style of every element on the page inside the
inserting task: one exit copy in a Button story carried 117 getComputedStyle
calls and two forced style recalculations, which a proof then counted as the
component's.

openStory sets the module's own __STORYBOOK_HIGHLIGHT_INITIALIZED before the
preview runs, so the module returns at once, and checks that its root element
is absent once the story renders (a Storybook that stops reading the flag
fails loudly). openStory(…, {storybookHighlight: true}) keeps it on, in a page
that has not turned it off. A self-test on a built story counts the reads and
style recalculations an insertion carries: none by default, every element's
with the module kept on.

* fix(interaction): a trace sets apart only the harness's own reads, never a test's evaluate

traceRendering filed every DevTools-run task that set off no page script in
devtoolsTasks. A test's own page.evaluate that calls page code directly
(a story's API, a hook) leaves no listener or timer in the trace, so its
work was filed there too, and a "no long task" proof passed over it.

The harness now marks its own page-side reads (console.timeStamp with
HARNESS_READ) in waitForAnimation and in blockMainThread without during.
devtoolsTasks holds only tasks that carry that mark and ran no page script;
every other long task, a test's evaluate included, is the page's. The
self-test adds a 60 ms page function a test's evaluate calls directly: it is
a long task, and without the mark in waitForAnimation its read is one too.

* Merge #8270 (the host header and changeset without delegated consumers) into #8309

* docs(core): the host header and the press changeset describe no delegated consumer

The gesture host has no delegated consumers and no scroll handoff, so its
header drops both, and one changeset covers the press tracking, the one
press writer and the hooks. Both texts are cixzhang's from c34bf734ea on
#8073, taken verbatim so the next #8076 merges without a conflict.

* Merge #8309 into #8315

* Merge #8309 (dd8e9462: #8076 ee34b250 with the harness line, main) into the gesture hook fixes

* fix(gestures): a keepsTouch press tracker keeps only the touch whose press it delivered

After a tap quicker than the content-touch delay, the flash shown at the
lift marked the tracker kept, and nothing cleared it, so the next touch on
a held control was kept from its first move: the host cancelled a scroll
starting there before its press was delivered (spec:AST-094 FR19).
finish() now clears the kept state, keepsTouch answers only for a tracked
touch, and a press delivered while a quick tap's flash still shows keeps
its touch.

* Merge #8315 (b9c536ff: #8309 dd8e9462, #8076 ee34b250, the resolved harness line and main) into the host line

* fix(interaction): a wait keeps waiting while the action's animation is pending

waitForAnimation and watch.started() left pending animations (no start time
yet) out of the running set, so an earlier animation that had finished
answered for the one the action started. A pending animation in scope now
keeps the wait going. Self-test: a short animation ends, then a longer one
starts; the wait returns the longer one (it returned the 40 ms one before).
The README and JSDoc say how a mid-run reverse or replay is misread.

Co-authored-by: Christopher Chedeau <[email protected]>

* docs(gestures): the host header drops the delegated-consumer paragraph

The delegated consumer was removed from the host on this branch; its
header paragraph went with it only in name.

* fix(motion): a held identity follows a node replacement, a mixed release is one handle, and REDUCED_TRANSITION keeps createAnimator's docs

- attach rebuilt only channels away from identity, so an identity the
  animator held inline over a stylesheet that differs (set({opacity: 1}) over
  opacity 0) was never written on the node that replaced the element; the
  new node showed 0 while get() read 1. The held identities now carry through
  a detach to the next node.
- decay under Reduce Motion with one axis past an edge and another coasting
  returned a handle that covered only the coasting axis; stop() left the
  cross-fade to land. The handle now covers both calls.
- REDUCED_TRANSITION moves above createAnimator's doc comment.

* test(interaction): openStory's highlight self-test runs in both engines

Storybook's highlight module scans the page on every insertion in WebKit as in Chromium, so the self-test now counts the insertion's getComputedStyle calls in both engines; only Chromium's trace counts the style recalculations they force. It no longer serves Storybook for an engine it skips.

* Merge #8055 (7ad0455a: held identities follow a node replacement; one handle for a mixed release); decay's Reduce Motion docs

- attach(): #8055's held identities, plus a pseudo-element's: its identity
  hold (a static animation the attach cancels) is held again on the next
  node; a borrowed opacity is never held. Test: a ::backdrop's hold follows
  a node replacement.
- decay(): #8055's single handle for a release with one axis past an edge,
  with `started` covering both calls. Under this layer's plan a stop
  finishes the cross-fade and lands that axis at once, while invisible, so
  #8055's test checks that nothing moves after the stop.
- Docs: the header, decay()'s and MotionCurve's comments, the motion
  README and the changeset now say that a curve marked isTransition (a
  coast's spring back from past an edge) plays through the Reduce Motion
  policy: a cross-fade on a coarse pointer, at once elsewhere.

* Merge f60e87d2cd (#8056 on #8055's 7ad0455a: held identities across a replacement, one handle for a mixed-axis release) as a dependency

* Merge 79a7a902b8 (main) as a dependency

* Merge #8270 (main 5b691cda71) into #8309

* Merge cixzhang's #8309 head (dd8e9462f5: #8076 ee34b25079 and main 5b691cda71)

* Merge main (5b691cda71) into #8270, as cixzhang's #8309 does

* Merge #8309 (her third pass folded: #8076 ee34b25079, main 5b691cda71) into #8315

* Merge cixzhang's #8315 head (b9c536ffab: her #8309 merge)

* fix(interaction): a traced waitForRest skips scroll- and view-timeline animations

Inside a trace, waitForRest waits on timers for each animation's scheduled
end. A scroll- or view-timeline animation (DateInput's wheel rows) has none:
its time is a percentage, the wait came out NaN, and the timer re-armed with
no delay until the deadline, where the untraced wait rests. It now skips
animations that are not on the document timeline, as holdAnimations does.
Self-test: a scroll-timeline row inside a trace; it rejected at the deadline
before (Chromium, 3x repeat pass).

* fix(Popover): the input hold typechecks; FR35's browser test taps 47 ms into the press

- The hold's listeners are added and removed in two branches: indexing
  the document with a union method name lost the TouchEvent overload
  (TS2345).
- The real-touch test now plays the outside tap 47 ms after the trigger's
  press began (17 ms after the popover opened) in one script, and checks
  that focus stays in the popover, where its opening put it. Repeated 3
  times in Chromium it passes; on a Storybook without the hold the
  popover closes.

* Merge #8505 (9320644717: a wait keeps waiting while the action's animation is pending) into the frame evidence

* docs(layer-runtime): Current gaps takes main's INV14/INV15 paragraph

The shared exit copy's record (INV13) belongs to its own pull requests;
this one leaves the paragraph as main has it.

* Merge #8076 (ee34b250: the harness line from #8446) into the keyboard module

trace.ts takes #8446's long-task and DevTools-task split and keeps this
line's opt-in invalidation, animation and script records.

* Merge main (79a7a902) into the keyboard module

* fix(interaction): the busy verdict judges a sparse cast from its first moved frame, and the harness's waits run on the real timers

With a compositor record, the moved criterion counted every compositor
frame in the judged part, but only a gap between two moved frames can be
credited to the compositor, so the frames before the first and after the
last moved frame read as misses: at one screencast frame in six, a
composited animation failed in 5 of 7 runs, where the same frames passed
without the record. The criterion now counts the compositor's frames from
the first to the last moved frame; the gaps before and after are the stall
check's, which already measures the window's edges.

blockMainThread(..., {during}) and sampleRects waited on the page's own
requestAnimationFrame and setTimeout, which freezeTimers holds, so neither
settled under a frozen timer gate, though the harness's own waits are
documented as not held. They now run on the gate's real frame and timeout
(the gate exposes its real setTimeout too). A unit case at one frame in six
and a self-test under a frozen gate fail on the previous code.

* fix(interaction): a scroll- or view-timeline animation does not hold up a wait

waitForAnimation and watch.started() counted a scroll- or view-timeline
animation (DateInput's wheel rows) as running; it never progresses on its
own, so the wait never answered with the animation that finished and
rejected at its timeout. Only document-timeline animations count now, as for
holdAnimations. Self-test: a scroll-timeline row beside a short animation
that ends; it rejected before (Chromium, 3x repeat pass). The installCurveEnd
doc comment sits above installCurveEnd again.

Co-authored-by: Christopher Chedeau <[email protected]>

* test(interaction): the trace verdict's fixture carries devtoolsTasks, which #8446's RenderingTrace requires

* Merge #8176 (626bceb6: #8076 ee34b250's harness line and main 79a7a902) into the Popover's grow from its trigger

* Merge #8176 (626bceb6b0) into the Chrome-on-Android ride

#8176's head, from the maintainer, merges #8076's ee34b25079 (#8446's
harness line, with main's #8044 curve sampling) and main 79a7a902, and
gives the trace verdict's fixture its devtoolsTasks. No conflicts;
`timing.ts` is #8176's, with #8484's keyboard export.

* fix(gestures): a kept press keeps only the touch it tracks

keepsTouch answered for the consumer, not for a touch, so a second finger
landing on a held control had its moves cancelled though the tracker
ignores it (spec:AST-094 FR19). TouchConsumer.keepsTouch now takes the
touch's id; PressTracker keeps only its tracked touch, and the host asks
for the moving finger.

* docs(motion): the animator's SYNC list and test header name only files this layer has, and coast says a transition lands at once on a fine pointer

* Merge #8446 (9d5c20a8: the harness line on #8505's waits) into useAnimator's browser proofs

* Merge #8076 0d1a829741 (main 4444d70bd7 with #8446, #8073, #8258)

* revert(Popover): the grow-time input hold leaves this pull request

The Popover-local touch hold (createGrowthInputHold) and its tests are
taken out. The stack delivers spec:AST-094 FR35 through the layer
runtime's presentation hold (layer-runtime INV14: a component uses the
runtime's hold rather than building its own), and the real-touch proof
travels with that change. The springs imported by name and main's
layer-runtime paragraph stay.

* Merge #8055 (8fc7f2ef: coast says a transition lands at once on a fine pointer); the changeset says the same

animator.test.ts keeps this layer's header (no compositor browser spec in
this layer). The changeset now says decay sends a spring back from past an
edge through the Reduce Motion policy: a cross-fade on a coarse pointer, at
once elsewhere.

* docs(core): the gestures README says a cell's highlight waits only inside a scroll view

The press profiles' README said a cell's highlight always waits the
content-touch delay. PressTracker waits it inside a scroll view and lights
at once outside one (spec:AST-094 FR11), as its own header says; the README
now says so too.

* Merge 79dc151e53 (#8056 on #8055's 8fc7f2ef: the Reduce Motion changeset wording) as a dependency

* refactor(core): the animator's Reduce Motion planner is its own module

What one call becomes under Reduce Motion (an opacity-only cross-fade
whose travel lands while the element is transparent, or everything at
once; a dip on a borrowed stylesheet opacity) moves from createAnimator's
closure to reducedMotionPlan.ts, a pure planner that reads the animator
through a view and returns the plan; the animator turns the plan into its
segments and runs the landings. No behavior change: the animator's tests
pass unchanged, and the planner has its own.

Co-authored-by: Christopher Chedeau <[email protected]>

* Merge #8076 (0d1a829741) into the Chrome-on-Android ride

#8076's head is a fast-forward of the ee34b25079 #8176 carries: #8073's
began-elsewhere for untracked fingers and a recognizer's own scroll, and
the motion roles' table values in the docs. No conflicts; `timing.ts` is
#8076's with exactly #8484's change. This branch takes it ahead of #8176,
whose next head brings it too.

* refactor(core): play(curves) and pseudo-element support move to stacked pull requests

This pull request keeps the animator's Reduce Motion plan (now its own
planner module), the browser-set start of a call from rest, promotion,
atRest, rebase and animatorFor. Two features it carried move up the stack,
each with its own tests and changeset:
- play(curves), baking any closed-form curve like a spring;
- driving a pseudo-element (a dialog's ::backdrop).
The changeset is split the same way.

Co-authored-by: Christopher Chedeau <[email protected]>

* feat(core): the animator plays any closed-form curve

play(curves) bakes any curve given as value and velocity functions of
time (a spring chasing a moving target from solveSpringTowardRamp, a
fitted UIKit curve) exactly like a spring: presentation values,
velocities, stop, finished and the shared clock work the same, a later
animate starts from the curve's value and velocity, and under Reduce
Motion a curve that moves is travel the policy replaces. Tests and a
changeset of its own.

Co-authored-by: Christopher Chedeau <[email protected]>

* feat(core): the animator drives a pseudo-element

createAnimator(element, {pseudoElement: '::backdrop'}) animates a
pseudo-element: with no inline style, a static filling animation holds
its value after a curve ends and after set; a custom property on its host
promotes it; a Reduce Motion dip borrows and hands back the
pseudo-element's own opacity, and its holds follow a node replacement.
animatorFor keeps one animator per element and pseudo-element. Tests and
a changeset of its own.

Co-authored-by: Christopher Chedeau <[email protected]>

* test(interaction): the long-task self-test judges the harness read, not the page's frames around it

"a harness read inside a trace is not the page's long task…" also asserted
that no long task started anywhere in the read's window. On CI's runner each
frame of the fixture's 1,200 running rows took 51-54 ms, the page's own long
tasks, and failed it; at 4x CPU locally they take 126-220 ms. The read
itself was set apart correctly.

The test now asserts the read's own classification, and removes the rows
before the timer, click and direct-call windows, so each holds only its own
work. It passes at 4x CPU, where the previous assertion failed.

* Merge #8505 (462d82caaf: a scroll- or view-timeline animation does not hold up a wait) into the frame evidence

* Merge branch 'interaction-harness-3-frames' into uikit/f3-recorder-standdown

* perf(utils): the scrollbar thickness is measured once per document and zoom

`layoutViewportHeight` took a classic horizontal scrollbar out by
measuring its thickness with a probe element on every call where the page
overflows horizontally: the probe writes to the document and forces a
layout, and the keyboard module's measurement, BottomSheet's obstruction
and ChatLayout's lift each call it per keyboard change, so one change
cost more than the one layout read
architecture:react-component-runtime INV11 allows.

The thickness does not change between reports: it is measured once per
document and device pixel ratio (a browser zoom changes how many CSS px a
classic scrollbar takes) and reused.

Test (useMobileKeyboard.test.ts): three measurements of a wide page with
15 px scrollbars probe once (red before: 3). A test-only reset keeps each
test's scrollbars its own.

* docs(changeset): in Chrome the composer moves once reported, and a Tall sheet adds its room

The browser-support changeset said the on-screen keyboard's components
"ride the keyboard" in Chrome by default, which contradicts the guide it
announces ("move above the keyboard once Chrome reports it"), and a Tall
BottomSheet never moves: it adds scroll room. The changeset and the guide
now say that in Chrome ChatLayout's composer moves above the keyboard once
Chrome reports it and a Tall BottomSheet adds its scroll room then, and
that under `interactive-widget=resizes-content` neither changes.

* fix(interaction): a scroll-driven animation at its end is not a finished curve

waitForAnimation's finished branch read every recorded animation, so a
scroll- or view-timeline animation that reached its end (a scroller scrolled
to its end) came back as finished with a NaN duration and interval. The
recorded set now keeps document-timeline animations only. The scroll-timeline
self-test scrolls its scroller to the end first; it returned the NaN entry
before (Chromium, 3x repeat pass). The README, JSDoc and file header name
watchAnimations where they list what moves the wait window and what the file
exports.

Co-authored-by: Christopher Chedeau <[email protected]>

* Merge 2cb04fe6f6 (#8522, the top of #8056's split: core, play(curves), pseudo-element support) as a dependency

# Conflicts:
#	packages/core/src/motion/README.md
#	packages/core/src/motion/animator.ts

* Merge f1b4c05434 (main) as a dependency

* Merge #8505 (a9be409b35: a scroll-driven animation at its end is not a finished curve) into the recorder stand-down

* fix(Popover): a fine-pointer open releases the touch presentation's listener; layer-runtime.md is main's

- After one touch open, a later fine-pointer open only reset the motion
  and left its beforetoggle listener on the popover (spec:AST-094 FR24).
  It now releases the motion with its listener. Test: a touch open, then a
  fine-pointer one, removes the listener.
- docs/architecture/layer-runtime.md goes back to main's: the exit copy's
  record belongs to its own pull request.

* Merge #8287 (dbac8444ff) into the keyboard module: Chrome on Android rides Gboard

spec:AST-099 FR8 asks Core's keyboard-aware surfaces to ride the keyboard
in Chrome on Android within one frame of it on the measured keyboards, and
DEC-2 rules out a one-step relayout; on its own this branch played UIKit's
keyboard spring from Chrome's report. #8287's Chrome work comes in here, so
the change conforms on its own: Gboard's measured slides
(`motion/android/keyboard.ts`), the keyboard model's Chrome profile, the
guide's schedule picked by the VirtualKeyboard capability, `rideKeyboard`,
and their tests. #8287 closes as folded in.

Conflicts, resolved:
- The browser-support guide takes #8287's Chrome sentence (the composer
  rides the keyboard as Gboard slides it), with this branch's correction
  that a Tall BottomSheet adds its scroll room once Chrome reports the
  keyboard, and that under `resizes-content` nothing changes.
- The changesets: ChatLayout's says the dock rides in step in Safari on
  iOS and in Chrome on Android (Gboard's measured slides) and moves once
  reported in Firefox for Android; #8287's own changeset folds into it and
  is removed. The browser-support changeset says the same for Chrome.

* Merge main (30a4a2b3: #8055 landed) into the animator's Reduce Motion plan

Main carries #8055 as one commit; this branch already had its head
(8fc7f2ef), so the merge keeps this branch's animator, coast, test and
changeset files over it and takes main's other changes as they are.

* Merge #8056 (main with #8055 landed) into play(curves)

* Merge #8521 (main with #8055 landed) into pseudo-element support

* Merge f0819b956e (#8522 with main through #8055's landing) as a dependency

* fix(gestures): a watcher cancels no press under it; a page hold keeps its finger through a second one

- A recognizer that never claims (a watcher) no longer cancels its view's
  touches when it recognizes: a held press and a click under it stay
  (spec:AST-094 FR11, FR19). Its simultaneity with every recognizer is
  FR15's watcher exemption (DEC-7).
- A page hold forgot its finger once a second finger touched down; it now
  keeps the first finger's verdict, cancels nothing while two are down, and
  holds the first finger again once it is alone.
- usePressTracker says keepsTouch is fixed when the tracker is created.
Tests for the first two fail on the previous head.

* Merge #8067 (f9f1162c: #8522, main through #8055) into the motion-role animator

# Conflicts:
#	packages/core/src/motion/animator.ts

* Merge #8258 (dcfecc93: #8067 f9f1162c, main through #8055) into the experimental touch layer

# Conflicts:
#	.changeset/uikit-motion-animator.md

* refactor(core): drop the animator's unused TRAVEL alias

The travel list moved to the planner with the Reduce Motion plan; nothing
in the animator reads it any more (no-unused-vars).

* fix(keyboard): one reveal-pan watch puts a browser's own pan back, for ChatLayout too

Chrome 124 on Android (the emulator image's Google Chrome, with Gboard)
animates its own reveal of the focused composer about 150 ms after the
keyboard's report: the visual viewport pans down by the keyboard's whole
height (0 to 312 px over 130 ms) while the composer is still riding up,
so the composer ended mid-screen with ~370 px of page between it and the
keyboard (spec:AST-099 FR4: focusing the composer never pans the page).
Chromium 158 does not pan.

BottomSheet already put such a pan back (built for Firefox for Android)
inside its own hook. That detection and restore is now the keyboard
module's one building block, `watchRevealPan(window, {owns})`:
`report()` on each report that changes the height; `isRevealPan(height)`
when the visual viewport has since moved down with no touch, document
scroll or zoom, while a text field the caller owns has focus; `putBack()`
pans the visual viewport back without scrolling the document by
scrolling into view a probe fixed where it sat at the report (or the
element given). BottomSheet's hook uses it with its full-viewport dialog
as before; ChatLayout watches under a finger (spec:AST-094 FR24) and puts
the pan back on its first frame.

Tests:
- ChatLayoutKeyboard (interaction, Chromium and WebKit): after a
  keyboard show, a simulated pan by the keyboard's height is put back and
  the visual viewport rests at 0 (red before: no put-back).
- useMobileKeyboard.test.ts: the watch sees a pan of an owned field, and
  leaves alone a touch since the report, a document scroll, a zoom and a
  field it does not own; putBack scrolls a fixed probe at the report's
  offset into view and removes it, or the anchor given; its one listener
  lives only while it watches.
- Android emulator (Gboard): Chrome 124 and Chromium 158, two shows each:
  the visual viewport's offsetTop stays 0 in every sampled frame and the
  composer rests on the keyboard's top edge (frames checked).

* Merge 2267ee5154 (#8076 with main through #8055's landing, via #8067 and #8258) as a dependency

# Conflicts:
#	packages/core/src/gestures/GestureHost.ts

* Merge dbcfc30f7a (main) as a dependency

* Merge #8076 2267ee5154 (main through #8055)

* Merge #8076 (2267ee5154) into the keyboard module

#8076's head folds main through #8055's landing (the compositor
animator) and is a fast-forward of the 0d1a829741 #8287 brought in. It
merges cleanly with main dbcfc30f7a, which this branch's previous base
no longer did. No conflicts; `timing.ts` is #8076's with exactly #8484's
change.

* Merge #8076 (2267ee5154: #8073's fold with her b600a78a, main through #8055 via #8258) into #8270

The host locks selection for the touches the arena admitted, then tells
the arena about each untracked finger (her began-elsewhere): both loops
run after the arena begins the touches.

* docs(core): the gestures README gives a control's release the shared deselect clock; the animator changeset drops its no-component clause

The press profiles' README gave a control UIButton's 0.25 s release.
PRESS_PROFILES releases every surface on the list's deselect clock until a
control runs its own release, as its comment says; the README now says so.
Its test list still credited VelocityTracker's tests with checking each
strategy against the true velocity, though one filter remains: it now
names what they check. The animator's changeset said no component uses
it, which goes false in the release that carries the components that do.

* fix(interaction): a watch stamps after the newest entry, and an exit removed at its end is still reported

- Arming the recorder now records first and stamps strictly after the
  newest entry: a watch taken right after a step that changed style no
  longer reports that step's transition (created by the arm's own style
  read) as started after it.
- Each entry keeps its target's ancestors as recorded, so an exit whose
  element the page removes at its end is still reported for the container
  it left, instead of a wait rejecting with nothing recorded.

A self-test for each; both failed before (Chromium, 3x repeat pass).

Co-authored-by: Christopher Chedeau <[email protected]>

* test(core): the FR30 own-scroll case moves its finger past the press slop first

#8309 lets a scroll under a finger that has not travelled the press slop
leave the touch where it is (the page's own scroll, not the finger's pan).
The FR30 case from #8072 used a still finger, so after the merge its
unannounced scroll no longer dropped the touch for the right reason. The
finger now travels 30 px (a tolerant long press keeps tracking it) before
the recognizer's own write and the unannounced scroll that follows, so the
case checks ownScroll alone.

* Merge #8309 (a9208c41: #8076 2267ee51, main through #8055) into the gesture hook fixes

# Conflicts:
#	packages/core/src/gestures/useGestureRecognizer.ts

* test(core): the animator's tests drop an unused import and binding

solveSpringTowardRamp went with play(curves)'s tests, and a coast test
destructured an element it never reads (no-unused-vars).

* fix(interaction): after an on-screen start, the busy verdict judges the frames it credits as skipped

With a compositor record and an on-screen start, the moved criterion counted
from the first moved frame after the on-screen frame, while the gap from the
on-screen frame to it was credited as frames the screencast skipped. When the
cast skipped the frames right after the on-screen start, those credits had
no place in the denominator: four unmoved frames that fail on a full cast
("31 of 35 expected frames moved") passed as "26/30 moved and 5 skipped by
the screencast (103%)", and a clean run read 117%.

The criterion now counts the compositor's frames from the on-screen frame,
so both sides cover the same frames: the skipped cast fails like the full
one, and a clean run reads at most 100%. A busy.test.ts case pins all three.

* Merge #8505 (02ff48fafe: a watch stamps after the newest entry, and an exit removed at its end is still reported) into the frame evidence

* fix(gestures): the arena reaches deliverBeganElsewhere through internals on the new path too

#8309's new began-elsewhere fan-out calls the recognizer's protected
plumbing directly; #8315 keeps that plumbing behind internals().

* docs(Popover): the dismissal cites the shared exit copy as main's layer-runtime INV14

* Merge #8315 (e1dfdff9: #8309 a9208c41, #8076 2267ee51, main through #8055) into the host line

GestureHost.ts:
- selection locks follow the lower line's rule (only once the arena has
  admitted the contact) and keep this branch's press-tracker lock: the
  admitted consumer's lock joins the recognizers' at that moment;
- the pointer stays followed by this branch's watcher (watchPointer,
  pointerChanged), so the lower line's media-query listener is not added
  twice;
- the lone-finger pan check reads a pan by its shape, so the host bundles
  no pan module (the lower line's bundle test).
Tests: both sides' host tests; the browser spec keeps both sides' real-touch
tests, and its fixture bundles are development builds.

* docs(keyboard): rewrap two file headers the fold left uneven

The keyboard entry's @output and useChatKeyboard's @input carried a
line past the column and a broken wrap after the reveal-pan watch and
the Chrome timing came in. Comments only.

* fix(core): under Reduce Motion a move lands only while the element is transparent

A call with travel (or a waiting landing) whose opacity rose from a visible
value landed its travel at once, in view, and one whose opacity fell to a
visible value landed at the end of its fade, in view. The entrance branch
now applies only from 0 and the exit branch only to 0; any other such call
dips (fades out, lands at the bottom, fades back to its opacity), as
design:reduced-motion DR1 and DR2 ask. The tests read the opacity at the
moment the travel lands.

* docs(Popover): the touch layer cites component-style-authoring INV6 and the global touch module

Touch-only code a pointer page carries is INV6's rule. Components use the
global touch module once it is installed (proposed in #8464), so
per-component lazy swaps are paused and this module's cost is carried until
that module lands.

* Merge #8186 (df04ef94: the layer runtime's exit copy and its INV13 record) into the Popover's grow from its trigger

This branch carried #8186's earlier commits, and its layer-runtime.md had
been set back to main's, which dropped the exit copy's record (INV13, the
Exit copy section and their coupling, owning-code and verification rows)
that #8186 adds. It now carries #8186's head, and layer-runtime.md is
#8186's exactly, so the INV13 citations in layerExitCopy.ts and
popoverSurfaceMotion.ts hold.

* fix(gestures): a page hold judges a new touch afresh when it reuses an identifier

The hold kept its record for any touch that listed the held identifier, so
a new touch reusing it after the first lifted inherited the old start point
and verdict: a list pan after a backdrop pan was cancelled, and a backdrop
pan after a list pan scrolled the page (spec:AST-094 FR19). Only a finger
already down keeps its record now; the test fails on the previous head.
Also: the host's changeset says the touch components adopt it, rather than
that they use it, and a test drops an unused binding.

* docs(layer-runtime): Current gaps notes Popover's latched anchored presentation

Popover latches the presentation it chose at the open (the touch grow or
the pointer entrance) until the close settles, a presentation hold of its
own (INV14). Current gaps records it beside its sheet presentation's hold;
Popover adopts the runtime's presentation hold when that lands.

* Merge #8045 (e05cdd163a, on #8505 02ff48fafe) into the recorder stand-down

# Conflicts:
#	internal/interaction-harness/src/curves.ts

* Merge #8336 (5a59ef2e17) into #8342

cixzhang's #8336 with her Android page-hold fix, mergeable with main; on top of her 04ff5dcc50. No conflicts; the hold's files are unchanged.

* Merge #8076 (1346af4990: the README's control release and test list, the animator changeset) into #8270

* Merge #8270 (09aa3f1883 with #8076 1346af4990: the README's control release and test list) into #8309

* Merge #8309 (#8270 09aa3f1883, #8076 1346af4990) into #8315

* Merge #8315 (#8270 09aa3f1883, #8076 1346af4990) into #8336

* fix(interaction): waitForAnimation and a watch's started() stand down while a trace runs

Polled inside a traced body, each look added a Layout of an anchored element in every frame (24 in the anchored fixture's steady middle). Four reads did it, each alone: Playwright's locator.evaluate (each call makes a main-thread frame), the recorder's document-wide read, an unwatched wait's element.getAnimations(), and effect.getComputedTiming(), which updates a running animation on demand and restyles its target. While a trace runs, record() from outside the recorder and arm()'s read stand down; the wait takes the element's animations from the recorder's log, judges a started one by its own times (playState only before it has a start time), reads timing through getTiming(), and reaches the element through a handle to what the locator matches at each look. The same window now lays out 0 times.

* fix(core): a handle's stop freezes its waiting Reduce Motion travel where it is

Under the Reduce Motion plan a call's travel waits in a landing, with no
segment, so handle.stop() stopped only the call's fade, and the fade's
landing then wrote the travel at once while the element was still visible.
The handle now stops the call's waiting travel too, before its fade, as
animator.stop() does: a catch freezes the element where it is on screen
(spec:AST-094 FR6). Tests: a stop mid-dip, and a release with one axis past
an edge, keep the travel where it was.

* Merge main (#8505 landed) into the storyboards

# Conflicts:
#	internal/interaction-harness/README.md
#	internal/interaction-harness/src/curves.ts
#	internal/interaction-harness/src/harness.interaction.browser.spec.ts

* Merge #8348 (main with #8505 landed) into the frame evidence

# Conflicts:
#	internal/interaction-harness/src/curves.ts
#	internal/interaction-harness/src/harness.interaction.browser.spec.ts

* Merge #8045 (main with #8505 landed) into the recorder stand-down

# Conflicts:
#	internal/interaction-harness/src/curves.ts

* Merge #8446 (63218c8a: the harness line on main 42a30b47 with #8505) into the experimental touch layer

* docs(Popover): its changeset says Popover is the exit copy's first user

The exit copy's own changeset says nothing uses it, which is true of that
change alone; Popover's says its shrink plays on the copy, so the two read
right when they ship together.

* Merge 0400cb2e4d (#8076 with main through #8055's landing) as a dependency

* fix(Layer): embedded content stands in the exit copy as an empty box of its size

A deep copy re-creates embedded content: an iframe navigates again, autoplay
media restarts and a canvas comes back blank. Before the copy is inserted,
each iframe, object, embed, video, audio and canvas in it is swapped for an
empty box with the copied node's classes and inline style, sized to the live
node's box; the live layer is untouched. A test per kind (all six failed
before).

* Merge #8186 (0ba0b6b9: the exit copy leaves embedded content as empty boxes) into the Popover's grow from its trigger

* Merge 6c688655c6 (#8270 with #8076 0400cb2e and main 42a30b47) as a dependency

* Merge #8309 (a8650574: #8076 0400cb2e with the harness line on main) into the gesture hook fixes

* fix(core): a carried Reduce Motion move keeps its own call

When a later call carried an earlier call's waiting move, the landing knew
only its own call: setting or stopping the carried move settled the later
call as interrupted (and the earlier one later as finished), an earlier
handle's stop could freeze the later call's move on the same property, and
a call whose property a later call took over still resolved finished. Each
landed value now keeps the call whose move it is: setting or stopping it
settles that call, a handle stops only its own values, and a move a later
call takes over settles interrupted. Three tests fail on the previous head.

* Merge #8076 (0400cb2e: the harness line on main 42a30b47 with #8505) into the keyboard module

* test(gestures): the host never writes a touch-action wider than the author's, at any frame

spec:AST-094 FR18 as #8453 (DEC-8) rules it: the derived value is never
wider than the author's. The host wrote its own value at attach and read a
stylesheet's only after paint, so for a frame or two a trigger's none read
as manipulation. The case reads the author's none in the first frame and
sees nothing written before it; an element attached on screen gets its
value at that frame. Both fail on this head.

* fix(gestures): the host reads an author's touch-action in the next frame and writes nothing before it

An inline author value is the style's own and applies at once. A
stylesheet's is read once, batched, in the next frame's callback before it
paints, before the host has written any touch-action: the read styles
what that frame must style anyway, the first paint already shows the
intersection, and no frame ever shows a value wider than the author's
(spec:AST-094 FR18, DEC-8). An element attached on screen goes without its
derived value until that frame, under one. The tests that read the write
in the attach itself now take that frame first.

* test(gestures): the press tracker bundle carries only the UIKit groups it reads

NumberInput's stepper and every control reach PressTracker, which imports
the whole UIKIT_GESTURES table for three of its groups, so every one of
them ships the table (architecture:component-style-authoring INV6). The
bundle test now builds PressTracker beside the host; it fails on this
head.

* perf(gestures): the press tracker imports only the UIKit groups it reads

UIKIT_PRESS, UIKIT_PAN's hysteresis and UIKIT_CONTROL's tracking
expansion, by name: object properties do not tree-shake, so the whole
UIKIT_GESTURES table no longer ships with every control
(architecture:component-style-authoring INV6).

* test(gestures): a press tracker disabled under the finger reports nothing

Disabling a usePressTracker control while a finger is on it reported
touchCancel from the commit when it was the only enabled control (the
host's listener sync cancelled the press inside the Effect), and
touchUpInside at the lift otherwise. A disabled control tracks no touch,
and an Effect calls back no caller (react-component-runtime INV2, INV3).
Both cases fail on this head.

* fix(gestures): a press tracker disabled under the finger ends its press inside the release guard

The listener sync ends a press whose control is now disabled, and runs
the host update, with the release guard set: a disabled control tracks no
touch, so the lift reports nothing, and the Effect calls back no caller
whether the host stops listening or another control keeps it listening.

* Merge #8309 (the next-frame author read; the press tracker's per-group imports) into #8315

# Conflicts:
#	packages/core/src/gestures/__tests__/useGestureRecognizer.test.tsx

* Merge #8315 (d6a58453: #8309 a8650574, #8076 0400cb2e with #8446, main 42a30b47) into the host line

* Merge #8176 (e14f901e: #8076 0400cb2e with #8446's harness line, main 42a30b47) into the Popover's grow from its trigger

* docs(gestures): the haptic switch's label rule says what the code does

attachTapHaptic leaves a label alone when its control is tied by for, or
is itself a switch; a label wrapping its own control gets a switch that
hands each tap on to that control. The file header and the README said a
label that already labels another control gets none.

* Merge #8315 (#8309's next-frame author read; a tracker disabled under the finger; the haptic label rule) into #8336

* test(gestures): the host-line cases take the frame the host writes touch-action in

#8309's host reads an author's touch-action and writes its own in the
next frame (spec:AST-094 FR18, DEC-8). The cases here that read that
write (a kept press's manipulation, the pointer turning coarse, a
per-event-pointer swipe, a watcher beside a claiming pan) run that frame
first; what they check is unchanged.

* fix(interaction): the WebKit container runs as the invoking user under docker

Docker ran the Playwright image as root over the bind-mounted checkout, so
the test-results/ it wrote were root's and the next host run failed with
EACCES clearing them. Under docker the container now runs with the host uid
and gid (HOME=/tmp); rootless podman already maps the user. The README says
so.

* docs(interaction): a traced waitForAnimation on a CSS @keyframes animation still flushes its style

The traceRendering JSDoc and the README said waitForAnimation and a watch's
started() stand down inside a trace. That holds for script animations and
CSS transitions; on a CSS @keyframes animation (and, unwatched, a cancelled
CSS transition) they read the animation's timing, which flushes its style.
Both now say so and point to waitForRest or a wait after the trace.

* Merge 2c2397b981 (#8336 on #8315 d6a58453) as a dependency

* Merge #8336 (8588156218) into #8342

F2's line on her #8336 2c2397b981, mergeable with main; it carries #8270 6c688655c6. On top of her c32c2ba7e0; no conflicts; the hold's files are unchanged.

* fix(core): a held call still finds its start; a caught dismissal fades straight back; promotion keeps the stylesheet's will-change

- A call whose animations something paused before their first frame (a
  harness holding them, a page pausing every animation) never read a start,
  so a Reduce Motion move's landing never ran and the element stayed
  transparent. The call keeps looking each frame while its animations are
  paused without a start, until they resume (their start) or finish (its own
  clock).
- Under Reduce Motion a call that sets a value still waiting to land takes it
  over (the earlier call settles interrupted), and once nothing waiting is
  left, a call naming its own opacity replaces the earlier fade back in or
  restore: re-presenting a sheet mid-dismissal fades straight back up from
  where it was instead of dipping.
- Promotion merged only the element's inline will-change, so it replaced a
  stylesheet's will-change for the motion's length; without an inline value
  it now keeps the stylesheet's reasons beside its own and hands them back.
Three tests fail on the previous head.

* test(gestures): the host marks a recognizer's touch-action under a rule an author rule outranks

A touch-action written after a fresh subtree's first styling restyles
every descendant: opening the 200-year wheel spent 17.6 ms (4x CPU) on a
second recalc of its 218 elements when the host wrote its value in the
next frame. The cases ask for a mark set as the recognizer attaches, a
zero-specificity rule in the document or shadow root, the author's rule
in force from the first frame and the intersection written only where it
is narrower (spec:AST-094 FR18, DEC-8), and the mark gone at detach. All
four fail on this head.

* fix(interaction): rootless docker runs the WebKit container without --user

Rootless Docker maps the container's root to the invoking user, and any
other container uid to a subordinate host uid that cannot write the mounted
checkout, so --user made the WebKit run fail with EACCES there. The script
passes --user only to a rootful daemon (docker info reports no
name=rootless); the README and header say so.

* test(gestures): in a browser, the host's touch-action is in force from the attach, and a fresh subtree is styled once

Chromium and WebKit: an element reads its derived touch-action in the
attach's own task, an author rule's narrower none outranks it, and a
shadow root's element gets it too. Chromium's trace: a 300-row subtree
that mounts with a recognizer is styled once; today the host's next-frame
write restyles all 301 elements a second time. Both fail on this head.

* perf(gestures): the host marks a recognizer's touch-action under a rule an author rule outranks

As a recognizer attaches, the element carries the derived value in
data-astryx-touch-action, and its document or shadow root holds one
zero-specificity :where() rule per value (an adopted sheet, or a style
element where constructable sheets are missing). A subtree that mounts
with it is styled once: opening the 200-year wheel no longer restyles its
218 elements a second time in the next frame. Any author rule or inline
value outranks the mark, so from the first frame the value in force is
the derived one or the author's, never wider than the author's
(spec:AST-094 FR18, DEC-8). The next frame reads what is in force with
styles clean; only where an author rule won and both allow less tha…

This branch was successfully deployed

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants