Skip to content

test(interaction): curve sampling - #8044

Merged
cixzhang merged 47 commits into
meta:mainfrom
vjeux:interaction-harness-2-curves
Oct 26, 2026
Merged

cixzhang merged 47 commits into
meta:mainfrom
vjeux:interaction-harness-2-curves

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

Animation timing isn't verifiable today. Specs wait a fixed time and read one transform (the BottomSheet drag spec waits 40 ms, then checks > 5 px), so a curve can change shape, duration or starting velocity without a red test. Matching a measured reference curve needs the presented value at exact times and an oracle independent of the implementation.

Intended invariant

No product change. A curve claim is checked against the presented value at fixed times, never against wall-clock frames.

Change

  • curves.ts:
    • Hold the running document-timeline Web Animations (CSS ones included), each at its offset from the earliest start, and seek them; a second hold adds to the held set, and one the page cancels leaves it.
    • Read the presented transform and opacity, with the time actually presented (presentedAt, from the sampled element's own animations, just inside an end).
    • Finished, page-paused and scroll-driven animations are left alone. Release resumes only what was held, and resumes an endless animation rather than finishing it.
    • waitForAnimation, waitForRest. The page records every animation from its first frame or its creation, so waitForAnimation also reports a short one that ended before the first look. watchAnimations arms the record before an action.
  • math.ts: oracles that share no code with packages/core: cubicBezier, timingFunction, springStep, projectDecay, rubberBand, parseTransform, compareCurve.
  • The proofs' scope includes packages/themes/*/src/.

Second of four stacked pull requests, on #8043 (touch input). Storyboards (#8348) and frame evidence (#8045) follow. Until #8043 merges, review this pull request's own commits.

Evidence

  • Failure before the change: no instrument reads a presented value at an exact time. Polling after the action misses a short entrance on a cold page ("waitForAnimation: no animation started on the element").
  • Success after the change, in Chromium and WebKit:
    • A CSS transition matches its cubic-bezier within 0.05 px, including the sample at its end.
    • A spring baked into linear() matches the SwiftUI oracle within 0.15 px.
    • Staggered animations keep their offset, a sample is labelled from its own element's animations, and an endless animation resumes.
    • A 60 ms transition read 250 ms late, and a 50 ms script entrance on the page's first contact, are both reported.
  • Product/runtime behavior verified unchanged: no package source changes.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm test:interaction --project chromium (harness): 18 passed.
  • WebKit 26.5 through node internal/interaction-harness/scripts/webkit-container.mjs: 16 passed, 2 skipped (native fling; partial lift).
  • pnpm exec vitest run internal/interaction-harness: 23 passed; .github/scripts/ci-interaction.test.mjs passes.
  • Harness typecheck, eslint, prettier and the pre-commit repo checks: clean.

@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 26, 2026 9:19am UTC

Request Review

@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 26, 2026, 9:48 AM UTC

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

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Previews ready: Storybook and Sandbox were built with this PR's docsite. CI evidence will be added when available.

View Storybook for this PR · View Sandbox for this PR

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the curve-sampling and storyboard instruments work in Chromium, but the stacked diff and the CI wiring need fixes before this can land.

  • Land #8043 first and rebase, so this pull request shows only its own commit; as it stands the diff also carries all of #8043, 2,953 authored lines in total.
  • Feed pr-interaction's result into an existing required join, as test-native-swift feeds test, because today a failing interaction proof leaves every required check green, which docs/specs/AST-030/spec.md FR7 and FR11 do not allow.
  • Fix three harness defects: pnpm storyboards exits 1 with “No tests found” because no test is tagged @storyboard, the timer gate still runs callbacks cancelled with clearTimeout or cancelAnimationFrame while frozen, and an end sample reports the requested time although it is read 0.5 ms before the end.

[Automated review]

Comment thread .github/workflows/ci.yml Outdated
# them, so a change to an instrument is proven by its negative controls
# before a component spec relies on it. Chromium only on these runners;
# see the harness README for running WebKit.
pr-interaction:

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.

No required join reads this job's result: test needs test-ui, test-node, test-build, registry-contract and test-native-swift (line 887), and build needs build-storybook, build-sandbox and typecheck, so a failing interaction proof leaves every required check green. docs/specs/AST-030/spec.md FR7 and FR11 ask new coverage to feed an existing owner's join; folding this job into test the way test-native-swift is folded (its needs plus .github/scripts/ci-test-join.mjs, accepting skipped only out of scope and in merge groups) would close it.

Comment thread package.json Outdated
"test:a11y-contract": "playwright test --config playwright.config.ts --project chromium",
"test:docsite-browser": "playwright test --config apps/docsite/playwright.config.ts",
"test:interaction": "playwright test --config playwright.interaction.config.ts",
"storyboards": "playwright test --config playwright.interaction.config.ts --grep @storyboard",

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.

No test carries @storyboard yet, so this exits 1 with Error: No tests found. Tagging the storyboard self-tests (test.describe('storyboards', {tag: '@storyboard'}, …)) or adding --pass-with-no-tests fixes it.

const realInterval = window.setInterval.bind(window);
const realFrame = window.requestAnimationFrame.bind(window);
const hold = run => (gate.frozen ? gate.queue.push(run) : run());
window.setTimeout = (fn, ms, ...args) => realTimeout(() => hold(() => (typeof fn === 'function' ? fn(...args) : 0)), ms);

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.

Once the real timer fires while frozen, the wrapped callback sits in gate.queue, and the page's clearTimeout (not wrapped) can no longer cancel it, so thaw runs a callback the component cancelled. The same holds for cancelAnimationFrame and line 115, whose held callback also gets a stale timestamp because frozen is already false when the queue runs. Tracking queued entries by id in wrapped clearTimeout and cancelAnimationFrame would fix both; note too that frames(), waitForRest and touchStoryboard wait on this gated requestAnimationFrame, so they never resolve while frozen.

animation.currentTime = Math.min(t, end - inset);
}
const style = getComputedStyle(element);
return {t, transform: style.transform, opacity: style.opacity};

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.

For a sample at or past the end this returns the requested t, but the value was read at end - 0.5 ms (line 178), so compareCurve checks the oracle half a millisecond late: a linear 300 ms move of 200 px reads 199.667 at t = 300, 0.333 px off against a 0.05 px tolerance. Returning the time actually applied (or a separate presentedAt) would keep samples and oracle aligned; the storyboard frame labels have the same issue.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the curve-sampling and storyboard instruments pass in Chromium, but the CI wiring, the stacked diff and several instrument edge cases need fixes before this can land.

  • Feed pr-interaction into an existing required join, as test-native-swift feeds test, because today a failing proof leaves every required check green, which docs/specs/AST-030/spec.md FR7 and FR11 do not allow.
  • Land #8043 first and rebase, so this pull request shows only its own commits (1,687 lines instead of 3,158).
  • holdAnimations seeks every animation in scope to the same local time, so a finished fill: both animation replays in storyboards, staggered starts collapse, and a scroll-driven animation such as DateInput's wheel makes the seek throw.
  • The timer gate still runs callbacks cancelled with clearTimeout or cancelAnimationFrame while frozen, an end sample is reported at the requested time although it is read 0.5 ms earlier, and pnpm storyboards exits 1 because no test is tagged @storyboard.

[Automated review]

Comment thread .github/workflows/ci.yml Outdated
# them, so a change to an instrument is proven by its negative controls
# before a component spec relies on it. Chromium only on these runners;
# see the harness README for running WebKit.
pr-interaction:

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.

No required join reads this job: test needs check-scope, test-ui, test-node, test-build, registry-contract and test-native-swift (line 887), and build needs build-storybook, build-sandbox and typecheck (line 1264), so a failing proof leaves every required check green. docs/specs/AST-030/spec.md FR7 and FR11 ask new coverage to join an existing owner; feeding test as test-native-swift does (its needs plus .github/scripts/ci-test-join.mjs) would conform.

Comment thread package.json Outdated
"test:a11y-contract": "playwright test --config playwright.config.ts --project chromium",
"test:docsite-browser": "playwright test --config apps/docsite/playwright.config.ts",
"test:interaction": "playwright test --config playwright.interaction.config.ts",
"storyboards": "playwright test --config playwright.interaction.config.ts --grep @storyboard",

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.

No test carries @storyboard yet, so this exits 1 with Error: No tests found. Tagging the storyboard self-tests (test.describe('storyboards', {tag: '@storyboard'}, …)) or adding --pass-with-no-tests would make it run.

const realInterval = window.setInterval.bind(window);
const realFrame = window.requestAnimationFrame.bind(window);
const hold = run => (gate.frozen ? gate.queue.push(run) : run());
window.setTimeout = (fn, ms, ...args) => realTimeout(() => hold(() => (typeof fn === 'function' ? fn(...args) : 0)), ms);

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.

Once the real timer fires while frozen, the wrapped callback sits in gate.queue, and the page's clearTimeout (not wrapped) can no longer cancel it, so thaw runs a callback the component cancelled. The same holds for cancelAnimationFrame with line 115, whose queued callback also receives the stale frame time because frozen is already false when the queue runs.

(node.classList.length
? `.${[...node.classList].slice(0, 2).join('.')}`
: '');
const all = document.getAnimations().filter(animation => {

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 holds every animation document.getAnimations() returns, not only running ones, and the seeks then give each the same local time: a finished fill: both or forwards animation replays from its start (a fade-in that ended before the transition is filmed at opacity 0, 0.33 and 0.67), a scroll-driven animation (DateInput's wheel uses animation-timeline: view(y)) makes the seek throw The provided double value is non-finite, and animations started at different times lose their offset. Leaving finished and non-document-timeline animations untouched and seeking each by its offset from the hold would keep the frames to states the page presents.

}
const {a, b, c, d, e, f} = matrix;
return {
t,

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.

For a sample at or past the end this returns the requested t, but the value was read at end - 0.5 ms (line 252), so compareCurve checks the oracle half a millisecond late: a linear 300 ms, 200 px move fails a 0.05 px tolerance at t = 300 (199.667 against 200). Returning the time actually applied would fix the comparison and the storyboard labels.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the curve-sampling instruments need no spec decision and the waitForRest fix for a reversed run's end delay works, but at 2,097 authored lines this pull request is over the 2,000-line scope limit, and the animation-state waits can land on their own. Please land the recorder, waitForAnimation, watchAnimations and waitForRest with their animation state self-tests in their own pull request first and curve sampling on top, or explain in the description why the two cannot land apart.

  • Optional: a watch misses an animation object the page plays again (internal/interaction-harness/src/curves.ts:80), and the timeout message says "none running" while a run sits inside its delay (curves.ts:968-974).

[Automated review]

Comment on lines +968 to +974
if (Date.now() > deadline) {
throw new Error(
'waitForAnimation: no animation started on the element, none running ' +
'and none recorded since the last wait. If the action is the ' +
"page's first contact with the harness, take " +
'watchAnimations(locator) before it.',
);

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: this message also fires while an animation is running but has not yet presented minProgressMs, as inside its delay: waitForAnimation(box, {timeout: 300}) threw "none running" while a fade inside a 1,000 ms delay was running at 283 ms. Naming a running animation that is short of minProgressMs here would keep the message true.

@vjeux

vjeux commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

The backward self-test moved to #8505 with the waits, so the fix will be offered there.

Offered as uikit/f3-8044-review-0904 at 1974f39, one commit on a2ac6f9. The self-test "a run going backward is dated from when it began" took its reference start as performance.now() read after await animation.ready. Under the full WebKit suite, ready arrives 84 ms after the run starts, so its delayed case fails the 50 ms bound in every full run (2 of 2 here) while passing alone. Its three cases now read where the run began on the engine's clock (startTime - endTime / |playbackRate|, right after ready), with no bound changed. The full WebKit suite passes 2 of 2, and dating a backward run with the forward delay still fails it (300 ms).

On scope (2,097 lines, 936 of them self-tests): the animation-state waits and curve sampling read one model of a run: its start on the document timeline, its direction and playback rate, and where a held end begins (curveEnd, exposed as HeldAnimation.curveEndMs). waitForAnimation reports from and to through it, waitForRest judges rest by it, and holdAnimations, seekAnimations and sampleCurve present values through it. Each fix in this review (held ends, direction, rate) changed that model once, for both. Landed first, the waits would ship the model without the instruments that check its readings against presented values, and sampling on top would change the waits again.

…ll 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.

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

Recommended for approval: the curve-sampling instruments need no spec decision, and with the animation-state waits moved to #8505 this pull request is 1,369 authored lines. Before landing, please update the description, which becomes the squash commit's body: it still lists waitForAnimation, waitForRest, watchAnimations and math.ts with their evidence, and test counts from before the split. Optionally, leave an animation the page froze with playbackRate = 0 out of holdAnimations (internal/interaction-harness/src/curves.ts:210): today it is seeked as if it ran at rate 1 (curves.ts:328, :483), and releaseAnimations({finish: true}) then throws and leaves the other held animations paused.

[Automated review]

const target =
(animation.effect as KeyframeEffect | null)?.target ?? null;
return (
animation.playState === 'running' &&

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.

Optional: Chromium and WebKit report an animation the page froze with playbackRate = 0 as running, so it is held here and then seeked as if at rate 1 (playbackRate || 1 at lines 328 and 483): a move frozen at 73.3 px samples 20 px at t = 100 and stays there after release. finish() also throws for it at line 371, leaving the other held animations paused. Skipping animation.playbackRate !== 0 here, as for animations the page paused, with a self-test, would close it.

@cixzhang
cixzhang merged commit 4444d70 into meta:main Oct 26, 2026
70 checks passed
cixzhang added a commit that referenced this pull request Oct 26, 2026
# Conflicts:
#	internal/interaction-harness/README.md
#	internal/interaction-harness/src/curves.ts
#	internal/interaction-harness/src/harness.interaction.browser.spec.ts
@vjeux
vjeux deleted the interaction-harness-2-curves branch October 26, 2026 09:55
cixzhang added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
…te waits) into the storyboards

# Conflicts:
#	internal/interaction-harness/README.md
cixzhang added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
cixzhang added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
…recorder stand-down

# Conflicts:
#	internal/interaction-harness/src/curves.ts
cixzhang added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
meta#8176's head, from the maintainer, merges meta#8076's ee34b25 (meta#8446's
harness line, with main's meta#8044 curve sampling) and main 79a7a90, and
gives the trace verdict's fixture its devtoolsTasks. No conflicts;
`timing.ts` is meta#8176's, with meta#8484's keyboard export.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
meta#8176's head, from the maintainer, merges meta#8076's ee34b25 (meta#8446's
harness line, with main's meta#8044 curve sampling) and main 79a7a90, and
gives the trace verdict's fixture its devtoolsTasks. No conflicts;
`timing.ts` is meta#8176's, with meta#8484's keyboard export.
vjeux pushed a commit to vjeux/astryx that referenced this pull request Nov 3, 2026
# Conflicts:
#	internal/interaction-harness/README.md
#	internal/interaction-harness/src/curves.ts
#	internal/interaction-harness/src/harness.interaction.browser.spec.ts
vjeux pushed a commit to vjeux/astryx that referenced this pull request Nov 3, 2026
…te waits) into the storyboards

# Conflicts:
#	internal/interaction-harness/README.md
vjeux pushed a commit to vjeux/astryx that referenced this pull request Nov 3, 2026
vjeux pushed a commit to vjeux/astryx that referenced this pull request Nov 3, 2026
…recorder stand-down

# Conflicts:
#	internal/interaction-harness/src/curves.ts
vjeux pushed a commit to vjeux/astryx that referenced this pull request Nov 3, 2026
cixzhang added a commit that referenced this pull request Nov 4, 2026
…ns (#8446)

* test(interaction): real touch input for browser interaction proofs

Adds internal/interaction-harness (@astryxdesign/interaction-harness) and
playwright.interaction.config.ts: phone-sized touch projects in Chromium and
WebKit for *.interaction.browser.spec.ts specs.

Touch scripts are data (tap, drag with hold and rest, flick with an exact
release velocity and velocity profiles, hold-then-drag, pinch, rotate, any
path, a second finger mid-gesture), played as real engine input: CDP
Input.dispatchTouchEvent with scripted timestamps in Chromium, WebKit's own
input command in WebKit. The harness's self-test proves the timestamps, a
native fling and multi-touch delivery; a pr-interaction CI job runs the
proofs against each PR's Storybook build, and a container script runs the
WebKit project where host libraries are missing.

* fix(interaction): release only the lifted finger on a partial lift in Chromium

The Chromium driver sent a lift of one finger of several as a touchMove
listing the fingers still down, assuming CDP releases a point a move
omits. It does not: the lifted finger stayed down. A touchEnd that lists
the lifting fingers releases exactly those while the others keep moving,
so the driver sends that, and a self-test lifts one of two fingers and
checks the release, the other finger's moves and the touchend's
remaining touches.

Playwright's WebKit sends that touchend with no remaining touches, which
iOS never does. The harness does not work around it: drivers expose
partialLifts, and PARTIAL_LIFT_SKIP is the reason a proof cites when it
skips; the README lists it with the other engine limits.

* fix(interaction): join the proofs to test, keep their setup in scope, lift profiled flicks at their velocity

- pr-interaction now always reports and the `test` join requires its
  success (AST-030 FR7, FR11), shaped like test-native-swift: a Linux
  interaction-scope job decides, with the base's scope helper and failing
  closed, whether the harness, a component, Storybook, internal/a11y-spec,
  the workflow, package.json or pnpm-lock.yaml changed. Only then do the
  proofs take a 4-core runner; otherwise, and in merge groups (as with
  pr-a11y), the job passes without work.
- A profiled flick's last move runs at velocity times profile(1), so the
  finger lifts at the documented velocity, and releaseVelocity reads the
  last move instead of a 100 ms window mean.
- Docs: drop the /math subpath this package does not export yet; scripted
  timestamps arrive to 0.1 ms; the job comment describes the self-test it
  runs.

* fix(interaction): releaseVelocity measures from when the finger reached its previous position

A sample that repeats a position is not a move: frames that merge() inserts
for another finger, where this finger did not move, made the last move look
shorter, so a 10 Hz drag merged with a tap read 375 px/s instead of 300 and a
60 Hz drag whose other finger lifted 5 ms before its last move read about
3.6x too fast. The previous sample is now the first one at the previous
position, as the page sees it, with a merged case in scripts.test.ts.

* test(interaction): curve sampling and deterministic storyboards

Pause every Web Animation, seek it to a time and read the presented
transform and opacity, then compare the curve with oracles that share no
code with the motion under test: cubic-bezier, the SwiftUI spring
(response, dampingFraction, initial velocity), UIScrollView deceleration
and UIKit's rubber band. Storyboards photograph seeked animations at
t = 0, 16.7, 33.3 ... ms or each step of a scripted touch, and write a PNG
contact sheet plus the JSON trace a spec asserts, under the gitignored
test-results/interaction-evidence. A timer gate holds a component's own
timers while a filmstrip is taken. pnpm storyboards runs the tagged tests.

* fix(interaction): curves end before a held end value; rest judges presented values

An animation that keeps its end value in a run of identical final
keyframes (held so a later interruption can read it) reported its whole
duration as the curve: storyboards filmed the hold, waitForAnimation's
interval reached past the landing, and waitForRest, which also required
every animation to leave the running state and read only transform, timed
out. The curve now ends where that run starts (HeldAnimation.curveEndMs,
waitForAnimation's to, the default storyboard times), and rest is no
animation pending or before its curve's end plus the presented transform,
translate, rotate, scale and opacity (and ::backdrop opacity) still for 3
frames, whatever the playState. sampleCurve composes translate, rotate and
scale with transform, so curves of the individual properties are sampled.

* fix(interaction): hold only running animations at their own offsets, film no endless curve, let the page cancel gated callbacks

- holdAnimations holds only running document-timeline animations: a
  finished fill animation keeps its end value, an animation the page paused
  stays paused (release resumes only what was held), and a scroll-driven one
  is not seeked. Each held animation keeps its offset from the earliest
  start, so staggered starts stay staggered.
- A sample or storyboard frame at or past an end reports the time it was
  read at (presentedAt, half a millisecond inside the end), and curveOf
  reads oracles there.
- An animation that repeats forever no longer sets a storyboard's default
  length (it ran the worker out of memory); with nothing else to film,
  animationStoryboard asks for times.
- The timer gate queues held callbacks by id, so the page's clearTimeout
  and cancelAnimationFrame still cancel them; a held frame callback gets
  the time it runs; frames(), waitForRest and touchStoryboard use the real
  requestAnimationFrame, so they resolve while frozen.
- The storyboard self-tests carry the @storyboard tag that
  `pnpm storyboards` selects.

* fix(interaction): film from each animation's own offset, label samples from the element's own animations, resume endless ones

- animationStoryboard's default times run from the earliest start to the
  latest curve end among the animations that end, each seek at
  origin + t: beside a spinner that started earlier the animation under
  test no longer shows its start in every frame, and a second animation
  that starts later is filmed to its end.
- A sample's presentedAt (per channel: transform, opacity) comes from the
  sampled element's own animations, by keyframe property, not from any
  animation on the page.
- releaseAnimations({finish: true}) resumes an animation that repeats
  forever instead of finishing it (which throws), and always clears the
  held set.
- The interaction proofs' scope includes packages/themes/*/src/.

* fix(interaction): waitForAnimation sees a short animation that ended before it looked

waitForAnimation polled getAnimations() after the action, so an entrance
shorter than the first look (a cold page answers its first evaluate late)
had already finished: "no animation started".

The page now records every animation from the first call into curves.ts
on it, and on every later document: a frame loop on its own
requestAnimationFrame, the CSS animation and transition events, and
Element.animate as it is called, pending animations included (WebKit can
start and finish a short script animation between two frames of a fresh
page). waitForAnimation also reports an animation that started after the
last waitForRest or waitForAnimation and has finished, with finishedAt.
watchAnimations(locator) arms the record before an action that may be the
page's first contact with the harness.

* refactor(interaction): the storyboard layer moves to its own pull request

This pull request keeps the curve-sampling instruments: holding and seeking
animations, sampling presented values, the oracles, waiting for an
animation and for rest. The storyboards (storyboard.ts, the evidence
output, the timer gate and the `pnpm storyboards` script) and their tests
move to a pull request stacked on this one.

* test(interaction): a second hold adds to the held set

`holdAnimations` replaced the held set on each call, so a second hold left
the first set paused after `releaseAnimations` (it resumed only the newest
set), and `waitForRest` then reported the frozen frame as rest. A later hold
now adds to the set: everything held stays held until the release, and
offsets count from the earliest start of all of it. The self-test holds two
elements in turn, releases, and checks the first runs to its end; on the
old code it stays frozen 50 px into a 300 px move.

The self-test's header and the `curves.ts` SYNC line no longer describe the
storyboard and timer-gate layer, which moved to its own pull request.

* test(interaction): deterministic storyboards

animationStoryboard films held animations by seeking them (t = 0, 16.7,
33.3 … ms, from the earliest start to the latest curve end among the
animations that end, each at its own offset); touchStoryboard takes a
frame per scripted touch event. Each writes a PNG contact sheet and a JSON
trace of its measurements to the evidence directory and attaches them to
the report; the spec asserts on the trace.

The timer gate (installTimerGate, freezeTimers, thawTimers) holds the
page's timers and frame callbacks while a storyboard photographs, so a
component that finishes an animation from a timer cannot do it behind the
held animation's back; the page can still cancel a held callback, and the
harness's own frame waits (and the animation recorder) keep the page's
real requestAnimationFrame. `pnpm storyboards` runs only the tests tagged
@storyboard.

* test(interaction): a touch filmstrip's handler clock follows its pacing

`touchStoryboard` said velocity-dependent behavior is unchanged in
Chromium. That holds for velocity read from event timestamps, which keep
their scripted times, but a handler that reads `performance.now()` or
`Date.now()` (Item's and Toast's swipes) sees one event per photograph,
about 100 ms apart, so a flick that dismisses when played can settle back
when filmed. The doc and the README now state that limit and point such
gestures at a screencast, and a self-test shows both clocks: scripted
16.7 ms gaps in `timeStamp`, more than two frames in the handler's clock.

* test(interaction): frame evidence and the BottomSheet exemplar

Timestamped composited frames (Chromium's screencast and WebKit's own),
a marker the frames can find, and the busy-main-thread proof: block the
page's main thread mid-flight and show the element still moving every
frame, with a requestAnimationFrame animation that freezes as the
negative control. Chromium trace counts of Layout, Paint and style work
inside an animation window, and long tasks. The exemplar spec proves the
BottomSheet drag to a detent with all of it: the drag follows the
finger, a flick dismisses, the settle matches its timing function, keeps
advancing through a blocked main thread in Chromium and WebKit, does no
Layout or Paint, and gets a drag and settle storyboard.

* test(interaction): make the busy-main-thread verdict robust to a loaded machine

The proof asserted a stall under 40 ms and near-exact frame counts, so a
dropped screencast frame or two on a loaded runner failed it, and frames
delivered out of order read as the element stepping backwards.
busyWindowProof now returns a verdict that tolerates what load does to a
screencast and nothing a frozen animation does: a median frame interval
of at most 20 ms, no stall longer than three screencast intervals, and
at least 90% of the window's whole frame intervals presenting a new
position (one miss always allowed), with the raw numbers in a summary.
Screencast frames are sorted by presentation time, the cadence comes
from the frames around the window, and blockMainThread can block from
inside the page in the frame an animation has run, so a short settle is
still judged at length on a busy machine. The exemplar judges its settle
until it is within 2 px of rest, since the screencast rounds to whole
pixels. A unit test covers the limits; the rAF negative control still
fails every criterion.

* test(BottomSheet): pin the settle's easing and duration instead of reading them from the animation

The settle-curve oracle took its easing and duration from the animation under
test, so it passed a 900 ms ease-in or a 150 ms linear settle as readily as
the real one. The spec now asserts the theme's values (the default
--ease-standard, cubic-bezier(0.24, 1, 0.4, 1), over the neutral theme's
--duration-medium, 300 ms) and builds the oracle from them; the header no
longer claims 410 ms.

* test(interaction): block after the frame's rendering update; rebase WebKit frames on its clock

- `blockMainThread`'s `during` path ran its loop inside the rAF callback of
  the frame that saw the animation. WebKit hands a newly started animation
  to its compositor in that frame's rendering update, which runs after rAF
  callbacks, so the loop held the hand-off and even a compositor animation
  froze (2 of 29 frames moved). The loop now runs from a task queued in that
  frame.
- WebKit's screencast frames were rebased onto the wall clock by taking the
  first frame as the start, which shifted every frame earlier by however
  long that frame took to come (60–100 ms). They are now rebased by the
  measured offset between the wall clock and CLOCK_MONOTONIC, which WebKit
  stamps them on.
- `busyWindowProof` fails a judged part shorter than four frames (the
  animation under test was not moving during the block) instead of passing
  it, takes the end value from `settledAt` when given (WebKit can present a
  stale position once an accelerated animation ends while the main thread
  is blocked), and reports where the longest stall starts.
- The BottomSheet busy case arms the block before the release and reads
  where the settle ends from the page.

* Merge branch 'main' into interaction-harness-2-curves

* Merge branch 'interaction-harness-2-curves' into uikit/f3-storyboards

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

* test(interaction): a held animation the page cancels leaves the held set

Retargeting a CSS transition cancels it. If that happened while it was
held, `seekAnimations` and `sampleCurve` set its time again, which revived
it over the page's own new transition, and `releaseAnimations` replayed it
from the start. Seeking, sampling and releasing now drop an `idle` animation
from the held set first, and times count from a fixed origin (the earliest
start held until the release), so dropping one never moves the others. The
self-test retargets a held transition, seeks, releases and waits for rest:
the cancelled transition stays idle and the box ends where the page sent
it. On the old code the cancelled transition is still held after the seek.

* Merge branch 'interaction-harness-2-curves' into uikit/f3-storyboards

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

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

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

* docs(interaction): the touch filmstrip's clock limit names no missing instrument

`touchStoryboard`'s doc and the README pointed a clock-timed gesture at
`startScreencast` and `castStoryboard`, which this branch does not have. They
now say a storyboard cannot show such a gesture and to record it in real
time.

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

* docs(interaction): the touch filmstrip's clock limit names the screencast instruments

With frame evidence in the harness, a clock-timed gesture a storyboard
cannot show is recorded with `startScreencast` and `castStoryboard`: the
doc and the README name them.

* test(interaction): a hold stays where it was read

`pause()` only schedules the pause: the engine takes the hold time at its
next frame, so a held animation stayed held a frame past `heldAtMs`, and a
read right after the hold varied by a frame between runs. Setting the
current time right after `pause()` completes a pending pause at once, where
`heldAtMs` read it. The self-test holds a 1 s move and checks it is still
at `heldAtMs` two frames later; on the previous code it reads one frame
later in Chromium (16.6–16.7 ms) and 15–70 ms later in WebKit.

* Merge branch 'interaction-harness-2-curves' into uikit/f3-storyboards

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

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

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

* test(interaction): a block never starts on a pending animation

`blockMainThread({during})` counted an animation as running as soon as its
current time reached `minProgressMs`. An animation created in the frame the
page looks is still pending, not on the compositor yet, and at
`minProgressMs: 0` the block started on it and froze it: in WebKit
deterministically, and in Chromium on a Lightbox page while the block still
ran inside the frame's callback. A pending animation no longer counts, and
`minProgressMs` is raised to one frame (16 ms), since in WebKit an
animation's start time resolves before its layer is flushed.

The self-test creates the animation in the frame the helper looks and
blocks at `minProgressMs: 0`. On the previous code it fails 6/6 in WebKit
(0 frames presented through the block); now it passes 10/10 in WebKit and
6/6 in Chromium.

* test(interaction): the WebKit container keeps compiled shaders between runs

WebKit composites through Mesa's software GL in the Playwright image, which
compiles each shader variant the first time a page draws it. Mesa caches
what it compiles, but the cache lived inside the container, so every run
started cold: its first tests paid 550–680 ms for the first frame of a
blurred or newly animated layer, and a 683 ms animation could end before it
was ever presented or held.

The script now keeps the cache on the host (per image, under
~/.cache/astryx-webkit-shaders, or ASTRYX_WEBKIT_SHADER_CACHE) and points
MESA_SHADER_CACHE_DIR at it. The first frame of a blurred minimize in a
fresh container drops to 75–147 ms. The self-test checks, inside the
container, that the cache is the host's and that Mesa writes to it; with
the previous script it fails.

* Merge commit 'refs/f3/main' into interaction-harness-1-touch

# Conflicts:
#	package.json

* Merge branch 'interaction-harness-1-touch' into interaction-harness-2-curves

* Merge branch 'interaction-harness-2-curves' into uikit/f3-storyboards

# Conflicts:
#	package.json

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

* ci: the harness's typecheck runs through pnpm typecheck, once

Since main's root `pnpm typecheck` (#8390) runs every workspace package's own
typecheck script, the separate "Typecheck interaction harness" steps in
ci.yml and deploy.yml ran it a second time, and their comment ("the only
gate over it") no longer held. Both steps go. The routing test that pinned
them becomes one more directory in "keeps every typecheck gate that guarded
main": internal/interaction-harness keeps the typecheck script that
pnpm typecheck reaches.

* test(interaction): a watch on first contact ignores what already runs

The recorder's first look at the document came a frame after it started, so
on a page the harness touched for the first time, watchAnimations armed
before the recorder had seen an animation already running there (a
spinner). That animation then read as started by the watched action:
started() resolved with it with no action at all, or returned it instead of
the animation the action started. The recorder now records once as it
starts, before any watch arms. The self-test starts an endless spinner
before the harness touches the page, then checks that the watch reports
nothing until a 300 ms animation starts, and then only that one.

* Merge branch 'interaction-harness-1-touch' into interaction-harness-2-curves

* test(interaction): a later hold never moves the first hold's times

Held times count from an origin, the earliest start among the held
animations. A second holdAnimations that took an animation which had
started earlier than the first set moved that origin, so the offsetMs the
first hold had returned went stale, and seeking or sampling its animations
read them early. The origin is now the one the first hold set, until the
release; a later hold's earlier-started animation gets a negative offsetMs.
The self-test starts a 600 ms linear move 100 ms after another animation,
holds the move first, then the other, and samples the move at 0, 150 and
300 ms: 0, 75 and 150 px. On the previous code it read 0, 33 and 108.

* ci: pin the interaction routing's fail-closed edges by running them

AST-030 FR9: removing a fail-closed edge must fail a test. The routing test
only read the decide script's text, so turning its unknown default into
"out of scope", or recording every helper failure as out of scope, or a
guard step's `exit 1` into `exit 0`, left it green. It now runs the decide
script under bash -eo pipefail with a stub git: a helper that answers in
scope, out of scope or unknown, a base that cannot be fetched, a helper
missing at the base, no base, a docsite-only change and a merge group, and
checks the `applies` output of each. It also runs each guard step and checks
that it fails. Each of those five mutations now fails it.

flick's doc and the README said a velocity tracker reads exactly `velocity`
for any profile ending at 1. That holds for the script's last move (what
releaseVelocity reads); a tracker that blends recent intervals (INV10) reads
it only when the profile is flat over them, as the default is.

* Merge branch 'interaction-harness-1-touch' into interaction-harness-2-curves

# Conflicts:
#	.github/scripts/ci-interaction.test.mjs

* docs(interaction): seek and sample times count from the held origin

Since a later hold keeps the first hold's origin, a later-held animation
that started earlier has a negative offset, so the file header's "each
keeping its offset from the earliest" and sampleCurve's "ms from the held
animations' start" no longer described it. Both now name the held origin.

* ci: a head cut before the interaction proofs passes with a notice

pr-interaction runs the proofs on the pull request's head. Once the proofs
land on main, an in-scope pull request whose branch predates them has no
playwright.interaction.config.ts, and Playwright would fail the required
`test` check until it merged main. The scope decision now passes such a
head with a notice: the head has no config, and the pull request's own diff
does not change it (the base-loaded scope helper says so). A pull request
that deletes the config changes it, so the proofs still run and fail; a
head that cannot be fetched, an unknown helper answer or an unknown scope
also runs them.

The routing test runs the decide script with a stub git for each of those
cases, and each mutation of the new edges (the head fetch, the HEAD_SHA
guard, `touches=0`, `|| touches=$?`, the `= 1` comparison, the in-scope
condition) fails it.

* Merge branch 'interaction-harness-1-touch' into interaction-harness-2-curves

* ci: a head cut before the interaction proofs passes with a notice

pr-interaction runs the proofs on the pull request's head. Once the proofs
land on main, an in-scope pull request whose branch predates them has no
playwright.interaction.config.ts, and Playwright would fail the required
`test` check until it merged main. The scope decision now passes such a
head with a notice: the head has no config, and the pull request's own diff
does not change it (the base-loaded scope helper says so). A pull request
that deletes the config changes it, so the proofs still run and fail; a
head that cannot be fetched, an unknown helper answer or an unknown scope
also runs them.

The routing test runs the decide script with a stub git for each of those
cases, and each mutation of the new edges (the head fetch, the HEAD_SHA
guard, `touches=0`, `|| touches=$?`, the `= 1` comparison, the in-scope
condition) fails it.

CI-Rerun: main's gate test (fixed in #8406) failed this head's test-node

* fix(interaction): a watch keeps the start of an animation the page cancels

waitForAnimation and watchAnimations(…).started() built an animation's
active interval from its startTime. A page that cancels a finished
animation (an entrance whose class is removed on animationend) nulls that,
so the entrance was reported as starting at the page's time origin, before
its trigger. The recorder now keeps each animation's start time in its
entry: from startTime once it resolves (read on every recorder pass), or,
for one cancelled before any pass read it, back from where it finished.
The interval falls back to it when startTime is null.

The new self-test removes an entrance's class on animationend, 200 ms
after the page loaded, and checks that the reported start follows the
trigger. On the previous code it read about 250 ms before the trigger in
Chromium and WebKit.

* chore(interaction): the WebKit container script moves up the stack

Nothing in this change runs internal/interaction-harness/scripts/
webkit-container.mjs: CI runs the Chromium project, and the script only
runs the WebKit project locally inside the Playwright image on hosts whose
system libraries are too old for Playwright's WebKit build. The script, its
README paragraph and the config comment that names it move to the stacked
change whose WebKit evidence first runs through it, which keeps this one
under the 2,000-line limit for a pull request.

* Merge branch 'interaction-harness-1-touch' into interaction-harness-2-curves

* chore(interaction): the BottomSheet detent exemplar leaves the harness change

The exemplar spec pins BottomSheet outcomes that the component's contract
does not state yet, which is a decision for BottomSheet's owner, and it
took this change past the 2,000-line limit for a pull request. It moves,
with the core package's development dependency on the harness and its
README and config mentions, to a pull request of its own stacked on this
one, so this change is the frame-evidence instruments alone.

* fix(interaction): a storyboard retakes a photograph Chromium returns empty

Chromium photographs a page by copying its compositor surface, and answers
"Unable to capture screenshot" when that copy comes back empty: right after
the page's surface changes (a navigation, a resize) the view can have no
surface to copy. Chromium retries five times itself, but without waiting
for a new frame, so a gap longer than a few tasks exhausts them. One CI
run failed the storyboard self-test that way on its first photograph,
about 100 ms after the page loaded.

Storyboard.capture now takes such a photograph again once the page has
presented two more frames, up to three attempts in all, and lists each
retake under `recaptures` in the trace. Any other error, or a third empty
copy, still throws.

The new self-test makes the page's screenshot fail once with Chromium's
message: the previous code threw, in Chromium and WebKit; now the second
capture comes at least two frames later and the trace records it, and
captures that keep failing still throw.

* test(interaction): pin what the long-task log sees; the cache test watches its own run

The long-task log reads the Long Tasks API, which reports the tasks of the
page's own event loop. A DevTools page.evaluate, such as blockMainThread
without `during`, is not one of them: a 300 ms block of that kind left the
log empty while the trace counted a 300 ms task. installLongTaskLog now
says so, and a self-test pins both sides: a 120 ms timer task is in the log,
and the 300 ms evaluate is in the trace's long tasks but not in the log.
Without the log installed, the test fails.

The shader-cache test passed from a warm cache even if Mesa stopped writing
there. It now launches its own browser with an empty directory inside the
host-kept mount and expects this run's shaders to appear in it; with Mesa's
cache disabled it fails.

* docs(interaction): the storyboard retake waits two frames, three attempts in all

The recaptures doc and the self-test's title said a retake comes "a frame later", and the README said "up to three times"; capture waits two frames and makes at most three attempts in all. The wording now says so.

* test(interaction): the self-test films a cast window

castStoryboard was the one instrument the self-test did not exercise. The
new test records a screencast of a running animation as JPEG (WebKit's
frames always are), films a window of its middle frames zeroed on an
earlier one, and checks that the filmstrip keeps exactly the presented
frames inside the window, labels each from the zero, hands the data
callback each frame's presentation time, and stores every cell as a PNG;
a window with no presented frame in it films nothing, and writing it fails.
Dropping the window filter, labelling from the raw time, keeping the JPEG
bytes, or passing the zeroed time to the callback each fails it.

* Merge branch 'interaction-harness-2-curves' into uikit/f3-storyboards

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

* chore(interaction): the WebKit container script lands with the storyboards

internal/interaction-harness/scripts/webkit-container.mjs left the
touch-input change to keep it under the size limit, since nothing there
runs it. It returns here unchanged, with its README paragraph and the
config comment that names it: the storyboard evidence is the first that
runs the WebKit project through it on hosts whose system libraries are too
old for Playwright's WebKit build.

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

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

* Merge remote-tracking branch 'refs/remotes/origin/main' into interaction-harness-1-touch

* ci: the interaction jobs keep to the 15-minute budget and report their durations

Since #8427 every job that can run on a pull request carries a
`timeout-minutes` of at most 15, and `ci-duration` waits on every one of
them to report run times. `pr-interaction` gets the budget's 15 minutes,
like the other proof jobs, and `interaction-scope` 5, like the other jobs
that only classify; both join `ci-duration`'s needs.
`ci-duration-guard.test.mjs` failed three ways on this branch merged with
main (no timeout on either job, 26 jobs expected in the report against 24
listed) and passes now.

* Merge branch 'interaction-harness-1-touch' into interaction-harness-2-curves

* Merge branch 'interaction-harness-2-curves' into uikit/f3-storyboards

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

* fix(interaction): the animation recorder stands down while a trace runs

The animation recorder runs a callback every frame, which makes every frame
a main-thread frame: Blink then restyles each running animation's target,
a composited one included, and lays out an anchored one, and each of its
reads of document.getAnimations() flushes style. A rendering trace counts
exactly that work, so a "no Layout" window counted one Layout per frame
that the page under test never caused.

traceRendering now sets `__harnessRenderingTrace` before its start mark.
While it is set, the recorder runs no frame callback and does not read the
page's animations on CSS animation events; its animate() wrapper still
records script animations, reading no style. After the end mark,
traceRendering clears the flag and calls `__harnessAnimations.resume()`,
which catches up on what started meanwhile, outside the counted window,
and runs the recorder's frames again. A recorder that starts during a trace
still reads once, at its start, so what already runs is never taken for
something the watched action started.

Two self-tests. With a trace flagged, a CSS transition and a script
animation start: the recorder reads nothing (the previous one read 16-17
times in Chromium and 11-12 in WebKit in the same 200 ms), reads every
frame again once resumed, and the watch reports both. And an anchored
element's composited animation, traced with the recorder running, lays out
0 times in its steady middle, where the previous code counted 24; a page
that asks for a frame every frame still lays it out in each.

Found and patched by the menus lane; adapted to the recorder's current
first-contact read.

* fix(interaction): a trace still records CSS animations that start and end inside it

While a trace ran, the recorder skipped its reads on CSS animation and
transition events, and its catch-up read after the trace sees only what
is still running, so a CSS transition or animation that started and ended
inside the trace was never recorded: a watch taken before the trace threw
"no animation started". During a trace, each such event now reads the
animations of the element it names, once, at that animation's start (its
subtree for a pseudo-element), with no frame callback and no document-wide
read.

The trace self-test on the anchored page runs a 400 ms CSS transition and
CSS animation inside traceRendering: both are reported with the time they
finished, and the steady middle still counts no Layout. The flag self-test
now starts a CSS transition and a CSS animation that end inside the
flagged window, beside a script animation: no document-wide read, at most
one element read per start event, and all three reported after the
resume. On the previous commit both tests failed, in Chromium and (for the
flag test) WebKit.

* Merge main (#8043 landed) into the curve sampling

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

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

* Merge branch 'interaction-harness-2-curves' into uikit/f3-storyboards

* fix(interaction): curve samples stay true for percentage translates, pseudo-elements and delayed transitions

- sampleCurve resolves a percentage translate against the unrounded border
  box (offsetWidth rounds it) and refuses what it cannot resolve (a calc())
  instead of reading NaN.
- A ::before or ::after animation no longer counts as its element's own, so
  it cannot label the element's samples with its clock.
- waitForAnimation's minProgressMs counts progress after a transition's
  delay.

Each has a Chromium self-test.

* fix(interaction): compareCurve fails a point it cannot compare

A sample the reference has no value for, a non-finite sampled value or an
oracle with a NaN parameter now reads as an infinite error and fails, instead
of being skipped and passing with maxError 0.

* fix(interaction): the busy-main-thread verdict judges the frames the screencast delivered

busyWindowProof failed any window whose screencast frames came more than
20 ms apart. That measures the screencast as much as the animation: a loaded
machine's screencast delivers one frame in five or six, and a compositor
animation that moved on every one of them failed (660 ms judged at 100 ms per
frame, 6 of 6 moved, median 100 ms > 20 ms). A frozen main-thread animation
presents no frame at all during a block, so the stall and moved-frame
criteria, both counted in the screencast's own intervals, fail it at any rate.

The default verdict now requires a presented frame in the judged part and
leaves the median out; maxMedianFrameMs is an opt-in for a proof that claims
display rate. startScreencast takes everyNthFrame, and the self-test runs the
compositor and rAF animations at one frame in six too.

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

* Merge main (#8462 curve oracles and #8053 landed) into the curve sampling

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

* Merge remote-tracking branch 'refs/remotes/fork/interaction-harness-2-curves' into uikit/f3-storyboards

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

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

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

* fix(interaction): curve ends under a non-linear effect easing, and rotate about any axis

- curveEndMs and waitForAnimation's end read a held end value only under a
  linear effect easing (a keyframe offset is progress, not time); otherwise
  the curve runs to the full end.
- sampleCurve composes rotate on its parsed axis (x, y, z or a vector), and
  refuses what it cannot parse, as translate does.
- The calc() self-test finishes the first animation before starting the next,
  so no frame passes between them.

Each has a Chromium self-test.

* Merge remote-tracking branch 'refs/remotes/fork/interaction-harness-2-curves' into uikit/f3-storyboards

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

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

* fix(interaction): waitForRest stands down while a trace runs, as the recorder does

A waitForRest awaited inside a traceRendering body judged rest from a
per-frame callback, which made every frame a main-thread frame again: 24
Layouts and 24 style recalculations in the anchored fixture's steady middle,
against 0 with a plain timeout.

While a trace is flagged it now looks at the element's animations once and
waits on a timer for the latest scheduled curve end, reading no style; one
not started yet is looked at a frame later, and a trace that ends hands over
to the per-frame check. Its self-test sits beside the recorder's: 0 Layouts
with the wait in the body, and the body still lasts the curve.

* fix(interaction): a held end is solved through a cubic-bézier easing, and only for a forward run

curveEndMs (and so waitForAnimation and waitForRest) reads a held end only
for an animation that plays forward: reversed or alternating, the held run is
where its motion starts, so the curve runs to the full end. Under a linear or
cubic-bézier effect easing (the CSS keywords included) the time the held run
starts is solved from the curve; under any other easing the curve runs to the
full end, and the README and JSDoc say waitForRest then waits the hold out.
Self-tests cover the solved end and the reversed run.

* fix(interaction): judge a just-started animation from when it reaches the screen; busy self-tests resolvable on WebKit's 2 px grid

Two WebKit flakes in the busy-main-thread self-tests, both from what a
loaded machine shifts, fixed without changing a limit:

- A block 16 ms into a transition opened with a stall in every run: the
  transition reached the screen 50-100 ms into the block (WebKit's compositor
  hand-off), 2 intervals unloaded and 4 under load, which failed. When the cast
  saw the element at rest before the block, judging now starts at its first
  presented change, still ending with the block and still needing four
  intervals; onScreenFromMs and the summary report it. An element already
  moving, or one no frame showed at rest, is judged from the block's start.
- WebKit's casts are captured at half resolution: positions move in 2 CSS px
  steps, and the self-tests moved about 2.4 px a frame, so a frame delivered a
  few ms early showed no step and read as not moved. The busy self-tests now
  move 560 px in 1,600 ms on their own page (about 4.8 px a frame), and the
  proof reports stepPx and pxPerFrame and notes motion under two steps per
  frame (never a failure).

Screencast.frameCount() lets a proof wait for the cast's first frame.

* Merge commit 'e2da8b9eba' into uikit/f3-recorder-standdown

* fix(interaction): an animation reversed by reverse() reads to its full end

A negative playback rate runs the keyframes backward like a reverse
direction: its held run is where the motion starts, so curveEndMs (and
waitForRest and waitForAnimation) read to the full end. Self-test added.

* fix(interaction): a reverse()d animation is reported from its real start and refused by a hold

Chromium gives an animation running backward a startTime where it would
reach 0 (a full duration in the future), so waitForAnimation reported it a
duration late. It now dates such an animation from when its current time
stood at its end. holdAnimations refuses it with a clear error: seeking and
sampling run a curve forward, so it cannot be read. The self-test awaits the
animation's ready promise (reverse() is pending until then), checks the
reported interval, and expects the refusal; the README says so.

* fix(interaction): a traced waitForRest waits on the real timers, which a frozen gate cannot hold

Inside a traced body waitForRest scheduled its wait with the page's
setTimeout, which installTimerGate replaces and holds while freezeTimers is
on: with the gate frozen it neither resolved nor reached its deadline until
thawed. The gate now keeps its real setTimeout as `timeout` beside its real
`frame`, and the traced wait uses it. Its self-test, beside the anchored
one, freezes the gate around a traced wait: "held" on the previous code,
resting now.

* fix(interaction): a held run counts only when it reaches offset 1 and keys every property

A property keyed only before the held run, or a last keyframe short of
offset 1, gets an implicit end frame, so the element keeps changing after
the run starts; curveEndMs now reads such an animation to its full end, with
a self-test for each case. The reverse() self-test takes its watch before
the animation starts, so it reads that animation and not earlier ones. The
README lists math.ts once.

* fix(interaction): the busy verdict reads the compositor's own frames where the screencast skipped them

Under parallel load Chromium's screencast skipped frames at fixed points of a
block (about +365 and +465 ms) while the compositor kept presenting every
16.7 ms and the marker kept moving, so the verdict counted the skipped frames
as not moving and measured a 66.9 ms stall: 4 of 19 recorded runs failed.

startCompositorTrace records when the compositor presented each frame
(Display::FrameDisplayed, Chromium; [] elsewhere). Passed as `presented`, a
gap between two moved frames with nothing delivered inside it is measured
between the compositor's own frames: frames it presented there count as
presented (recorderSkipped, in the summary), and a gap it did not present
through is a stall as before. Gaps at the judged part's edges, or holding a
delivered frame that did not move, are judged from the screencast. No limit
changes.

A recorded run is replayed as a unit test (fails without the record, passes
with it), beside controls the record never excuses: a frozen element while
the compositor draws, a compositor stall, an unmoved delivered frame inside
a gap, repeated real drops, an edge gap, an empty record. In Chromium the
self-test skips four screencast frames mid-block (passes with the record),
and its rAF control still fails with it: the compositor presents nothing
during that block.

* Merge commit '7c8ab74748' into uikit/f3-recorder-standdown

* fix(interaction): a traced waitForRest looks for a few frames before settling on no animation

Inside a trace, waitForRest settled on its first look when the element had
no animation yet, where the per-frame check needs `frames` still frames: an
animation the action started two frames later began 8-16 ms after the
traced window had closed, so a "no Layout / Paint" count read 0 for motion
the window never held. Finding nothing, the traced wait now looks again
`frames` times a frame apart (on the gate's real timer) before settling. Its
self-test starts the animation two frames after the action and checks the
traced window holds all of it.

* test(interaction): held offsets against the runners' own start times

The holding self-test asserted the second runner's held offset was over 80 ms because it started 100 ms after the first. A start time resolves at the animation's first committed frame, so on a loaded machine the first runner's start landed late and the offset read 75-78 ms. It now reads both start times from the page and asserts the held offset equals their difference; the first runner's first frame is held back 60 ms, as load does, so the old assertion fails every run.

* fix(interaction): a reversed run's progress counts from its end; waits, seeks and samples go through the playback rate

The review's items on 2efaf04232:

- waitForAnimation counted a run's progress as currentTime minus its delay,
  which a run reversed by reverse() meets in the frame it starts (its current
  time starts at its end), so a wait could return before Chromium lists the
  run and the hold resolved [] instead of refusing it. A backward run now
  progresses from its end, and progress is measured on the timeline.
- At a playback rate other than 1, waitForAnimation's from and to, and
  seekAnimations' and sampleCurve's local times, read the effect clock: a
  1,000 ms curve at rate 2 reported a 1,000 ms interval and a seek to t
  presented the curve at t. They now go through the rate (a hold still
  refuses a backward run).

A self-test pins each: a reversed run's 100 ms wait returns once it has
presented 100 ms (16.7 ms in Chromium and 84 ms in WebKit before), and at
rate 2 the interval is 500 ms and a seek or sample at t reads the curve at 2t.

* fix(interaction): the busy verdict counts the frames a screencast delivered, not its median interval

Without a compositor record (every WebKit run), the moved criterion counted
the frames the judged part should hold at the median interval of the frames
around the block. WebKit's casts mix short and long intervals, so the median
lands on either: the same 46 moved frames were judged against 40 to 50
expected frames across six runs, and a cast cycling 11.7, 11.7 and 17 ms with
every frame moving failed at 49 of 56.

The criterion now counts the frames the screencast delivered in the judged
part: a delivered frame that shows no new position is a miss, and a frame it
did not deliver is a gap, judged by the stall check. With a compositor record
it still counts the compositor's frames, and a part that delivered nothing is
still judged against its span, so a frozen animation fails every criterion.
deliveredFrames reports the count. No limit changes.

* Merge commit 'a2613849a20b17740a8b786ccdaa1ae282f12177' into uikit/f3-recorder-standdown

* fix(interaction): a run going backward is dated from when it began

Chromium gives a run going backward a startTime where its current time would
reach 0, a whole run after it began. waitForAnimation and watch.started()
now anchor it at startTime minus endTime over the speed, in describe and in
the recorder's saved start (so one the page cancels when it ends keeps its
real start), and take from/to from the end delay and endTime minus the
delay, which play first and last going backward. A self-test covers a
delayed reverse(), one that ended before the look, and one cancelled when it
ends; it failed by 296 ms before (Chromium, 27/27 and 5x repeat pass).

* fix(interaction): a finish read before its event goes through the rate, and a backward end delay is not progress

waitForAnimation's fallback finish time (read before the finish event is
delivered, right after finish()) now goes through the playback rate's speed,
and for a run going backward is its startTime; it was a whole run late for a
reverse()d run and 500 ms late at rate 2. minProgressMs no longer counts a
backward run's end delay, which plays first and presents nothing. Self-tests
for both; the finish case failed by 1,000 ms before (Chromium, 27/27 and 5x
repeat pass).

* fix(interaction): a traced waitForRest waits for a run going backward until it finishes

While a rendering trace runs, waitForRest waits on timers for each curve's
time left, computed as its end less its current time. Going backward
(reverse(), a negative playback rate) the current time falls from the end
time to 0, so that difference is the time already played: a reversed move
with a 200 ms end delay settled within 50 ms, before it began to move, and
one without waited about twice its length.

Backward, the time left is now the current time over the rate's magnitude:
the run is waited for until it finishes, as the untraced path waits it out.
A self-test pins both: the delayed reversed move holds the traced wait for
its 800 ms, and a reversed move is waited for no longer than the same move
forward.

* fix(interaction): waitForRest waits out a backward run's end delay and curve

A run going backward plays its end delay first, then its curve down to the
start delay; waitForRest counted it as done once its current time passed
curveEnd, so it resolved inside the end delay (47 ms into a 600 ms run with a
500 ms end delay) and the element then moved. It now waits until the current
time reaches the start delay. Self-test added (Chromium 27/27, 5x repeat).

* fix(interaction): a rendering trace reports DevTools-run tasks apart from the page's long tasks

traceRendering's longTasks counted every main-thread task over 50 ms,
including tasks that ran a DevTools command. A harness read inside the body
(waitForAnimation describing every animation's keyframes: 232 ms for 1,200
animated rows) was reported as the page's long task and failed proofs that
the page has none.

A task that ran a DevTools command is recognized in the trace by the
DevTools session's message that opens it. Such a task is now reported in
devtoolsTasks, unless page script ran inside it (an event listener, timer
or frame callback the evaluate set off), which keeps it a long task: an
evaluate that clicks a button whose handler spins 60 ms is still the
page's. blockMainThread(page, ms) without during is reported in
devtoolsTasks; with during it stays a page task, as the Long Tasks log sees
it. No limit or rendering count changes.

* Merge commit '1e242bed3ff02263f58be1488898c799b8cd6957' into uikit/f3-recorder-standdown

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

* 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]>

* 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 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 #8505 (e8b0bb62: main with #8044, plus the animation-state waits) into the storyboards

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

* 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(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.

* 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]>

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

* 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).

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

* 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 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

* 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 #8505 (a9be409b35: a scroll-driven animation at its end is not a finished curve) into the recorder stand-down

* 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]>

* 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

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

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

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

* 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

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

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

* docs(interaction): waitForAnimation's JSDoc names the CSS @keyframes gap, as the README does

A traced waitForAnimation on a CSS @keyframes animation (and, unwatched, next to a cancelled CSS transition) reads the animation's timing, which flushes its style. The README's No Layout / Paint paragraph and traceRendering's JSDoc say so; waitForAnimation's own JSDoc still said it adds no frame.

* Merge #8348 (38ea7d9c: rootless docker, WebKit container user) into the frame evidence

# Conflicts:
#	internal/interaction-harness/scripts/webkit-container.mjs

* chore(interaction): move four instruments out of the frame evidence

Scope: castStoryboard, sampleRects, openStory's Storybook highlight default
and the WebKit container's shader cache move to a follow-up pull request,
unchanged, with their self-tests and README text. The frame evidence keeps
the screencast, marker tracking, frame stats and the busy-main-thread proof.

* chore(interaction): move rendering traces and the long-task log out of the frame evidence

Scope: traceRendering, countBetween and the long-task log (with the
harness-read marks the trace uses, their self-tests and README text) move to
a follow-up pull request, unchanged. trace.ts keeps startCompositorTrace,
which the busy-main-thread proof reads.

* chore(interaction): move the compositor presentation record out of the frame evidence

Scope: startCompositorTrace (trace.ts), its Chromium self-test and the
recorded skip fixture with its unit test move to the follow-up pull request
with the rendering traces, unchanged. busyWindowProof keeps its presented
option and its synthetic compositor-record tests; the README and JSDoc say
where a record comes from without naming the moved helper.

* feat(interaction): Chromium rendering traces, the composito…
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 — efdffbed Deployed Oct 26, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants