Skip to content

feat(core): one rect morph for touch presentations that grow out of a source rect - #9769

Draft
cixzhang wants to merge 36 commits into
mainfrom
motion/rect-morph
Draft

cixzhang wants to merge 36 commits into
mainfrom
motion/rect-morph

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #8329 by @vjeux, who stays the author of this commit. It includes #9764 (the morph paths) and targets main. #8329's branch carries the open chain under #8909, #8340 and #8360, about 30,000 lines. This pull request is #8329's own change, rebuilt on main and ported to main's engine (createMotionEngine; #8340 was absorbed into main).

Stack: #9764 → #9769 → #8485 and #8080 (#8078 and #8508 have merged).

Behavior module: packages/core/src/motion/rectMorph.ts, with packages/core/src/motion/progress.ts; every other file supports them.

Maintainer impact

Five touch presentations grow a surface out of what the finger touched and shrink it back: menus, Popover, the lifted preview, Lightbox's zoom, and a sub-menu's parent card. Without one module, each would write its own version and get interruptions and Reduced Motion right on its own.

Intended invariant

No behavior change: the module is internal, and no component imports it yet.

  • Timing follows the component's motion record (spec:AST-094 FR45), as ruled by Specs & Decisions. present(path, motion) and dismiss(path, motion, {target}) take a RectMorphMotion: either {duration, easing} or {spring}, whichever the adopting component's motion record names. The morph has no per-trigger rule of its own. Either starts at the velocity it is given, by default the presented velocity, so a new target keeps the current velocity (spec:AST-094 FR6). The doc example takes the timing as given.
  • Existing callers keep their values, bit for bit. easedProgress moves to progress.ts byte for byte, so Popover, SegmentedControl and the layout glide read the same positions and velocities as on main.
  • The pager changes in two places only. timedCurve is solveAnimatedPageScroll's curve as on main (the Hermite carry that keeps a retargeted velocity), with these two changes:
    • From rest, its velocity at t ≤ 0 is the curve's own starting slope, not 0. A retarget at the first instant now keeps that speed: a linear 300 px move over 0.3 s reads about 1,000 px/s at t = 0, where main reads 0.
    • A 0 ms duration is on its target at once, at rest. On main it reads NaN at t = 0. This matches the rect morph's 0 ms timing (spec:AST-094 FR5).
  • The rect morph plays timedCurve from 0 to 1, so its timed motion keeps a retargeted velocity and reads its velocity with the finer central difference.
  • architecture:react-component-runtime INV12 says the size-change glide plays through the shared rectangle morph once Core has it. Now that Core has it, INV12 records an implementation gap: the glide still plays its own compositor translate. Moving it onto the morph is a separate, later pull request.

Change

  • motion/rectMorph.ts, internal: createRectMorph presents along a path (lerpPath, edgeGrowPath, or a caller's own) and dismisses back onto a target the caller gives (a copy, or the element). Each interrupts the other from the rect on screen. Nothing stays inline once a present settles, and Reduced Motion is the animator's.
  • motion/progress.ts: easedProgress, moved unchanged from themeTiming.ts, and timedCurve, moved from paging.ts, a timed motion on values that keeps a retargeted velocity. themeTiming.ts and SegmentedControl import easedProgress from there; Popover reads it through themeTiming.ts's readThemeTimingOrInstant. solveAnimatedPageScroll and the morph call timedCurve.
  • architecture:react-component-runtime INV12: the implementation-gap sentence above.
  • spec:AST-094 FR31: it ends with two sentences. feat(core): the rect morph's paths, the rect a grow-out presentation shows at each progress #9764's names motion/morphPath.ts, and this pull request's names motion/rectMorph.ts: it grows a touch presentation out of its source rect along that path and shrinks it back, each continuing the other. The record's path-applicability:v1 block lists packages/core/src/motion/rectMorph.ts; its verified_by is unchanged.
  • Merged with main: Popover's surface motion uses main's readThemeTimingOrInstant, which gives the same instant fallback as this branch's earlier local helper, and keeps readState exported for the morph's popover proofs.
  • Tests: the unit suite (rectMorph.test.ts: 24 cases, including a timed present that keeps its velocity) and the browser interaction spec. A README row and a [chore] changeset.
  • Tests for the callers' values, based on @vjeux's test (vjeux/astryx coverage/rect-morph-first-instant):
    • motion/__tests__/callerMotionValues.test.ts keeps copies of main's easedProgress and solveAnimatedPageScroll (ebb9ddec). On a fixed grid it checks that the shipped functions give the same number, bit for bit (Object.is), for each position and velocity. The only value it leaves out is the pager's from-rest velocity at t ≤ 0. The check runs on whatever platform runs the test, so it holds wherever that platform's math library differs.
    • progress.test.ts holds easedProgress's 1 ms slope step: an ease-in reads 0.2053 progress/s, and [0.2, 0, 0, 1] reads 0.9761, at t = 0.1 ms on a 0.1 s curve.
    • paging.test.ts adds a retarget at the first instant (0 → about 1,000 px/s, with the position continuous) and a 0 ms move.

Evidence

  • Before: feat(core): one rect morph for touch presentations that grow out of a source rect #8329 can't merge as it stands; it carries an open chain and imports createAnimator, which main doesn't have.
  • After: tsc is clean, and the motion, Popover, SegmentedControl and pager suites pass (1,555 tests at this head).
  • Size: progress.ts is a shared module this pull request grows. First-load gzip against the base, from a pnpm size:pages run at this head: docs +2 B, form −2 B, menu 0 B, table +1 B.
  • Red first: on main's code, the first-instant and 0 ms pager tests fail. On this pull request's earlier head (6b6310c6), the easedProgress slope test and both reference comparisons fail.
  • Values compared with main (ebb9ddec). Each hash is the first 16 hex digits of the SHA-256 of the raw float64 values. The grid samples each curve at 1/200 of its length, plus 10 µs, 0.1 ms, 0.5 ms and 1 ms from each end. It covers nine cubic-bézier easings, steps(4) and each caller's fallback timing. Popover's channels are sampled through its own surfaceCurves mapping, and SegmentedControl's through its lens mapping.
Caller Samples Positions, main = head Velocities, main = head Largest velocity difference
easedProgress 8,520 2939ddc076992be9 966708df1d2d58ae 0
Popover surface motion 149,526 7ddf1d33716be387 b952c22259b2f795 0
SegmentedControl selection motion 33,228 f41cbbd9f678b98b 6ac217e2a392ecc5 0
Pager 34,080 ab5cff1a2d9edd29 t > 0: e0758e6000b52217 0 for t > 0. Only the 96 from-rest readings at t ≤ 0 differ (the intended change).
  • The hashes in the table are from macOS arm64. A float64 hash is not the same on every platform: for the same main code, CI's Linux gives a different easedProgress hash. What counts is that main and head match on one platform, and the test checks exactly that on CI.
  • Product/runtime behavior verified unchanged: no component imports the module.
  • After the merge with main, on real devices, this head against its main parent: an iPhone 14 (iOS 26.2 Safari) and a Pixel 8 (Android 17 Chrome) show Popover and DropdownMenu growing out of their trigger and shrinking back, a catch during the close turning back from the size on screen, Escape shrinking from the size on screen, and SegmentedControl's selection glide, all the same as main. Taken at 9e1d7f2e; the only later change is one test file.
  • pnpm preflight --browser at this head: every step passes except one interaction test outside this pull request, internal/interaction-harness/src/harness.interaction.browser.spec.ts "page freeze … a frozen scene stands still …". It is a timing flake on main too: its 2 s run can end before the read after the thaw when the freeze lands late on a loaded machine. It fails the same way on main when the freeze is forced late, passes on its own at this head and on main, and this pull request changes nothing under internal/interaction-harness/.

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 exec vitest run --project ui packages/core/src/motion packages/core/src/Popover packages/core/src/SegmentedControl packages/core/src/hooks/usePager --maxWorkers=1: 1,555 passed at this head. scripts/snap-paging-bundle.test.mjs: 4 passed.
  • pnpm exec tsc -p packages/core --noEmit: clean. Strict ESLint on the changed files, pnpm check:knowledge and pnpm check:changesets: pass.
  • The browser interaction spec (rectMorph.interaction.browser.spec.ts) runs in CI's interaction job.

Writing rubric results

Records changed:

  • architecture:react-component-runtime INV12, one implementation-gap sentence.
  • spec:AST-094 FR31, two closing sentences that name motion/morphPath.ts and motion/rectMorph.ts, and the path-applicability:v1 entry for packages/core/src/motion/rectMorph.ts.

architecture:react-component-runtime INV12:

Item Result
R1 Pass: the sentence states the system now (the glide plays its own translate); no plan or history.
R2 Pass: no research in the record.
R3 Pass: no pull request, issue or commit as evidence.
R4 Pass: no rejected alternative.
R5 Pass: no # number, /pull/ or /issues/.
R6 Pass: no open question.
R7 Pass: the sentence is a requirement gap (the glide does not yet play through the shared morph), not project status.

spec:AST-094 FR31 and its path-applicability:v1 entry:

Item Result
R1 Pass: the sentences state what each module does now (gives the rect, imports it, grows and shrinks the presentation); no plan or history.
R2 Pass: no research in the record.
R3 Pass: no pull request, issue or commit as evidence; the path-applicability:v1 entry names a source file.
R4 Pass: no rejected alternative.
R5 Pass: no # number, /pull/ or /issues/.
R6 Pass: no open question.
R7 Pass: no project status; the sentences say what each module does.

vjeux and others added 5 commits November 3, 2026 06:35
progressCurve, mapProgress, mapRange and presentedProgressVelocity in
motion/progress.ts, internal, one velocity unit (progress per second).
Rebuilt on main from the pull request's own change, without the open
dependency chain it no longer needs.

Co-authored-by: Cindy Zhang <[email protected]>
…ressCurve

CodeBunny on #9755: springProgress solved the same spring as progressCurve.
It now reads progressCurve (remaining = 1 - progress), so one implementation
remains. Same curve, same settle epsilon (0.001) and duration.
…shows at each progress

lerpPath, edgeGrowPath, each path's restartFrom and morphCurves in
motion/morphPath.ts, internal. Pure geometry over a progress curve: the
caller chooses the timing. Rebuilt on the progress module from the pull
request's own change, without the open chain it no longer needs.

Co-authored-by: Cindy Zhang <[email protected]>
# Conflicts:
#	packages/core/src/motion/README.md
… source rect

createRectMorph in motion/rectMorph.ts, internal: present along a path and
dismiss back onto a copy or the element, each continuing the other from the
rect on screen. Rebuilt on main from the pull request's own change and
ported to main's engine (createMotionAnimator).

Timing follows the owner's rule for touch motion: present and dismiss take
a motion, either a theme duration and easing (a tap, a key, the program) or
a spring (a gesture's release, from its velocity). timedProgressCurve joins
the progress helpers. architecture:react-component-runtime INV12 records the
implementation gap: the size-change glide moves onto the morph next.

Co-authored-by: Cindy Zhang <[email protected]>
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 20, 2026 6:41pm UTC

Request Review

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

cixzhang commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 131ca14

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 3, 2026
@astracat-bot

astracat-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 20, 2026, 9:10 PM UTC

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

Approval waits on an engineering owner's decision about the rect morph's timing rule, and one fix is needed.

rectMorph.ts documents and implements a rule no current record states (a present or dismissal that a tap, a key or the program starts plays the theme's duration and easing from rest, and only a gesture's release plays a spring), which contradicts AST-094 FR31, where a touch menu grows on springs.menuOpen, and FR6, where a new target keeps the current velocity. An engineering owner either records the rule in AST-094 (amending FR31 and FR6) and approves that edit by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or the morph carries the presented velocity into a timed retarget and its example and changeset follow FR31.

Blocking

  • A dismissal onto a copy calls attach(null) on a handed-in animator (rectMorph.ts:448), and neither reset() nor dispose() attaches it again, so the owner's own set and play stop reaching the element; attach a handed-in animator again and add a test that the owner's write lands after a copy dismissal.

Everything else matches the current records, and the motion suites, the typecheck and the Chromium interaction spec pass.

[Automated review]

Comment thread packages/core/src/motion/rectMorph.ts Resolved
Comment thread packages/core/src/motion/rectMorph.ts Resolved
Comment thread packages/core/src/motion/rectMorph.ts Resolved
Comment thread packages/core/src/motion/rectMorph.ts Resolved
Comment thread packages/core/src/motion/rectMorph.ts Resolved
…opy dismissal

CodeBunny on #9769: a dismissal onto a copy detached the animator, and a
handed-in one was never attached again, so its owner's writes stopped
reaching the element. Only the morph's own animator lets go now.

Co-authored-by: Cindy Zhang <[email protected]>

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's decision about the rect morph's timing rule, and two fixes are needed whatever that decision is.

The morph documents and implements a rule no current spec states: a present or dismissal that a tap, a key or the program starts plays the theme's duration and easing from rest, and only a gesture's release plays a spring. That contradicts AST-094 FR31, where a touch menu grows on springs.menuOpen, and FR6, where a new target keeps the current velocity. To settle it, an engineering owner either records the rule in AST-094 (amending FR31 and FR6) and approves that edit by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or the morph carries the presented velocity into a timed retarget and its example and changeset follow FR31.

Blocking

  • timedProgressCurve (packages/core/src/motion/progress.ts:79-99) is a second copy of the timed curve solveAnimatedPageScroll already provides in paging.ts, without that curve's velocity carry, so move that curve with its optional velocity into progress.ts and call it from the pager and the morph.
  • The INV12 edit needs the ## Writing rubric results section in the description and should end at "its own compositor translate.)" instead of the plan "it moves onto the morph next", as the knowledge-contracts writing rules require.

The handed-in animator now stays on the element through a copy dismissal, reset() and dispose(), and the motion suites, the typecheck and the Chromium interaction spec pass.

[Automated review]

Comment thread packages/core/src/motion/progress.ts Resolved
…er and the morph

CodeBunny on #9769: solveAnimatedPageScroll already played this curve and
keeps the velocity of the move it retargets. timedCurve in progress.ts is
now that one curve; the pager and the morph's timed motion call it, so a
timed present that interrupts a dismissal keeps its velocity. The INV12
note states the system only. File header and comments trimmed.

Co-authored-by: Cindy Zhang <[email protected]>
@cixzhang

cixzhang commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec e3a43d0

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

Approval waits on an engineering owner's decision about the rect morph's timing rule, and one fix is needed whatever that decision is.

The RectMorphMotion doc, its example and the changeset say that a present or dismissal a tap, a key or the program starts plays the theme's duration and easing, and only a gesture's release plays a spring; no current spec states that rule, and it contradicts AST-094 FR31, where a menu opened under a finger grows on springs.menuOpen, and FR4, where touch motion reads its named roles. To settle it, an engineering owner either records the rule in AST-094 (amending FR31 and FR4) and approves that edit by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or the doc, the example and the changeset name the presentation's motion roles instead.

Blocking

  • A timed present or dismissal that starts at rest is handed a velocity of 0 (packages/core/src/motion/rectMorph.ts:351 and :397-399), which timedCurve treats as a retarget and uses to cancel the easing's starting slope, so a 250 ms present on the entrance curve is 48 px wide at 50 ms where the easing gives 114 px; pass no velocity when nothing is in flight, and test a present from rest on an easing that does not start flat, such as [0, 0, 0.58, 1], against the easing itself.

A timed retarget now keeps its velocity, the duplicated timed curve is gone, and the motion and pager suites and the typecheck pass.

[Automated review]

Comment thread packages/core/src/motion/rectMorph.ts Resolved
Comment thread packages/core/src/motion/rectMorph.ts Resolved
Comment thread packages/core/src/motion/rectMorph.ts Resolved
Comment thread packages/core/src/motion/rectMorph.ts Resolved
Comment thread packages/core/src/motion/rectMorph.ts Resolved
Comment thread packages/core/src/motion/rectMorph.ts Resolved
CodeBunny on #9769: with nothing in flight the morph handed timedCurve a
velocity of 0, which it treats as a retarget and uses to cancel the
easing's starting slope. Only a motion in flight hands its velocity on now;
tests check a present from rest and a dismissal from a settled present
against the easing itself. Header and comments shortened.

Co-authored-by: Cindy Zhang <[email protected]>

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's decision about the rect morph's timing rule; nothing else blocks.

  • The RectMorphMotion doc (packages/core/src/motion/rectMorph.ts:109-115), its example (:214-215, a tapped menu on the theme's entrance duration and easing) and the changeset say that a present or dismissal a tap, a key or the program starts plays the theme's duration and easing, and only a gesture's release plays a spring; no current spec states that rule, and it contradicts AST-094 FR31, where a menu opened under a finger grows on springs.menuOpen and shrinks on springs.menuClose, and FR4, where touch motion reads the role named for its use.

To settle it, an engineering owner either records the rule in AST-094 (amending FR31 and FR4) and approves that edit by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or the doc, the example and the changeset name the presentation's motion roles instead. The earlier /approve-spec comments name earlier heads, so the INV12 note needs that same exact-head approval.

A timed motion from rest now plays the easing it is given, and the new tests fail without the fix. Non-blocking: the description's Testing line still says the unit suite has 35 cases including a timed present that ignores a given velocity; rectMorph.test.ts has 24 cases and the one at line 276 proves the opposite.

[Automated review]

The type's doc, the example and the changeset name no rule of their own
about which input plays which timing: each play takes the timing the
adopting component's motion record names (AST-094 FR45).

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

cixzhang commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 3272828

@cixzhang
cixzhang marked this pull request as draft November 12, 2026 06:59
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec b957453

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026

@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: three blocking findings, all in the pull request description; the code needs no change.

  • The ## Change list and ## Writing rubric results name only the INV12 sentence, but this head also adds AST-094's path entry for motion/rectMorph.ts and two FR31 sentences naming motion/morphPath.ts and motion/rectMorph.ts (docs/specs/AST-094-touch-presentations/spec.md:39 and :654-660), so please list them and add their rubric rows.
  • Miss: the rubric results report R1 to R6, but docs/contributing/spec-writing.md lists R7 (project status) first and asks for one line per item, so please add an R7 row for both records.
  • Miss: the description says the change is ported to main's engine createMotionAnimator, but the engine on main is createMotionEngine (createMotionAnimator is its former name), so please correct the name.

The record edits already carry an engineering owner's approval for this head, and every code delta matches the current layer-runtime and touch-presentation specs. Non-blocking: a dismissal on the element itself leaves translate, scale and transform-origin inline where a settled present clears them (see the inline comment), and the earlier suggestions on an FR31 gap line, INV12's wording and two comments still apply. CI's heavy suites have not run on this draft head.

Claims and files checked
  • Claim, paths changeset: the straight-line and edge-growth paths give the rect at each progress and continue an interrupted motion in their own law. Verified: lerpPath, edgeGrowPath and its restartFrom in morphPath.ts; restart in rectMorph.ts falls back to a straight line.
  • Claim, paths changeset: morphCurves turns a path into translate, scale and companion opacity curves. Verified: morphPath.ts:231-249.
  • Claim, both changesets: nothing is exported from the package entry and no component uses the modules. Verified: Core's exports map; importers only in motion/ and tests.
  • Claim, morph changeset: present and dismiss continue each other from the rect on screen, on a copy or on the element. Verified: rectMorph.ts:349-461; the unit cases for both directions.
  • Claim, morph changeset: each play takes a duration and easing or a spring, from the velocity it is given. Verified: RectMorphMotion and progressFor (rectMorph.ts:115-117, 321-334).
  • Claim, morph changeset: Reduced Motion is left to the animator. Verified: playOptions (rectMorph.ts:301-315); four Reduced Motion unit cases.
  • Claim, morph changeset and description: easedProgress moves with the same values, byte for byte. Verified: the function text matches the base's; 141,540 sampled values match bit for bit.
  • Claim, morph changeset and description: timedCurve keeps a retargeted velocity, for the pager and the morph. Verified: paging.ts and rectMorph.ts call it; a retarget at −3 progress/s starts at −3.0017 and lands on time.
  • Claim, description: it supersedes an earlier pull request whose author stays the author of the commit. Verified: the first morph commit's author.
  • Claim, description: it is stacked on the morph-paths pull request and targets main. Verified: that pull request's head is merged into this head.
  • Claim, description: the earlier branch carries an open chain of about 30,000 lines. Verified: about 30,190 changed lines.
  • Claim, description: the change is ported to main's engine, named createMotionAnimator. False: the engine is createMotionEngine.
  • Claim, description: two earlier pull requests in the chain have merged. Verified.
  • Claim, description: the behavior module is rectMorph.ts with progress.ts. Verified.
  • Claim, description: no behavior change, since no component imports the module. Verified: no importer; the pager's first-instant velocity is 0.011 px/s on its shipped curve.
  • Claim, description: timing follows the component's motion record, with no per-trigger rule. Verified: RectMorphMotion and its doc.
  • Claim, description: either timing starts at the given velocity, by default the presented one. Verified: rectMorph.ts:358-366 and 402-408.
  • Claim, description: the doc example takes the timing as given. Verified: the @example at rectMorph.ts:210.
  • Claim, description: existing callers keep their values bit for bit. Verified: every position and velocity matches the base's functions on a grid of over one million samples, except the pager's from-rest velocity at t ≤ 0.
  • Claim, description: the pager changes only in its from-rest velocity (a linear 300 px move reads about 1,000 px/s at t = 0) and its 0 ms move (NaN on main). Verified: 1,000.004 px/s, and NaN on the base; a negative duration also lands at once now, which no caller passes.
  • Claim, description: the 0 ms behavior matches the morph's 0 ms timing. Verified; the cited touch-presentation clause covers compositor motion, not durations.
  • Claim, description: the morph plays timedCurve from 0 to 1 with the finer central difference. Verified.
  • Claim, description: INV12 records the glide as an implementation gap. Verified.
  • Claim, description: nothing stays inline once a present settles. Verified: retire.
  • Claim, description: themeTiming.ts, Popover and SegmentedControl import easedProgress from progress.ts. Verified.
  • Claim, description: the morph's unit suite has 24 cases. Verified.
  • Claim, description: a README row and a changeset. Verified, beside the stacked paths pull request's row and changeset.
  • Claim, description: the caller test compares with copies of the earlier functions and skips only the pager's from-rest velocity at t ≤ 0. Verified: the copies match the base; callerMotionValues.test.ts:356.
  • Claim, description: the 1 ms slope reads 0.2053 and 0.9761. Verified: 0.20531 and 0.97614.
  • Claim, description: the paging tests add a first-instant retarget and a 0 ms move. Verified.
  • Claim, description: the first-instant and 0 ms tests fail on the base code. Verified by reading: the base returns 0 and NaN there.
  • Claim, description: typecheck is clean and 1,459 tests pass. Not reproduced: the suites could not run here and CI skipped this draft head.
  • Claim, description: the value-hash table. Not reproduced: the hashes are platform-specific; the runtime comparison above replaces them.
  • Claim, description: the only record changed is the INV12 sentence, with R1 to R6 rows. False: the AST-094 edits are missing, and so is the R7 row.
  • Claim, description: no public API, product or policy change, and no internal context. Verified.
  • File .changeset/motion-morph-path.md: clear.
  • File .changeset/motion-rect-morph.md: clear.
  • File docs/architecture/react-component-runtime.md: clear; the INV12 wording suggestion still applies.
  • File docs/specs/AST-094-touch-presentations/spec.md: missing from the description's record list and rubric (blocking, above); FR31 gap-line suggestion.
  • File packages/core/src/Popover/popoverSurfaceMotion.ts: clear.
  • File packages/core/src/SegmentedControl/useSegmentedSelectionMotion.ts: clear.
  • File packages/core/src/motion/README.md: clear.
  • File packages/core/src/motion/__tests__/callerMotionValues.test.ts: clear.
  • File packages/core/src/motion/__tests__/motionBundle.ts: clear.
  • File packages/core/src/motion/__tests__/rectMorph.interaction.browser.spec.ts: clear.
  • File packages/core/src/motion/morphPath.test.ts: clear.
  • File packages/core/src/motion/morphPath.ts: clear.
  • File packages/core/src/motion/paging.test.ts: clear.
  • File packages/core/src/motion/paging.ts: clear.
  • File packages/core/src/motion/progress.test.ts: clear.
  • File packages/core/src/motion/progress.ts: clear; the header-length suggestion still applies.
  • File packages/core/src/motion/rectMorph.test.ts: clear.
  • File packages/core/src/motion/rectMorph.ts: non-blocking inline-residue note; one comment suggestion still applies.
  • File packages/core/src/motion/themeTiming.server.test.ts: clear.
  • File packages/core/src/motion/themeTiming.test.ts: clear.
  • File packages/core/src/motion/themeTiming.ts: clear.
  • File scripts/snap-paging-bundle.test.mjs: clear.

Automated review (maintainer link)

Comment on lines +657 to +659
progress to a rect. `motion/rectMorph.ts` grows a touch presentation out of
its source rect along that path and shrinks it back, each continuing the
other, so every grow-out presentation shares one path, timing and

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking: Popover still plays its own edge growth (Popover/popoverSurfaceFrame.ts popoverFrame, Popover/popoverSurfaceMotion.ts surfaceCurves), so "every grow-out presentation shares one path, timing and interruption" is ahead of the code. An FR31 gap line, for example "FR31 gap: Popover plays its own edge growth, not motion/rectMorph.ts.", keeps the record accurate until Popover moves onto the morph.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec b957453

# Conflicts:
#	packages/core/src/Popover/popoverSurfaceMotion.ts
#	packages/core/src/motion/themeTiming.ts
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 9e1d7f2

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026

@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: one failing test and three description corrections, plus one number the description should report; the record edits already carry an engineering owner's approval for this head.

  • Regression: after this head's merge of main, the overlapping-popover expectation in packages/core/src/motion/morphPath.test.ts:283-287 fails because Popover's growth now starts from the side the layer entrance picks, so please assert the new rule (or drop that assertion); the other popover proofs still pass.
  • Regression: the description says Popover imports easedProgress from progress.ts, but Popover now reads it through readThemeTimingOrInstant and no longer imports it, so please correct that line.
  • The description says AST-094's verified_by now lists motion/rectMorph.ts, but the pull request adds that path to the record's path-applicability:v1 block and leaves verified_by unchanged, so please name the field correctly in the change list, the records list and the R3 row.
  • The description still names main's engine createMotionAnimator, but the engine is createMotionEngine, so please correct the name.
  • Newly live check: progress.ts is a shared module this pull request grows, so the description needs the first-load gzip delta on the four reference pages; a run against the base measured +2, −2, 0 and +1 bytes (docs, form, menu, table), which you can cite or replace with your own pnpm size:pages run.

Non-blocking notes on a dismissal's inline residue, two comments and two record lines are in the review. CI has not run on this draft head.

Claims and files checked

Review mode: full; reason: recipe-changed (many rules)

  • Changeset (paths): the straight-line and edge-growth paths give the rect at each progress and continue an interrupted motion in their own law; verified, lerpPath, edgeGrowPath and its restartFrom in morphPath.ts, with restart in rectMorph.ts falling back to a straight line.
  • Changeset (paths): morphCurves turns a path into translate, scale and companion opacity curves; verified, morphPath.ts:231-249.
  • Both changesets: nothing is exported from the package entry and no component uses the modules; verified, the API generator lists 0 rows and only motion/ imports them.
  • Changeset (morph): present and dismiss continue each other from the rect on screen, on a copy or on the element; verified, rectMorph.ts:349-461 and the unit cases for both directions.
  • Changeset (morph): each play takes a duration and easing or a spring, from the velocity it is given; verified, rectMorph.ts:108-117 and 321-334.
  • Changeset (morph): Reduced Motion is left to the animator; verified, playOptions (rectMorph.ts:301-315) and four Reduced Motion cases.
  • Changeset (morph) and description: easedProgress moves with the same values; verified, the function text matches the base's and the caller-value test passes.
  • Changeset (morph) and description: timedCurve keeps a retargeted velocity, for the pager and the morph; verified, paging.ts and rectMorph.ts call it and the progress tests pass.
  • Description: it supersedes an earlier pull request whose author stays the author of the commit; verified, the first morph commits keep that author.
  • Description: it includes the morph-paths pull request and targets main; verified, that pull request's head is an ancestor of this head.
  • Description: the earlier branch carries an open chain of about 30,000 lines; verified, 30,191 changed lines.
  • Description: the change is ported to main's engine, named createMotionAnimator; false, the engine is createMotionEngine.
  • Description: the earlier engine pull request was absorbed into main; consistent with the code, main has the engine this pull request imports.
  • Description: the stack lists the paths pull request below and the lift and menu pull requests above, and two earlier ones have merged; verified, both later pull requests build on an earlier head of this one and the two earlier ones merged.
  • Description: the behavior module is rectMorph.ts with progress.ts; verified.
  • Description: no behavior change, since no component imports the module; verified, apart from the pager's invisible first-instant reading the description itself lists.
  • Description: timing follows the component's motion record, with no per-trigger rule; verified, RectMorphMotion and its doc.
  • Description: either timing starts at the given velocity, by default the presented one; verified, rectMorph.ts:356-367 and 400-407.
  • Description: the doc example takes the timing as given; verified, the @example on createRectMorph.
  • Description: existing callers keep their values bit for bit; verified, the caller-value test compares copies identical to the base's functions and passes.
  • Description: the pager changes only its from-rest velocity (about 1,000 px/s for a linear 300 px move) and its 0 ms move (NaN on main); verified, 1,000 px/s and NaN on the base; a negative duration also lands at once, which no caller passes.
  • Description: the 0 ms behavior matches the morph's 0 ms timing; verified, both go through timedCurve.
  • Description: the morph plays timedCurve from 0 to 1 with the finer central difference; verified, progressFor.
  • Description: INV12 records the glide as an implementation gap; verified, react-component-runtime.md:249-251.
  • Description: nothing stays inline once a present settles; verified, retire.
  • Description: themeTiming.ts, Popover and SegmentedControl import easedProgress from progress.ts; false for Popover, which imports readThemeTimingOrInstant from themeTiming.ts.
  • Description: solveAnimatedPageScroll and the morph call timedCurve; verified.
  • Description: FR31 ends with two sentences naming the paths module and the morph; verified, AST-094/spec.md:679-685.
  • Description: the record's verified_by lists rectMorph.ts; false, the path joins the path-applicability:v1 block (spec.md:40) and verified_by is unchanged.
  • Description: Popover uses main's instant fallback, which matches the branch's earlier helper, and keeps readState exported for the proofs; verified, readThemeTimingOrInstant returns the theme timing or a 0 s curve, and readState is exported.
  • Description: the morph's unit suite has 24 cases, including a timed present that keeps its velocity; verified.
  • Description: a README row and a changeset; verified, beside the paths pull request's row and changeset.
  • Description: the caller-value tests copy the earlier functions and leave out only the pager's from-rest velocity at t ≤ 0; verified, callerMotionValues.test.ts:204.
  • Description: the 1 ms slope reads 0.2053 and 0.9761; verified, the progress tests pass.
  • Description: the paging tests add a first-instant retarget and a 0 ms move; verified.
  • Description: the first-instant and 0 ms pager tests fail on main's code; verified by reading, the base returns 0 and NaN there.
  • Description: earlier-head red-first runs and the value-hash table; not reproduced, the hashes are platform-specific and the caller-value test replaces them.
  • Description: tsc is clean; verified.
  • Description: the motion, Popover, SegmentedControl and pager suites pass (1,459 tests); false at this head, 1 of 1,555 fails (morphPath.test.ts:284).
  • Description: the pager bundle test passes; verified, 4 of 4.
  • Description: strict ESLint, the knowledge check and the changeset check pass; verified, 0 lint errors (2 warnings in the browser spec).
  • Description: the browser spec runs in CI's interaction job; consistent with CI's configuration, skipped on this draft head.
  • Description: rubric results for both records, R1 to R7; verified as present, though the AST-094 rows repeat the verified_by misnaming.
  • Description: no public API, product or policy change, and no internal context; verified.
  • File .changeset/motion-morph-path.md: clear.
  • File .changeset/motion-rect-morph.md: clear.
  • File docs/architecture/react-component-runtime.md: clear; non-blocking note on the edited INV12 line's leftover sequencing.
  • File docs/specs/AST-094-touch-presentations/spec.md: clear; the description misnames its path entry as verified_by (blocking, above); non-blocking FR31 gap-line note.
  • File packages/core/src/Popover/popoverSurfaceMotion.ts: clear.
  • File packages/core/src/SegmentedControl/useSegmentedSelectionMotion.ts: clear.
  • File packages/core/src/motion/README.md: clear.
  • File packages/core/src/motion/__tests__/callerMotionValues.test.ts: clear.
  • File packages/core/src/motion/__tests__/motionBundle.ts: clear.
  • File packages/core/src/motion/__tests__/rectMorph.interaction.browser.spec.ts: clear.
  • File packages/core/src/motion/morphPath.test.ts: the overlapping-popover expectation fails at this head (blocking, above).
  • File packages/core/src/motion/morphPath.ts: clear.
  • File packages/core/src/motion/paging.test.ts: clear.
  • File packages/core/src/motion/paging.ts: clear.
  • File packages/core/src/motion/progress.test.ts: clear.
  • File packages/core/src/motion/progress.ts: grows a shared module with no reported page deltas (evidence, above); non-blocking header-length note.
  • File packages/core/src/motion/rectMorph.test.ts: clear.
  • File packages/core/src/motion/rectMorph.ts: non-blocking notes on a dismissal's inline residue and one comment.
  • File packages/core/src/motion/themeTiming.server.test.ts: clear.
  • File packages/core/src/motion/themeTiming.test.ts: clear.
  • File packages/core/src/motion/themeTiming.ts: clear.
  • File scripts/snap-paging-bundle.test.mjs: clear.

Automated review (maintainer link)

…ts its source

Main's layer entrance gives an overlapping popover the side where it meets
its source. The morph test pinned the earlier rule, from below.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec a513a3b

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the code is ready and the record edits carry an engineering owner's approval for this head, but the description needs four corrections and the shared-module size report.

  • Regression: the description says Popover imports easedProgress from progress.ts, but Popover reads it through readThemeTimingOrInstant and no longer imports it, so please correct that line.
  • Miss: the description names main's engine createMotionAnimator, but the engine is createMotionEngine (createMotionAnimator is its former name), so please correct the name.
  • The description says AST-094's verified_by now lists motion/rectMorph.ts, but the pull request adds that path to the record's path-applicability:v1 block and leaves verified_by unchanged, so please name the field correctly in the change list, the records list and the R3 row.
  • Regression: the Testing and Evidence sections say the motion, Popover, SegmentedControl and pager suites pass with 1,459 tests, but the same command runs 1,555 tests at this head, all passing, so please update the count.
  • Newly live check: progress.ts is a shared module this pull request grows, so the description needs the first-load gzip delta on the four reference pages; a run against the base measured +2, −2, 0 and +1 bytes (docs, form, menu, table), which you can cite or replace with your own pnpm size:pages run.

The non-blocking notes on a dismissal's inline residue, two comments and two record lines stand as before. CI has not run on this draft head.

Claims and files checked

Review mode: same-head; reason: none

  • Changeset (paths): the straight-line and edge-growth paths give the rect at each progress and continue an interrupted motion in their own law; verified, lerpPath, edgeGrowPath and restartFrom in morphPath.ts.
  • Changeset (paths): morphCurves turns a path into translate, scale and companion opacity curves; verified, morphPath.ts:231-249.
  • Both changesets: nothing is exported from the package entry and no component uses the modules; verified, only motion/ and its tests import them.
  • Changeset (morph): present and dismiss continue each other from the rect on screen, on a copy or on the element; verified, rectMorph.ts:349-461 and the unit cases for both directions.
  • Changeset (morph): each play takes a duration and easing or a spring, from the velocity it is given; verified, rectMorph.ts:108-117 and 321-334.
  • Changeset (morph): Reduced Motion is left to the animator; verified, rectMorph.ts:301-315 and four Reduced Motion cases.
  • Changeset (morph) and description: easedProgress moves with the same values; verified, the caller-value test passes.
  • Changeset (morph) and description: timedCurve keeps a retargeted velocity, for the pager and the morph; verified, paging.ts and rectMorph.ts call it and the progress tests pass.
  • Description: it supersedes an earlier pull request whose author stays an author of the commits; verified, that author keeps half of the non-merge commits.
  • Description: it includes the morph-paths pull request and targets main; verified, that pull request's head is an ancestor of this head.
  • Description: the earlier branch carries an open chain of about 30,000 lines; not rechecked, context only.
  • Description: the change is ported to main's engine, named createMotionAnimator; false, the engine is createMotionEngine (animator.ts:1296).
  • Description: the earlier engine pull request was absorbed into main; consistent, main has the engine this pull request imports.
  • Description: the stack lists the paths pull request below and two adopting pull requests above; consistent, though those pull requests carry different stack lines.
  • Description: the behavior module is rectMorph.ts with progress.ts; verified.
  • Description: no behavior change, since no component imports the module; verified, apart from the pager's first-instant readings the description itself lists.
  • Description: timing follows the component's motion record, with no per-trigger rule; verified, rectMorph.ts:108-117.
  • Description: either timing starts at the given velocity, by default the presented one; verified, rectMorph.ts:356-367 and 400-407.
  • Description: the doc example takes the timing as given; verified, the @example on createRectMorph.
  • Description: existing callers keep their values bit for bit; verified, the caller-value test compares copies of the base's functions and passes.
  • Description: the pager changes only its from-rest velocity (about 1,000 px/s for a linear 300 px move) and its 0 ms move, which read 0 and NaN on the base; verified, 1,000.004 px/s and 804 at this head against 0 and NaN on the base.
  • Description: the 0 ms behavior matches the morph's 0 ms timing; verified, both go through timedCurve.
  • Description: the morph plays timedCurve from 0 to 1 with the finer central difference; verified, rectMorph.ts:321-334.
  • Description: the runtime record notes the glide as an implementation gap; verified, react-component-runtime.md:249-251.
  • Description: nothing stays inline once a present settles; verified, retire and its unit case.
  • Description: progress.ts takes easedProgress unchanged and timedCurve from paging.ts; verified.
  • Description: themeTiming.ts, Popover and SegmentedControl import easedProgress from progress.ts; false for Popover, which imports readThemeTimingOrInstant (popoverSurfaceMotion.ts:31-32).
  • Description: solveAnimatedPageScroll and the morph call timedCurve; verified.
  • Description: the touch-presentations record's menu requirement ends with two sentences naming the paths module and the morph; verified, spec.md:679-685.
  • Description: that record's verified_by lists rectMorph.ts; false, the path joins the path-applicability:v1 block (spec.md:40).
  • Description: Popover uses main's instant fallback and keeps readState exported for the proofs; verified.
  • Description: the morph's unit suite has 24 cases, including a timed present that keeps its velocity; verified, 24.
  • Description: a README row and a changeset; verified.
  • Description: the caller-value tests leave out only the pager's from-rest velocity at t ≤ 0; verified, callerMotionValues.test.ts:204.
  • Description: the 1 ms slope reads 0.2053 and 0.9761; verified, the progress tests pass.
  • Description: the paging tests add a first-instant retarget and a 0 ms move; verified, both pass.
  • Description: earlier-head red-first runs and the value-hash table; not reproduced, the hashes are platform-specific and the caller-value test replaces them.
  • Description: tsc is clean; verified.
  • Description: the motion, Popover, SegmentedControl and pager suites pass with 1,459 tests; they pass, but the count is false: 1,555 at this head.
  • Description: the pager bundle test passes; verified, 4 of 4.
  • Description: strict ESLint, the knowledge check and the changeset check pass; carried from earlier runs on unchanged files.
  • Description: the browser spec runs in CI's interaction job; consistent with CI's configuration, skipped on this draft head.
  • Description: rubric results for both records; present, though the touch-presentations rows repeat the verified_by misnaming.
  • Description: no public API, product or policy change, and no internal context; verified.
  • File .changeset/motion-morph-path.md: clear.
  • File .changeset/motion-rect-morph.md: clear.
  • File docs/architecture/react-component-runtime.md: clear; non-blocking note on the edited line's leftover sequencing.
  • File docs/specs/AST-094-touch-presentations/spec.md: clear; non-blocking gap-line note.
  • File packages/core/src/Popover/popoverSurfaceMotion.ts: clear.
  • File packages/core/src/SegmentedControl/useSegmentedSelectionMotion.ts: clear.
  • File packages/core/src/motion/README.md: clear.
  • File packages/core/src/motion/__tests__/callerMotionValues.test.ts: clear.
  • File packages/core/src/motion/__tests__/motionBundle.ts: clear.
  • File packages/core/src/motion/__tests__/rectMorph.interaction.browser.spec.ts: clear.
  • File packages/core/src/motion/morphPath.test.ts: clear.
  • File packages/core/src/motion/morphPath.ts: clear.
  • File packages/core/src/motion/paging.test.ts: clear.
  • File packages/core/src/motion/paging.ts: clear.
  • File packages/core/src/motion/progress.test.ts: clear.
  • File packages/core/src/motion/progress.ts: grows a shared module with no reported page deltas (above); non-blocking header-length note.
  • File packages/core/src/motion/rectMorph.test.ts: clear.
  • File packages/core/src/motion/rectMorph.ts: non-blocking notes on a dismissal's inline residue and one comment.
  • File packages/core/src/motion/themeTiming.server.test.ts: clear.
  • File packages/core/src/motion/themeTiming.test.ts: clear.
  • File packages/core/src/motion/themeTiming.ts: clear.
  • File scripts/snap-paging-bundle.test.mjs: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet, because it skips a draft; it runs once the pull request is marked ready, and the merge guard needs it green.

The description now matches the code on Popover's easedProgress import, the engine name, the path-applicability entry and the test count, and it reports the first-load size of the grown progress.ts, which a run against the base confirms. The non-blocking notes on a dismissal's inline residue, two comments and two record lines still stand.

Claims and files checked

Review mode: same-head; reason: none

  • Paths changeset: the straight-line and edge-growth paths give the rect at each progress and continue an interrupted motion in their own law; verified, lerpPath, edgeGrowPath and restartFrom in morphPath.ts.
  • Paths changeset: morphCurves turns a path into translate, scale and companion opacity curves; verified, morphPath.ts:231-249.
  • Both changesets: nothing is exported from the package entry and no component uses the modules; verified, only motion/ and its tests import them.
  • Morph changeset: present and dismiss continue each other from the rect on screen, on a copy or on the element; verified, rectMorph.ts:349-461 and the unit cases for both directions.
  • Morph changeset: each play takes a duration and easing or a spring, from the velocity it is given; verified, rectMorph.ts:108-117 and 321-334.
  • Morph changeset: Reduced Motion is left to the animator; verified, rectMorph.ts:301-315 and four Reduced Motion cases.
  • Morph changeset and description: easedProgress moves with the same values; verified, the caller-value test passes.
  • Morph changeset and description: timedCurve keeps a retargeted velocity, for the pager and the morph; verified, paging.ts:144 and rectMorph.ts:328 call it and the progress tests pass.
  • Description: it supersedes an earlier pull request whose author stays an author of the commits; verified, that author holds half of the non-merge commits.
  • Description: it includes the morph-paths pull request and targets main; verified, that pull request's head is an ancestor of this head.
  • Description: the earlier branch carries an open chain of about 30,000 lines; not rechecked, context only.
  • Description: the change is ported to main's engine, createMotionEngine; verified, animator.ts:1296.
  • Description: the earlier engine pull request was absorbed into main; consistent, main has the engine this pull request imports.
  • Description: the stack lists the paths pull request below and two adopting pull requests above; consistent, though those pull requests carry different stack lines, so this one is reviewed alone.
  • Description: the behavior module is rectMorph.ts with progress.ts; verified.
  • Description: no behavior change, since no component imports the module; verified, apart from the pager's first-instant readings the description itself lists.
  • Description: timing follows the component's motion record, with no per-trigger rule; verified, rectMorph.ts:108-117.
  • Description: either timing starts at the given velocity, by default the presented one; verified, rectMorph.ts:356-367 and 400-407.
  • Description: the doc example takes the timing as given; verified, the @example on createRectMorph.
  • Description: existing callers keep their values bit for bit; verified, the caller-value test compares copies of the base's functions and passes.
  • Description: the pager changes only its from-rest velocity (about 1,000 px/s for a linear 300 px move) and its 0 ms move, which read 0 and NaN on main; verified, timedCurve at this head against the base's paging.ts:154 and :162, and the new paging tests pass.
  • Description: the 0 ms behavior matches the morph's 0 ms timing; verified, both go through timedCurve.
  • Description: the morph plays timedCurve from 0 to 1 with the finer central difference; verified, rectMorph.ts:321-334.
  • Description: the runtime record notes the glide as an implementation gap, with the move onto the morph left to a later pull request; verified, react-component-runtime.md:248-250.
  • Description: nothing stays inline once a present settles; verified, retire and its unit case.
  • Description: progress.ts takes easedProgress unchanged and timedCurve from paging.ts; verified.
  • Description: themeTiming.ts and SegmentedControl import easedProgress from progress.ts, and Popover reads it through readThemeTimingOrInstant; verified, themeTiming.ts:22, useSegmentedSelectionMotion.ts:43 and popoverSurfaceMotion.ts:32-33.
  • Description: solveAnimatedPageScroll and the morph call timedCurve; verified.
  • Description: the touch-presentations record's menu requirement ends with two sentences naming the paths module and the morph; verified, spec.md:679-685.
  • Description: that record's path-applicability block lists rectMorph.ts and its verified_by is unchanged; verified, spec.md:40 and 22-25.
  • Description: Popover uses main's instant fallback and keeps readState exported for the proofs; verified.
  • Description: the morph's unit suite has 24 cases, including a timed present that keeps its velocity; verified, 24.
  • Description: a README row and a changeset; verified.
  • Description: the caller-value tests leave out only the pager's from-rest velocity at t ≤ 0; verified, callerMotionValues.test.ts:204.
  • Description: the 1 ms slope reads 0.2053 and 0.9761; verified, the progress tests pass.
  • Description: the paging tests add a first-instant retarget and a 0 ms move; verified, both pass.
  • Description: tsc is clean and the motion, Popover, SegmentedControl and pager suites pass with 1,555 tests; verified, 1,555 of 1,555 and tsc exit 0.
  • Description: the first-load gzip deltas for the grown progress.ts are +2, −2, 0 and +1 bytes (docs, form, menu, table); consistent, a run against the base keeps every page's minified size to the byte and measures +2, −2, +1 and +4 bytes gzip, within the tool's run-to-run gzip noise.
  • Description: on main's code the first-instant and 0 ms pager tests fail; verified by reading main's paging.ts, which returns 0 from rest and NaN for a 0 ms move.
  • Description: an earlier head's red-first runs and the value-hash table; not reproduced, the hashes are platform-specific and the caller-value test replaces them.
  • Description: device results taken at an earlier head, with only one test file changed since; consistent, the only later change is morphPath.test.ts.
  • Description: a full preflight run passes apart from one timing flake in the interaction harness; not reproduced, and this pull request changes nothing in that harness.
  • Description: the pager bundle test passes; verified, 4 of 4.
  • Description: strict ESLint, the knowledge check and the changeset check pass; verified, 0 lint errors (two warnings in the browser spec) and both checks pass.
  • Description: the browser spec runs in CI's interaction job; consistent with CI's configuration, skipped on this draft head.
  • Description: rubric results for both records; present and consistent with the edits.
  • Description: no public API, product or policy change, and no internal context; verified.
  • File .changeset/motion-morph-path.md: clear.
  • File .changeset/motion-rect-morph.md: clear.
  • File docs/architecture/react-component-runtime.md: clear; non-blocking note on the edited line's leftover sequencing.
  • File docs/specs/AST-094-touch-presentations/spec.md: clear; non-blocking gap-line note.
  • File packages/core/src/Popover/popoverSurfaceMotion.ts: clear.
  • File packages/core/src/SegmentedControl/useSegmentedSelectionMotion.ts: clear.
  • File packages/core/src/motion/README.md: clear.
  • File packages/core/src/motion/__tests__/callerMotionValues.test.ts: clear.
  • File packages/core/src/motion/__tests__/motionBundle.ts: clear.
  • File packages/core/src/motion/__tests__/rectMorph.interaction.browser.spec.ts: clear.
  • File packages/core/src/motion/morphPath.test.ts: clear.
  • File packages/core/src/motion/morphPath.ts: clear.
  • File packages/core/src/motion/paging.test.ts: clear.
  • File packages/core/src/motion/paging.ts: clear.
  • File packages/core/src/motion/progress.test.ts: clear.
  • File packages/core/src/motion/progress.ts: clear; non-blocking header-length note.
  • File packages/core/src/motion/rectMorph.test.ts: clear.
  • File packages/core/src/motion/rectMorph.ts: non-blocking notes on a dismissal's inline residue and one comment.
  • File packages/core/src/motion/themeTiming.server.test.ts: clear.
  • File packages/core/src/motion/themeTiming.test.ts: clear.
  • File packages/core/src/motion/themeTiming.ts: clear.
  • File scripts/snap-paging-bundle.test.mjs: clear.

Automated review (maintainer link)

cixzhang added a commit that referenced this pull request Nov 22, 2026
…#8080)

* feat(core): one progress module for the motion foundation

progressCurve, mapProgress, mapRange and presentedProgressVelocity in
motion/progress.ts, internal, one velocity unit (progress per second).
Rebuilt on main from the pull request's own change, without the open
dependency chain it no longer needs.

Co-authored-by: Cindy Zhang <[email protected]>

* refactor(animatedLayout): take the settle spring's progress from progressCurve

CodeBunny on #9755: springProgress solved the same spring as progressCurve.
It now reads progressCurve (remaining = 1 - progress), so one implementation
remains. Same curve, same settle epsilon (0.001) and duration.

* feat(core): the rect morph's paths, the rect a grow-out presentation shows at each progress

lerpPath, edgeGrowPath, each path's restartFrom and morphCurves in
motion/morphPath.ts, internal. Pure geometry over a progress curve: the
caller chooses the timing. Rebuilt on the progress module from the pull
request's own change, without the open chain it no longer needs.

Co-authored-by: Cindy Zhang <[email protected]>

* Merge remote-tracking branch 'origin/main' into motion/morph-path

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

* feat(core): one rect morph for touch presentations that grow out of a source rect

createRectMorph in motion/rectMorph.ts, internal: present along a path and
dismiss back onto a copy or the element, each continuing the other from the
rect on screen. Rebuilt on main from the pull request's own change and
ported to main's engine (createMotionAnimator).

Timing follows the owner's rule for touch motion: present and dismiss take
a motion, either a theme duration and easing (a tap, a key, the program) or
a spring (a gesture's release, from its velocity). timedProgressCurve joins
the progress helpers. architecture:react-component-runtime INV12 records the
implementation gap: the size-change glide moves onto the morph next.

Co-authored-by: Cindy Zhang <[email protected]>

* feat(TextInput, TextArea, NumberInput): fields stay above the keyboard

Each passes its input to `useMobileKeyboard` from its own render, with
no prop and no Effect of its own. On focus the field decides where it
is: inside a keyboard target such as a Tall BottomSheet it moves
nothing; in an app's bar docked at the viewport's bottom, the bar rides
the keyboard, its bottom on the keyboard's top; in scrolling content,
its nearest scroller, the document included, scrolls it 10 px above the
keyboard in the keyboard's report. In a fixed container the app
positions itself, a scroller around the field reveals it, and with none
the browser's own reveal stays. Its first tap and focus moves into it
arrive without the browser's reveal where the module places the field,
so the page never pans there.

A scroll area does not gain the range it lacks at its end yet. Where a
field's scroll area cannot place it, the document reveals it, in the
page and in a fixed container where the document's scroll moves the
container, as in Safari while its keyboard shows; elsewhere Core scrolls
the document back. Where the document cannot scroll far enough, as at a
short page's end in Chrome, a pan of the visual viewport takes the rest
in the same frame (`panVisualViewportTo`): a probe fixed in the layout
viewport is scrolled into view, as the reveal-pan watch puts a pan back.
The watch takes Core's own pan as the new rest. Firefox for Android does
not pan for the probe. A page with nothing to scroll keeps the browser's
own reveal.

On Chrome's show, a docked bar first sets its field 4 px above the
keyboard's top at once, as the Tall sheet does, and only the rest rides,
so Chrome's own pan finds the field clear. Every viewport report now
feeds the ride's reveal-pan watch, so a pan Chrome still makes is put
back, and a pan made at one keyboard height goes back at the next.
Under Remove animations, Gboard first reports a keyboard 48 px tall,
and Chrome may then reveal the bar's field itself: it scrolls the page
behind the bar, then pans. In Chrome, the ride's watch scrolls the
document back as well, when the scroll and the pan centre the field as
Chrome's reveal does; the app's own scroll to another element stays.

On iOS, a reveal that places the field rises on the browser's smooth
scroll from the keyboard's first report, which comes as the keyboard
starts to slide, so the field rises beside it (`risesSmoothly`, which
reads Core's iOS WebKit check, `isIosWebKit`). The scroll back records
where the rise is headed, and a rise still on its way when the keyboard
changes height carries on from its target. Under Reduce Motion, in a
theme that reduces motion for everyone, and in Chrome, which checks the
field in the resize's own commit, the reveal moves at once. The rise and
the scroll back ask the motion module's new `reducesMotion`, beside
`reducedMotionFade`, which now uses it, so a theme that reduces motion
for everyone counts as the setting for both. A scroll area's reveal goes
through its own `scrollBy` with an explicit behavior where it has one,
so a smooth `scroll-behavior` on the area cannot slow an instant reveal,
as the Tall sheet's reveal already does.

When the keyboard closes, each scroller a reveal moved scrolls back to
where it was (keyboardScrollBack.ts), on the browser's smooth scroll.
Safari on iOS reports the keyboard gone about half a second after the
blur that closes it, once it is down. There the scroll back starts at
that blur, once the focus change settles on nothing that brings up a
keyboard with no finger on the screen, and slides down beside the
keyboard; the report only confirms it. A finger then can be a tap that
brings the keyboard back, so the report decides, as elsewhere and under
Reduce Motion, where the scroll lands at once. Safari applies a scripted
scroll a frame late, so a scroll set each frame jitters. A scroller the
person scrolled meanwhile keeps their scroll. A field that gains focus
during the slide stops the scroll back where the page is
(`stopKeyboardScrollBack`), and its reveal goes on from there as Core's
own scroll. A sandbox page puts three fields in the middle of a page
that scrolls the document.

Each field's `.keyboard.test.tsx` drives the keyboard module's test
double. Mobile keyboard stories on TextInput place the fields low in the
page, a TextInput in a toolbar fixed at the bottom (docked, floating
above the edge, or with its own `translate`), a last field at the end of
a short page and of a scroll area, a scroll area low on the page, a
scroll area in a floating panel and in a full-viewport panel, and a
field in a sheet of a set height.

Firefox for Android can carry the reveal's document scroll as a
visual-viewport offset, show the document where it was before the
reveal at the keyboard's hide report, and turn the offset back into a
document scroll only after it. The scroll back then waits up to a
second for the first document scroll: one that lands where Core left
the document is the browser's own, and the scroll back follows it. A
touch, a keyboard that comes back, the field's page going, or the
wait's end puts nothing back.

The reveal-pan watch's touch flag now holds through a report that comes
while a finger is on the screen. In Firefox the toolbar hides in a drag,
which changes the measured keyboard height mid-drag; the watch then took
the drag's own pan for the browser's and put it back. The input stream
now counts the fingers on the screen from touch events
(`isTouchOnScreen`), only while `touchend` and `touchcancel` are heard.
A native pan keeps a finger there, though its `pointercancel` drops the
press from `getDownPresses`, so that record cannot serve. The watch's
shared touch subscription hears those two types, and a report reads the
count.

After the show's first reveal, a keyboard report reveals nothing while a
press that started after the last reveal is down. In Firefox the toolbar
hides in a drag, and the reveal re-applied itself with small scrolls
under the person's finger. The report's height is kept, so the field
stays where the person put it, and a later report with the finger up
reveals it as before. The press that focused the field holds nothing: a
long press focuses with the finger still down, and Gboard can report a
48 px keyboard first, then its full height. The input stream also counts
the touches that start (`getTouchStartCount`), and each reveal notes
that count. The keyboard module reads the finger count through
`isFingerOnScreen`: a finger down at the keyboard's last hide counts no
more until a touch starts, since a touch whose target leaves the page
ends at a node the window never hears. The count includes a stylus,
whose drag moves the page as a finger does.

Nine unit tests cover the scroll back from the blur on iOS: it starts at
the blur and the report moves nothing more; focus that moves on to
another field or into a frame keeps the page; a finger on the screen at
the blur leaves it to the report; a person's scroll stands; Reduce
Motion waits for the report; a field focused again during the slide
stops the scroll back and rises from where the page is, or stays where a
touch stopped it with nothing left to raise; and the next close goes
back to the first place, at a blur or at a report.

Six unit tests cover the scroll back: the page's smooth scroll at the
report (nothing before it), Reduce Motion, a theme that reduces motion,
a person's scroll kept, a scroll area after Back, and a focus move to
another field. Firefox-shaped cases carry the reveal as an offset and
close the keyboard before the fold: the scroll back follows the fold, a
touch-drag control keeps the page, only the first document scroll
counts, and each way the wait ends leaves no scroll listener. Safari's
and Chrome's close sequences still decide at the report, with no wait. A
Firefox-shaped drag grows the viewport twice with the finger down and
finds no put-back; after the finger is up, a browser pan is put back.
Another drags the page with the toolbar hiding twice and finds no reveal
scroll until the finger is up. A long press focuses the field while
Gboard grows from 48 to 290 px, and the field is revealed at 290; the
next show's first reveal runs again under the same press, and a press
that starts after the reveal holds the next report until it lifts. After
the keyboard goes with no finger down, a long press that brings it back
is revealed with that press still down. Another holds a report while the
long press's finger stays down after a second finger tapped and lifted.
Another misses a touch's end, as when its target leaves the page, and
finds a browser pan put back once the keyboard has hidden and shown
again. The input stream's tests count fingers through a second finger, a
cancel and a native pan's `pointercancel`, count nothing while a touch
end could go unheard, and count the touches that start. Six cover the
rise on iOS: its smooth scroll, Reduce Motion, a theme that reduces
motion, the scroll back after a rise drawn later, a rise carried on at a
new height, and no second reveal while a scroll area's rise is drawn.
Their CSS.supports stub answers both of Safari's forms, a property and
value or a condition. Another drives a scroll area with a smooth
`scroll-behavior` and finds its own `scrollBy` called at once. Two in
the motion module cover `reducesMotion`: the setting, and a theme that
reduces motion for everyone.

* fix(rectMorph): a handed-in animator stays on the element through a copy dismissal

CodeBunny on #9769: a dismissal onto a copy detached the animator, and a
handed-in one was never attached again, so its owner's writes stopped
reaching the element. Only the morph's own animator lets go now.

Co-authored-by: Cindy Zhang <[email protected]>

* fix(motion): one timed curve keeps a retargeted velocity, for the pager and the morph

CodeBunny on #9769: solveAnimatedPageScroll already played this curve and
keeps the velocity of the move it retargets. timedCurve in progress.ts is
now that one curve; the pager and the morph's timed motion call it, so a
timed present that interrupts a dismissal keeps its velocity. The INV12
note states the system only. File header and comments trimmed.

Co-authored-by: Cindy Zhang <[email protected]>

* fix(rectMorph): a timed motion from rest plays its easing as given

CodeBunny on #9769: with nothing in flight the morph handed timedCurve a
velocity of 0, which it treats as a retarget and uses to cancel the
easing's starting slope. Only a motion in flight hands its velocity on now;
tests check a present from rest and a dismissal from a settled present
against the easing itself. Header and comments shortened.

Co-authored-by: Cindy Zhang <[email protected]>

* docs(rectMorph): the timing follows the component's motion record

The type's doc, the example and the changeset name no rule of their own
about which input plays which timing: each play takes the timing the
adopting component's motion record names (AST-094 FR45).

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

* docs(AST-099): TextInput, TextArea and NumberInput meet FR9

FR9's scrolling-content bullet adds the spec owners' sentence: where a
browser carries out the document's scroll by moving the visual viewport,
that offset is the reveal, not a pan. Gap 2 is met. Gaps 1, 10 and 11
say what the three fields now do. Gap 11 keeps the missing scroll range
as the fix; until a scroller gains it, Core pans the visual viewport
where the document cannot scroll far enough.

Two verification rows cover Firefox for Android (the offset equals the
computed reveal) and Chrome (no pan added after Core places the field).
Chrome's names the cases Core pans, and fails a field Core pans that
ends other than 10 CSS px above the keyboard. In Firefox for Android
the pan moves nothing where the page has no scroll range; Gap 11 names
those cases.
The device-evidence row records that a docked toolbar resting under the
keyboard while a field outside it has focus is not a failure.
BottomSheet's height doc says what such a field gets in a sheet that is
not a fully expanded Tall sheet.

FR9's scrolling-content bullet adds the close: each scroller that
revealed the field scrolls back to where it was before the reveal, and
a scroll the person made while the keyboard showed is kept. A
verification row covers a field in the middle of a page that scrolls
the document.

FR9's scrolling-content bullet adds the open: on iOS the field rises on
the browser's own smooth scroll beside the keyboard's slide, settling
within 0.15 s after the keyboard settles, and it moves in one frame
under Reduce Motion, in a theme that reduces motion for everyone, and in
other browsers. A verification row reads every drawn frame of the rise.
Gap 13 records Chrome's rise, which stays in one frame because Chrome
checks the field in the resize's own commit; Firefox for Android takes
the same path. The device-evidence row's
failure for a reveal later than the keyboard's report notes that on iOS
the rise starts in that frame and settles as FR9 states.

FR9's scrolling-content bullet adds the hold: a show's first report
always places the field, and a later report that comes while a finger
is down, after a touch has begun since the field's last placement,
moves nothing.

FR9's close adds that at the hide report, Firefox for Android can still
show the document where it was before the reveal, and turns the reveal
back into a document scroll only after that report; the scroll back
follows that scroll. A row closes the keyboard with Back in
Firefox for Android at normal speed and on a slow profile.

The input-fields family's FR13 status says the same: the three fields
meet FR13 through FR9, apart from Gap 11.

FR9's close now starts the scroll back at the blur that closes the
keyboard in Safari on iOS, beside the keyboard's slide; the report that
the keyboard has gone comes later and only confirms it. Elsewhere it
starts at that report, and under Reduce Motion, and in a theme that
reduces motion for everyone, it lands at once there. A scroller the
person scrolled keeps the person's scroll, a finger on the screen at the
blur leaves the scroll back to the report, and a field that gains focus
during the slide stops the scroll back where the page is. Safari's close
row reads every drawn frame from Done until the page rests, and adds a
tap on the field 80 ms and 150 ms after Done. The open sentence is
rewrapped, word for word.

* Merge main into motion/morph-path

* Merge motion/morph-path into motion/rect-morph

Main renamed the engine's factory to createMotionEngine. The merge
takes that name in the test bundle and in rectMorph and its tests.

* fix(rectMorph): AST-094 links the morph; the proof imports a safe test

The morph's comment cited AST-094 FR45 as its only link to that
record. AST-094 now lists the file, and the comment keeps the fact
without the citation. The proof imports `test` from the a11y-spec
package, whose contexts reach no remote host, as main's lint asks.

* test(SnapPaging): the pager's bundle lists the progress module

The pager's timed settle takes its curve from motion/progress.ts, so
the hook adds that module over Carousel alone. The bundle test lists
it as pager code.

* test(motion): the popover's proofs read Popover's live geometry

The morph's popover proofs played a copy of Popover's growth that had
drifted: it lacked the overlap rule, so an overlapping popover grew
from its left edge where Popover grows from its top. The proofs now
import popoverCollapsedState, popoverFrame and frameOf from Popover.
A new overlapping case, which the deleted copy fails, pins the growth
from the top edge.

* Merge motion/morph-path into motion/rect-morph

* refactor(motion): one eased progress, with a retargeted velocity

The rect morph's timedProgressCurve played, from rest, the curve that
easedProgress already plays for Popover, SegmentedControl and the
layout glide. easedProgress moves into progress.ts and takes an
optional velocity: the Hermite carry that the pager and the morph use.
From rest its values do not change. Its velocity is a central
difference that stays inside the curve, and from rest it starts on the
curve's own slope. timedProgressCurve goes, and timedCurve maps
easedProgress onto values, keeping only its carry for no distance.

* test(motion): the popover's turn-around reads Popover's live curves

The morph's turn-around proof compared restartFrom with lines written
in the test, so a change to Popover's readState or surfaceCurves left
it green. Popover exports both for the proofs, which now replay its
own turn-around. morphPath.ts's header keeps only its tags: the
paths' own JSDoc says the rest.

* Merge motion/morph-path into motion/rect-morph

* docs(changeset): the rect morph's note names the eased-progress move

The note said timedProgressCurve joins the progress helpers, which
this pull request no longer adds. It now says easedProgress moves to
them with a retargeted velocity, and timedCurve joins them.

* Merge main into motion/rect-morph

Main's Popover touch growth, which plays on the surface and floors its
opacity curve with motion/opacityFloor.ts, meets the rect morph's move
of easedProgress into motion/progress.ts in the imports of
popoverSurfaceMotion.ts. The merge keeps both: the floor's import, and
easedProgress from progress.

* test(motion): the popover's turn-around compares opacity as drawn

Popover's surface curves now stop their opacity at 0 or a floor above
it. Past its end, a turn-around toward the source takes the popover
path's opacity below 0, where Popover's stops at 0. An opacity draws
clamped to 0 through 1, so both draw 0. The proof now compares the two
as drawn, which holds with Popover's curves before and after the
floor.

* Merge motion/morph-path into motion/rect-morph

* Merge main

* fix(motion): a popover's morph never reads an opacity below 0

A popover's grow path read its opacity on a straight line, so before
its start and past its end it went below 0: a turn-around toward the
source read -0.025 at 1.05. An opacity below 0 draws as 0, so
opacityAt now stops at 0. The popover proofs compare opacities as
drawn, since Popover's own model still reads below 0 there.

* Merge motion/morph-path into motion/rect-morph

* feat(DropdownMenu): a finger or a pen opens the menu as it presses

Under a finger or a pen, a DropdownMenu or MoreMenu trigger opens its
menu as it is pressed, instead of after a 500 ms hold (spec:AST-094
FR29, FR43). Inside a scroll view it opens once the 150 ms
content-touch delay passes with no scroll, so a scroll that starts on
the trigger still scrolls. The finger that opened the menu picks a row
only after moving 10 px. presentation="popover" keeps the previous
behavior.

useMenuPress with no longPressDelayMs follows the same rules, and
longPressDelayMs: 500 keeps the previous hold.

* test(motion): the morph proofs drop the menu's old straight line

The anchored menu's case modeled a straight line from a 22 px square on
its control. The menu now grows out of its trigger on Popover's edge
path, which the popover cases already check, so the case no longer
describes any presentation's model. The file header follows.

* Merge main

* Merge main

* docs(DropdownMenu): open-on-press notes name the anchored menu

A menu shown as a bottom sheet still opens at the tap's click, so the
release note names the anchored menu, as the press does. The hook's doc
names a finger or a pen on every device, as the hook acts.

* Merge main

* sandbox: a page to try a menu's press under a finger

A raw page that scrolls with the document. Its Actions menu sits in a
fixed top bar, so it opens as a finger presses it, and a slide onto a
row runs that row once. Its More menu sits in the page, so a flick that
starts on it scrolls the page. The bar shows which row ran and how many
times.

* Merge main

* Merge the open-on-press change into the rect morph stack

* feat(DropdownMenu): a finger's open grows the menu out of its trigger

Under a finger or a pen, a DropdownMenu or MoreMenu grows out of its
trigger as it opens and shrinks back into it as it closes. It plays on
the shared rect morph, on the popover's path and timing, so it grows as
a Popover does. A tap's open grows as a hold's does: the open at a tap's
lift used to take the mouse's path.

The grow's code loads at the first touch on the page or on a trigger. A
mouse, the keyboard and presentation="popover" keep the layer's own
entrance.

* fix(DropdownMenu): under Reduce Motion a finger's open only fades in

Under Reduce Motion, a finger's open played the grow, which the animator
turns into a dip: for its first half the menu sat collapsed at the
trigger. A resting mouse's click then missed the row it rested on. The
open now keeps the layer's own entrance, which only fades in where the
menu rests, as before the grow. FR21 and the changeset say so.

* test(DropdownMenu): touch specs wait out a finger's grow

A finger's grow starts a frame after the open, or once its code arrives,
and holds input until its curve ends. The press specs now wait for three
still frames, and the entrance-hold spec waits for the grow to start and
for its natural end. Finishing its animations from a script leaves the
grow's hold in place until its curve ends.

* refactor(core): one Reduce Motion predicate for the animator and menu

The menu's glue copied the animator's Reduce Motion read. A leaf
module now holds the one predicate: the person's setting, or a theme
that reduces motion for everyone. The animator, the Reduced Motion
policy and the glue call it. It imports no motion code, so the glue
reads it without the animator in DropdownMenu's static bundle. No
behavior changes.

* fix(DropdownMenu): every copy of Core shares the grow's one load

The menu kept its loaded grow code, the load in flight and the
replaceable import in module scope. Every copy of Core now shares them
under a registered key. A change to the module's calls bumps the
version, so each copy then keeps its own.

* fix(DropdownMenu): taps stay off the page until the menu shows

Under a coarse primary pointer, the grow takes its input hold at its
first frame. Before that frame, a tap reached the page: on an open
with the code loaded, and on the first open between the code's arrival
and the grow. A hold now lasts from the open until the grow's first
frame. The press model's unit cases stub the presentation's hold, as
jsdom never ends the grow.

* docs(AST-094): FR31 grows once the grow's code is loaded

Until the code is loaded, an open fades. Only an open before the code
first loads in a page session can fade: the first open, or an open
after a failed load.

* Merge main

* docs(AST-094): FR31's faded open closes with no shrink

An open before the grow's code loads fades, and its close plays no
shrink, as the DropdownMenu record's FR21 states.

* fix(keyboard): the scroll back's records are one per page across copies

keyboardScrollBack.ts keeps its four per-window stores under registered
shared keys, as main now keeps the rest of the keyboard model. A
swizzled copy's field and the package's field then note into one record,
so one scroll back runs per page.

The shared-identity check flagged the four module-scope stores after the
merge of main. focusKeyboard.shared.test.tsx gains a case: the package
sees where a copy's scroll for the keyboard is headed.

* fix(DropdownMenu): the grow's code loads through the shared loader

The grow's code now loads through the shared module loader that the
menu's bottom sheet uses, as the import boundaries require. A failed
load warns once in development builds, and the next open still asks
again. The DropdownMenu record's FR21 names when the code loads: at a
trigger's first touch, or the page's first touch where touch is the
primary input.

* Merge main

* fix(keyboard): a field focused as it mounts starts its session at attach

A TextInput, TextArea or NumberInput with hasAutoFocus has focus before
the keyboard path attaches, so no later focus event starts its session,
and it kept only the browser's own reveal. keepFieldAboveKeyboard now
starts the session at attach when the field already has focus. Every
other route is unchanged.

Each field's keyboard test gains a hasAutoFocus case, which fails
without the fix.

* Merge main

* Merge the open-on-press change into the rect morph stack

* Merge main and the open-on-press change

* Merge commit 'ebb9ddecc0219bc6eaf3caf40b6e4e45f81dc0e5' into motion/rect-morph

* fix(motion): existing callers keep easedProgress's values; the pager and the rect morph use timedCurve

easedProgress moves to the progress helpers byte for byte, so Popover and
SegmentedControl read the same positions and velocities as on main.
timedCurve is the pager's curve as on main, with one change: from rest,
its velocity at t <= 0 is the curve's own starting slope. The rect morph
plays its timed motion on timedCurve from 0 to 1.

callerMotionValues.test.ts pins easedProgress and the pager on a fixed
grid, bit for bit, to main's values.

Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant)

* test(paging): a retarget at the first instant goes on at the starting speed

A linear move of 300 px over 0.3 s, retargeted at t = 0, reads 0 px/s on
main, so the retarget starts from rest. Now it reads about 1000 px/s, the
curve's own starting slope, and the retarget keeps that speed. The
position stays continuous.

Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant)

* test(paging): a 0 ms move is on its target at once, at rest

On main a 0 ms animated scroll reads NaN at t = 0 and its start position
before it. timedCurve's 0 ms guard puts it on its target with no speed,
as the rect morph's 0 ms timing does.

* test(motion): compare the callers' values with copies of the earlier functions

A float64 hash of easedProgress's values is not the same on every
platform: macOS arm64 and CI's Linux give different hashes for main's
code. The test now keeps copies of easedProgress and
solveAnimatedPageScroll as they are on main (ebb9dde), and checks that
the shipped functions give the same number, bit for bit (Object.is), for
each position and velocity on the grid. From rest, the pager's velocity
at t <= 0 stays the one value left out.

Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant)

* Merge the open-on-press change into the rect morph stack

* Merge the rect morph's new head

* refactor(core): one useMenuPress for every menu

* refactor(keyboard): read Reduce Motion through reducedMotionFade

The keyboard path asks the Reduced Motion policy that already serves
motion the animator does not drive: reducedMotionFade(element) is null
when motion is not reduced. That answer counts the person's setting and
a theme that reduces motion for everyone, as before.

reducesMotion, which this branch added to reducedMotion.ts, goes, so
reducedMotion.ts, its test and the motion README are as on main.
Behavior is unchanged.

* refactor(keyboard): the scroll back lives in keyboardTarget.ts

keyboardTarget.ts, the scroll back's only caller, already imports
everything it uses, so the scroll back moves there verbatim and its
functions become private. keyboardScrollBack.ts and its five exports go.
Its four stores keep their shared keys, now named for keyboardTarget.

focusKeyboard.shared.test.tsx is as on main: the shared-identity source
check covers the stores. Behavior is unchanged.

* docs(AST-099): name the keyboard module's new cross-module exports

Current-state impact names the five exports the keyboard path adds and
why each one is needed: the input stream's two touch counts,
keyboardHeight's finger read and visual-viewport pan, and
keyboardTarget's clearance at the first report.

* Merge the open-on-press change into the rect morph stack

* Merge the open-on-press change's rework

* docs(AST-099): Gap 19, a field in a modal sheet shorter than tall

FR9's implementation gaps gain Gap 19. A modal BottomSheet shorter than
tall is a full-viewport dialog with no scroller, and BottomSheet's
keyboard path runs only for a tall sheet. So a field there keeps the
browser's own reveal, and Chrome on Android pans the page.

* refactor(DropdownMenu): grow with the page, on Popover's surface motion

* docs(Popover): name the surface motion options DropdownMenu passes

* Merge main

* Merge main

* Merge the open-on-press change into the rect morph stack

* Merge the open-on-press change's main merge

* test(DropdownMenu): read the row under a held finger once the grow rests

* docs(AST-099): name Gap 19 where the fields meet FR9

The implementation-gaps lead, Gap 2 and family:input-fields' FR13 status
line say TextInput, TextArea and NumberInput meet FR9 apart from the
missing scroll range. They now also name Gap 19, a modal BottomSheet
shorter than tall.

* refactor(input): one touch reader in the input stream

isTouchOnScreen and getTouchStartCount become one reader, getTouches. It
returns the record the stream already keeps: the fingers on the screen
and how many touches started. The keyboard module reads it at each of
its five places. No behavior changes, and the same tests pass through
the one reader.

* docs(AST-099): name the input stream's one touch reader

AST-099's current-state list names getTouches, the one reader that
replaces isTouchOnScreen and getTouchStartCount.

* Merge commit '7e7fbae0fa0ba389ad37fafdb26e6495fab19fd4' into motion/rect-morph

# Conflicts:
#	packages/core/src/SegmentedControl/useSegmentedSelectionMotion.ts

* Merge main into the rect morph stack

* Merge main and the rect morph stack's live head

* docs(AST-094): name the morph path module

* Merge commit '6176b9dccc1986b83713e4c9dcf39688e7c5b3e6' into motion/rect-morph

* docs(AST-094): name the rect morph module

* refactor(Popover): name the tap hold until the grow's first frame

* Merge main into the rect morph stack

* Merge main and the rect morph stack's live head

* refactor(DropdownMenu): grow on Popover's own surface motion

* Merge main, without the rect morph stack

* fix(Popover): grow from the trigger's box without its press scale

* Merge main for useCommittedRefInto

* fix(DropdownMenu): commit presentSurfaceRef through useCommittedRefInto

* refactor(DropdownMenu): read the click's press from the press model

* docs(DropdownMenu): record the press report and the entrance without one

* docs(DropdownMenu): word the press records in the present tense

* Merge main for the press model's committed refs

* fix(DropdownMenu): mark a finger's open only where the menu opens

* Merge main

* fix(DropdownMenu): tie a finger's open to its gesture

* fix(core): keep the keyboard store apart from copies of another shape

The hide's touch count changes the keyboard store's shape, so its shared
key moves to version 2. A copy of Core built against the earlier shape
keeps its own store, as spec:AST-110 FR3 requires.

A case puts an earlier copy's listening store under version 1: the
package keeps its own store and reads its own height, and the other
store keeps its height and shape. On version 1 the package reads the
other copy's 300 px.

touchQueries.ts's comment also names the scroll back from the blur among
isIosWebKit's readers.

* fix(DropdownMenu): an open from code plays the layer's entrance

A Reduce Motion comment drops a claim a reduced-motion theme breaks.

* Merge main

* refactor(core): state the keyboard store's constraint in its comment

The version comment now says what the store holds and why a copy of
Core with another store shape keeps its own, instead of how the
version came to change.

* Merge main for the menu press's touch identifier

* fix(DropdownMenu): under Reduce Motion a menu fades out where it stands

* Merge main

* Merge main for the menu's show and hide refs at commit

* Merge main

* fix(DropdownMenu): say Reduce Motion fades only on a coarse pointer

* Merge main for the layer's show from another trigger

* Merge main

* Merge main

* Merge main for the alert dialog's touch motion and the swipe actions

* Merge main for the popover's focus-return target

* fix(Layer): an exit copy keeps the padding and colors of what it copies

* Merge the exit copy fix, with main

* test(DropdownMenu): a finger's close copy draws the menu's rows in place

* test(Layer): the browser's popover style reaches the exit copy

* docs(DropdownMenu): the press model's record says why no engine fits

* Merge the exit copy fix's test update

* Merge main into the exit copy fix

* Merge main for the kept-inside hold's release

* Merge main into the exit copy fix

* Merge main

* Merge main

* Merge main

* fix(DropdownMenu): a finger's open that waits still grows

* Merge main

* Merge main

* docs(keyboard): record Back in Firefox for Android as a gap

Main shows it too.

* docs(keyboard): say that Gap 21 shows more often on main

* Merge #9777

* docs(keyboard): narrow the changeset for Back in Firefox for Android

Gap 21 names FR9 and no longer names main.

* test(DropdownMenu): pin a waiting finger open that another press leaves

* Merge main

* Merge #9777

* Merge main

* Merge #9777

* Merge main

* Merge main

* Merge main

* Merge main

* Merge main

* fix(DropdownMenu): one top-layer shield for a finger's open

A finger's open raised two viewport shields: the hold until the grow's
first frame keyed on the menu's surface, and the entrance hold on its
popover. Each showed its shield in the top layer, which forces a style
update in the open's task. The touch presentation's holds now key on
the top-layer popover around the surface (holdLayerOf), so they share
one shield. The gap until the first frame stays held over the viewport.

* Merge main

* ci: record the Chromium time of the new DropdownMenu touch-grow spec

The pr-interaction leg that ran it took 13.2 s for its 11 tests, timed
as recordLog times a file. Without a time, fewer than nine in ten of the
interaction specs on main plus this change have one.

* Merge main

* Merge main

* Merge main

Co-authored-by: Cindy Zhang <[email protected]>
cixzhang added a commit that referenced this pull request Nov 22, 2026
… on (#11859)

* feat(core): one progress module for the motion foundation

progressCurve, mapProgress, mapRange and presentedProgressVelocity in
motion/progress.ts, internal, one velocity unit (progress per second).
Rebuilt on main from the pull request's own change, without the open
dependency chain it no longer needs.

Co-authored-by: Cindy Zhang <[email protected]>

* refactor(animatedLayout): take the settle spring's progress from progressCurve

CodeBunny on #9755: springProgress solved the same spring as progressCurve.
It now reads progressCurve (remaining = 1 - progress), so one implementation
remains. Same curve, same settle epsilon (0.001) and duration.

* feat(core): the rect morph's paths, the rect a grow-out presentation shows at each progress

lerpPath, edgeGrowPath, each path's restartFrom and morphCurves in
motion/morphPath.ts, internal. Pure geometry over a progress curve: the
caller chooses the timing. Rebuilt on the progress module from the pull
request's own change, without the open chain it no longer needs.

Co-authored-by: Cindy Zhang <[email protected]>

* Merge remote-tracking branch 'origin/main' into motion/morph-path

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

* feat(core): one rect morph for touch presentations that grow out of a source rect

createRectMorph in motion/rectMorph.ts, internal: present along a path and
dismiss back onto a copy or the element, each continuing the other from the
rect on screen. Rebuilt on main from the pull request's own change and
ported to main's engine (createMotionAnimator).

Timing follows the owner's rule for touch motion: present and dismiss take
a motion, either a theme duration and easing (a tap, a key, the program) or
a spring (a gesture's release, from its velocity). timedProgressCurve joins
the progress helpers. architecture:react-component-runtime INV12 records the
implementation gap: the size-change glide moves onto the morph next.

Co-authored-by: Cindy Zhang <[email protected]>

* feat(TextInput, TextArea, NumberInput): fields stay above the keyboard

Each passes its input to `useMobileKeyboard` from its own render, with
no prop and no Effect of its own. On focus the field decides where it
is: inside a keyboard target such as a Tall BottomSheet it moves
nothing; in an app's bar docked at the viewport's bottom, the bar rides
the keyboard, its bottom on the keyboard's top; in scrolling content,
its nearest scroller, the document included, scrolls it 10 px above the
keyboard in the keyboard's report. In a fixed container the app
positions itself, a scroller around the field reveals it, and with none
the browser's own reveal stays. Its first tap and focus moves into it
arrive without the browser's reveal where the module places the field,
so the page never pans there.

A scroll area does not gain the range it lacks at its end yet. Where a
field's scroll area cannot place it, the document reveals it, in the
page and in a fixed container where the document's scroll moves the
container, as in Safari while its keyboard shows; elsewhere Core scrolls
the document back. Where the document cannot scroll far enough, as at a
short page's end in Chrome, a pan of the visual viewport takes the rest
in the same frame (`panVisualViewportTo`): a probe fixed in the layout
viewport is scrolled into view, as the reveal-pan watch puts a pan back.
The watch takes Core's own pan as the new rest. Firefox for Android does
not pan for the probe. A page with nothing to scroll keeps the browser's
own reveal.

On Chrome's show, a docked bar first sets its field 4 px above the
keyboard's top at once, as the Tall sheet does, and only the rest rides,
so Chrome's own pan finds the field clear. Every viewport report now
feeds the ride's reveal-pan watch, so a pan Chrome still makes is put
back, and a pan made at one keyboard height goes back at the next.
Under Remove animations, Gboard first reports a keyboard 48 px tall,
and Chrome may then reveal the bar's field itself: it scrolls the page
behind the bar, then pans. In Chrome, the ride's watch scrolls the
document back as well, when the scroll and the pan centre the field as
Chrome's reveal does; the app's own scroll to another element stays.

On iOS, a reveal that places the field rises on the browser's smooth
scroll from the keyboard's first report, which comes as the keyboard
starts to slide, so the field rises beside it (`risesSmoothly`, which
reads Core's iOS WebKit check, `isIosWebKit`). The scroll back records
where the rise is headed, and a rise still on its way when the keyboard
changes height carries on from its target. Under Reduce Motion, in a
theme that reduces motion for everyone, and in Chrome, which checks the
field in the resize's own commit, the reveal moves at once. The rise and
the scroll back ask the motion module's new `reducesMotion`, beside
`reducedMotionFade`, which now uses it, so a theme that reduces motion
for everyone counts as the setting for both. A scroll area's reveal goes
through its own `scrollBy` with an explicit behavior where it has one,
so a smooth `scroll-behavior` on the area cannot slow an instant reveal,
as the Tall sheet's reveal already does.

When the keyboard closes, each scroller a reveal moved scrolls back to
where it was (keyboardScrollBack.ts), on the browser's smooth scroll.
Safari on iOS reports the keyboard gone about half a second after the
blur that closes it, once it is down. There the scroll back starts at
that blur, once the focus change settles on nothing that brings up a
keyboard with no finger on the screen, and slides down beside the
keyboard; the report only confirms it. A finger then can be a tap that
brings the keyboard back, so the report decides, as elsewhere and under
Reduce Motion, where the scroll lands at once. Safari applies a scripted
scroll a frame late, so a scroll set each frame jitters. A scroller the
person scrolled meanwhile keeps their scroll. A field that gains focus
during the slide stops the scroll back where the page is
(`stopKeyboardScrollBack`), and its reveal goes on from there as Core's
own scroll. A sandbox page puts three fields in the middle of a page
that scrolls the document.

Each field's `.keyboard.test.tsx` drives the keyboard module's test
double. Mobile keyboard stories on TextInput place the fields low in the
page, a TextInput in a toolbar fixed at the bottom (docked, floating
above the edge, or with its own `translate`), a last field at the end of
a short page and of a scroll area, a scroll area low on the page, a
scroll area in a floating panel and in a full-viewport panel, and a
field in a sheet of a set height.

Firefox for Android can carry the reveal's document scroll as a
visual-viewport offset, show the document where it was before the
reveal at the keyboard's hide report, and turn the offset back into a
document scroll only after it. The scroll back then waits up to a
second for the first document scroll: one that lands where Core left
the document is the browser's own, and the scroll back follows it. A
touch, a keyboard that comes back, the field's page going, or the
wait's end puts nothing back.

The reveal-pan watch's touch flag now holds through a report that comes
while a finger is on the screen. In Firefox the toolbar hides in a drag,
which changes the measured keyboard height mid-drag; the watch then took
the drag's own pan for the browser's and put it back. The input stream
now counts the fingers on the screen from touch events
(`isTouchOnScreen`), only while `touchend` and `touchcancel` are heard.
A native pan keeps a finger there, though its `pointercancel` drops the
press from `getDownPresses`, so that record cannot serve. The watch's
shared touch subscription hears those two types, and a report reads the
count.

After the show's first reveal, a keyboard report reveals nothing while a
press that started after the last reveal is down. In Firefox the toolbar
hides in a drag, and the reveal re-applied itself with small scrolls
under the person's finger. The report's height is kept, so the field
stays where the person put it, and a later report with the finger up
reveals it as before. The press that focused the field holds nothing: a
long press focuses with the finger still down, and Gboard can report a
48 px keyboard first, then its full height. The input stream also counts
the touches that start (`getTouchStartCount`), and each reveal notes
that count. The keyboard module reads the finger count through
`isFingerOnScreen`: a finger down at the keyboard's last hide counts no
more until a touch starts, since a touch whose target leaves the page
ends at a node the window never hears. The count includes a stylus,
whose drag moves the page as a finger does.

Nine unit tests cover the scroll back from the blur on iOS: it starts at
the blur and the report moves nothing more; focus that moves on to
another field or into a frame keeps the page; a finger on the screen at
the blur leaves it to the report; a person's scroll stands; Reduce
Motion waits for the report; a field focused again during the slide
stops the scroll back and rises from where the page is, or stays where a
touch stopped it with nothing left to raise; and the next close goes
back to the first place, at a blur or at a report.

Six unit tests cover the scroll back: the page's smooth scroll at the
report (nothing before it), Reduce Motion, a theme that reduces motion,
a person's scroll kept, a scroll area after Back, and a focus move to
another field. Firefox-shaped cases carry the reveal as an offset and
close the keyboard before the fold: the scroll back follows the fold, a
touch-drag control keeps the page, only the first document scroll
counts, and each way the wait ends leaves no scroll listener. Safari's
and Chrome's close sequences still decide at the report, with no wait. A
Firefox-shaped drag grows the viewport twice with the finger down and
finds no put-back; after the finger is up, a browser pan is put back.
Another drags the page with the toolbar hiding twice and finds no reveal
scroll until the finger is up. A long press focuses the field while
Gboard grows from 48 to 290 px, and the field is revealed at 290; the
next show's first reveal runs again under the same press, and a press
that starts after the reveal holds the next report until it lifts. After
the keyboard goes with no finger down, a long press that brings it back
is revealed with that press still down. Another holds a report while the
long press's finger stays down after a second finger tapped and lifted.
Another misses a touch's end, as when its target leaves the page, and
finds a browser pan put back once the keyboard has hidden and shown
again. The input stream's tests count fingers through a second finger, a
cancel and a native pan's `pointercancel`, count nothing while a touch
end could go unheard, and count the touches that start. Six cover the
rise on iOS: its smooth scroll, Reduce Motion, a theme that reduces
motion, the scroll back after a rise drawn later, a rise carried on at a
new height, and no second reveal while a scroll area's rise is drawn.
Their CSS.supports stub answers both of Safari's forms, a property and
value or a condition. Another drives a scroll area with a smooth
`scroll-behavior` and finds its own `scrollBy` called at once. Two in
the motion module cover `reducesMotion`: the setting, and a theme that
reduces motion for everyone.

* fix(rectMorph): a handed-in animator stays on the element through a copy dismissal

CodeBunny on #9769: a dismissal onto a copy detached the animator, and a
handed-in one was never attached again, so its owner's writes stopped
reaching the element. Only the morph's own animator lets go now.

Co-authored-by: Cindy Zhang <[email protected]>

* fix(motion): one timed curve keeps a retargeted velocity, for the pager and the morph

CodeBunny on #9769: solveAnimatedPageScroll already played this curve and
keeps the velocity of the move it retargets. timedCurve in progress.ts is
now that one curve; the pager and the morph's timed motion call it, so a
timed present that interrupts a dismissal keeps its velocity. The INV12
note states the system only. File header and comments trimmed.

Co-authored-by: Cindy Zhang <[email protected]>

* fix(rectMorph): a timed motion from rest plays its easing as given

CodeBunny on #9769: with nothing in flight the morph handed timedCurve a
velocity of 0, which it treats as a retarget and uses to cancel the
easing's starting slope. Only a motion in flight hands its velocity on now;
tests check a present from rest and a dismissal from a settled present
against the easing itself. Header and comments shortened.

Co-authored-by: Cindy Zhang <[email protected]>

* docs(rectMorph): the timing follows the component's motion record

The type's doc, the example and the changeset name no rule of their own
about which input plays which timing: each play takes the timing the
adopting component's motion record names (AST-094 FR45).

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

* docs(AST-099): TextInput, TextArea and NumberInput meet FR9

FR9's scrolling-content bullet adds the spec owners' sentence: where a
browser carries out the document's scroll by moving the visual viewport,
that offset is the reveal, not a pan. Gap 2 is met. Gaps 1, 10 and 11
say what the three fields now do. Gap 11 keeps the missing scroll range
as the fix; until a scroller gains it, Core pans the visual viewport
where the document cannot scroll far enough.

Two verification rows cover Firefox for Android (the offset equals the
computed reveal) and Chrome (no pan added after Core places the field).
Chrome's names the cases Core pans, and fails a field Core pans that
ends other than 10 CSS px above the keyboard. In Firefox for Android
the pan moves nothing where the page has no scroll range; Gap 11 names
those cases.
The device-evidence row records that a docked toolbar resting under the
keyboard while a field outside it has focus is not a failure.
BottomSheet's height doc says what such a field gets in a sheet that is
not a fully expanded Tall sheet.

FR9's scrolling-content bullet adds the close: each scroller that
revealed the field scrolls back to where it was before the reveal, and
a scroll the person made while the keyboard showed is kept. A
verification row covers a field in the middle of a page that scrolls
the document.

FR9's scrolling-content bullet adds the open: on iOS the field rises on
the browser's own smooth scroll beside the keyboard's slide, settling
within 0.15 s after the keyboard settles, and it moves in one frame
under Reduce Motion, in a theme that reduces motion for everyone, and in
other browsers. A verification row reads every drawn frame of the rise.
Gap 13 records Chrome's rise, which stays in one frame because Chrome
checks the field in the resize's own commit; Firefox for Android takes
the same path. The device-evidence row's
failure for a reveal later than the keyboard's report notes that on iOS
the rise starts in that frame and settles as FR9 states.

FR9's scrolling-content bullet adds the hold: a show's first report
always places the field, and a later report that comes while a finger
is down, after a touch has begun since the field's last placement,
moves nothing.

FR9's close adds that at the hide report, Firefox for Android can still
show the document where it was before the reveal, and turns the reveal
back into a document scroll only after that report; the scroll back
follows that scroll. A row closes the keyboard with Back in
Firefox for Android at normal speed and on a slow profile.

The input-fields family's FR13 status says the same: the three fields
meet FR13 through FR9, apart from Gap 11.

FR9's close now starts the scroll back at the blur that closes the
keyboard in Safari on iOS, beside the keyboard's slide; the report that
the keyboard has gone comes later and only confirms it. Elsewhere it
starts at that report, and under Reduce Motion, and in a theme that
reduces motion for everyone, it lands at once there. A scroller the
person scrolled keeps the person's scroll, a finger on the screen at the
blur leaves the scroll back to the report, and a field that gains focus
during the slide stops the scroll back where the page is. Safari's close
row reads every drawn frame from Done until the page rests, and adds a
tap on the field 80 ms and 150 ms after Done. The open sentence is
rewrapped, word for word.

* Merge main into motion/morph-path

* Merge motion/morph-path into motion/rect-morph

Main renamed the engine's factory to createMotionEngine. The merge
takes that name in the test bundle and in rectMorph and its tests.

* fix(rectMorph): AST-094 links the morph; the proof imports a safe test

The morph's comment cited AST-094 FR45 as its only link to that
record. AST-094 now lists the file, and the comment keeps the fact
without the citation. The proof imports `test` from the a11y-spec
package, whose contexts reach no remote host, as main's lint asks.

* test(SnapPaging): the pager's bundle lists the progress module

The pager's timed settle takes its curve from motion/progress.ts, so
the hook adds that module over Carousel alone. The bundle test lists
it as pager code.

* test(motion): the popover's proofs read Popover's live geometry

The morph's popover proofs played a copy of Popover's growth that had
drifted: it lacked the overlap rule, so an overlapping popover grew
from its left edge where Popover grows from its top. The proofs now
import popoverCollapsedState, popoverFrame and frameOf from Popover.
A new overlapping case, which the deleted copy fails, pins the growth
from the top edge.

* Merge motion/morph-path into motion/rect-morph

* refactor(motion): one eased progress, with a retargeted velocity

The rect morph's timedProgressCurve played, from rest, the curve that
easedProgress already plays for Popover, SegmentedControl and the
layout glide. easedProgress moves into progress.ts and takes an
optional velocity: the Hermite carry that the pager and the morph use.
From rest its values do not change. Its velocity is a central
difference that stays inside the curve, and from rest it starts on the
curve's own slope. timedProgressCurve goes, and timedCurve maps
easedProgress onto values, keeping only its carry for no distance.

* test(motion): the popover's turn-around reads Popover's live curves

The morph's turn-around proof compared restartFrom with lines written
in the test, so a change to Popover's readState or surfaceCurves left
it green. Popover exports both for the proofs, which now replay its
own turn-around. morphPath.ts's header keeps only its tags: the
paths' own JSDoc says the rest.

* Merge motion/morph-path into motion/rect-morph

* docs(changeset): the rect morph's note names the eased-progress move

The note said timedProgressCurve joins the progress helpers, which
this pull request no longer adds. It now says easedProgress moves to
them with a retargeted velocity, and timedCurve joins them.

* Merge main into motion/rect-morph

Main's Popover touch growth, which plays on the surface and floors its
opacity curve with motion/opacityFloor.ts, meets the rect morph's move
of easedProgress into motion/progress.ts in the imports of
popoverSurfaceMotion.ts. The merge keeps both: the floor's import, and
easedProgress from progress.

* test(motion): the popover's turn-around compares opacity as drawn

Popover's surface curves now stop their opacity at 0 or a floor above
it. Past its end, a turn-around toward the source takes the popover
path's opacity below 0, where Popover's stops at 0. An opacity draws
clamped to 0 through 1, so both draw 0. The proof now compares the two
as drawn, which holds with Popover's curves before and after the
floor.

* Merge motion/morph-path into motion/rect-morph

* Merge main

* fix(motion): a popover's morph never reads an opacity below 0

A popover's grow path read its opacity on a straight line, so before
its start and past its end it went below 0: a turn-around toward the
source read -0.025 at 1.05. An opacity below 0 draws as 0, so
opacityAt now stops at 0. The popover proofs compare opacities as
drawn, since Popover's own model still reads below 0 there.

* Merge motion/morph-path into motion/rect-morph

* feat(DropdownMenu): a finger or a pen opens the menu as it presses

Under a finger or a pen, a DropdownMenu or MoreMenu trigger opens its
menu as it is pressed, instead of after a 500 ms hold (spec:AST-094
FR29, FR43). Inside a scroll view it opens once the 150 ms
content-touch delay passes with no scroll, so a scroll that starts on
the trigger still scrolls. The finger that opened the menu picks a row
only after moving 10 px. presentation="popover" keeps the previous
behavior.

useMenuPress with no longPressDelayMs follows the same rules, and
longPressDelayMs: 500 keeps the previous hold.

* test(motion): the morph proofs drop the menu's old straight line

The anchored menu's case modeled a straight line from a 22 px square on
its control. The menu now grows out of its trigger on Popover's edge
path, which the popover cases already check, so the case no longer
describes any presentation's model. The file header follows.

* Merge main

* Merge main

* docs(DropdownMenu): open-on-press notes name the anchored menu

A menu shown as a bottom sheet still opens at the tap's click, so the
release note names the anchored menu, as the press does. The hook's doc
names a finger or a pen on every device, as the hook acts.

* Merge main

* sandbox: a page to try a menu's press under a finger

A raw page that scrolls with the document. Its Actions menu sits in a
fixed top bar, so it opens as a finger presses it, and a slide onto a
row runs that row once. Its More menu sits in the page, so a flick that
starts on it scrolls the page. The bar shows which row ran and how many
times.

* Merge main

* Merge the open-on-press change into the rect morph stack

* feat(DropdownMenu): a finger's open grows the menu out of its trigger

Under a finger or a pen, a DropdownMenu or MoreMenu grows out of its
trigger as it opens and shrinks back into it as it closes. It plays on
the shared rect morph, on the popover's path and timing, so it grows as
a Popover does. A tap's open grows as a hold's does: the open at a tap's
lift used to take the mouse's path.

The grow's code loads at the first touch on the page or on a trigger. A
mouse, the keyboard and presentation="popover" keep the layer's own
entrance.

* fix(DropdownMenu): under Reduce Motion a finger's open only fades in

Under Reduce Motion, a finger's open played the grow, which the animator
turns into a dip: for its first half the menu sat collapsed at the
trigger. A resting mouse's click then missed the row it rested on. The
open now keeps the layer's own entrance, which only fades in where the
menu rests, as before the grow. FR21 and the changeset say so.

* test(DropdownMenu): touch specs wait out a finger's grow

A finger's grow starts a frame after the open, or once its code arrives,
and holds input until its curve ends. The press specs now wait for three
still frames, and the entrance-hold spec waits for the grow to start and
for its natural end. Finishing its animations from a script leaves the
grow's hold in place until its curve ends.

* refactor(core): one Reduce Motion predicate for the animator and menu

The menu's glue copied the animator's Reduce Motion read. A leaf
module now holds the one predicate: the person's setting, or a theme
that reduces motion for everyone. The animator, the Reduced Motion
policy and the glue call it. It imports no motion code, so the glue
reads it without the animator in DropdownMenu's static bundle. No
behavior changes.

* fix(DropdownMenu): every copy of Core shares the grow's one load

The menu kept its loaded grow code, the load in flight and the
replaceable import in module scope. Every copy of Core now shares them
under a registered key. A change to the module's calls bumps the
version, so each copy then keeps its own.

* fix(DropdownMenu): taps stay off the page until the menu shows

Under a coarse primary pointer, the grow takes its input hold at its
first frame. Before that frame, a tap reached the page: on an open
with the code loaded, and on the first open between the code's arrival
and the grow. A hold now lasts from the open until the grow's first
frame. The press model's unit cases stub the presentation's hold, as
jsdom never ends the grow.

* docs(AST-094): FR31 grows once the grow's code is loaded

Until the code is loaded, an open fades. Only an open before the code
first loads in a page session can fade: the first open, or an open
after a failed load.

* Merge main

* docs(AST-094): FR31's faded open closes with no shrink

An open before the grow's code loads fades, and its close plays no
shrink, as the DropdownMenu record's FR21 states.

* fix(keyboard): the scroll back's records are one per page across copies

keyboardScrollBack.ts keeps its four per-window stores under registered
shared keys, as main now keeps the rest of the keyboard model. A
swizzled copy's field and the package's field then note into one record,
so one scroll back runs per page.

The shared-identity check flagged the four module-scope stores after the
merge of main. focusKeyboard.shared.test.tsx gains a case: the package
sees where a copy's scroll for the keyboard is headed.

* fix(DropdownMenu): the grow's code loads through the shared loader

The grow's code now loads through the shared module loader that the
menu's bottom sheet uses, as the import boundaries require. A failed
load warns once in development builds, and the next open still asks
again. The DropdownMenu record's FR21 names when the code loads: at a
trigger's first touch, or the page's first touch where touch is the
primary input.

* Merge main

* fix(keyboard): a field focused as it mounts starts its session at attach

A TextInput, TextArea or NumberInput with hasAutoFocus has focus before
the keyboard path attaches, so no later focus event starts its session,
and it kept only the browser's own reveal. keepFieldAboveKeyboard now
starts the session at attach when the field already has focus. Every
other route is unchanged.

Each field's keyboard test gains a hasAutoFocus case, which fails
without the fix.

* Merge main

* Merge the open-on-press change into the rect morph stack

* Merge main and the open-on-press change

* Merge commit 'ebb9ddecc0219bc6eaf3caf40b6e4e45f81dc0e5' into motion/rect-morph

* fix(motion): existing callers keep easedProgress's values; the pager and the rect morph use timedCurve

easedProgress moves to the progress helpers byte for byte, so Popover and
SegmentedControl read the same positions and velocities as on main.
timedCurve is the pager's curve as on main, with one change: from rest,
its velocity at t <= 0 is the curve's own starting slope. The rect morph
plays its timed motion on timedCurve from 0 to 1.

callerMotionValues.test.ts pins easedProgress and the pager on a fixed
grid, bit for bit, to main's values.

Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant)

* test(paging): a retarget at the first instant goes on at the starting speed

A linear move of 300 px over 0.3 s, retargeted at t = 0, reads 0 px/s on
main, so the retarget starts from rest. Now it reads about 1000 px/s, the
curve's own starting slope, and the retarget keeps that speed. The
position stays continuous.

Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant)

* test(paging): a 0 ms move is on its target at once, at rest

On main a 0 ms animated scroll reads NaN at t = 0 and its start position
before it. timedCurve's 0 ms guard puts it on its target with no speed,
as the rect morph's 0 ms timing does.

* test(motion): compare the callers' values with copies of the earlier functions

A float64 hash of easedProgress's values is not the same on every
platform: macOS arm64 and CI's Linux give different hashes for main's
code. The test now keeps copies of easedProgress and
solveAnimatedPageScroll as they are on main (ebb9dde), and checks that
the shipped functions give the same number, bit for bit (Object.is), for
each position and velocity on the grid. From rest, the pager's velocity
at t <= 0 stays the one value left out.

Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant)

* Merge the open-on-press change into the rect morph stack

* Merge the rect morph's new head

* refactor(core): one useMenuPress for every menu

* refactor(keyboard): read Reduce Motion through reducedMotionFade

The keyboard path asks the Reduced Motion policy that already serves
motion the animator does not drive: reducedMotionFade(element) is null
when motion is not reduced. That answer counts the person's setting and
a theme that reduces motion for everyone, as before.

reducesMotion, which this branch added to reducedMotion.ts, goes, so
reducedMotion.ts, its test and the motion README are as on main.
Behavior is unchanged.

* refactor(keyboard): the scroll back lives in keyboardTarget.ts

keyboardTarget.ts, the scroll back's only caller, already imports
everything it uses, so the scroll back moves there verbatim and its
functions become private. keyboardScrollBack.ts and its five exports go.
Its four stores keep their shared keys, now named for keyboardTarget.

focusKeyboard.shared.test.tsx is as on main: the shared-identity source
check covers the stores. Behavior is unchanged.

* docs(AST-099): name the keyboard module's new cross-module exports

Current-state impact names the five exports the keyboard path adds and
why each one is needed: the input stream's two touch counts,
keyboardHeight's finger read and visual-viewport pan, and
keyboardTarget's clearance at the first report.

* Merge the open-on-press change into the rect morph stack

* Merge the open-on-press change's rework

* docs(AST-099): Gap 19, a field in a modal sheet shorter than tall

FR9's implementation gaps gain Gap 19. A modal BottomSheet shorter than
tall is a full-viewport dialog with no scroller, and BottomSheet's
keyboard path runs only for a tall sheet. So a field there keeps the
browser's own reveal, and Chrome on Android pans the page.

* refactor(DropdownMenu): grow with the page, on Popover's surface motion

* docs(Popover): name the surface motion options DropdownMenu passes

* Merge main

* Merge main

* Merge the open-on-press change into the rect morph stack

* Merge the open-on-press change's main merge

* test(DropdownMenu): read the row under a held finger once the grow rests

* docs(AST-099): name Gap 19 where the fields meet FR9

The implementation-gaps lead, Gap 2 and family:input-fields' FR13 status
line say TextInput, TextArea and NumberInput meet FR9 apart from the
missing scroll range. They now also name Gap 19, a modal BottomSheet
shorter than tall.

* refactor(input): one touch reader in the input stream

isTouchOnScreen and getTouchStartCount become one reader, getTouches. It
returns the record the stream already keeps: the fingers on the screen
and how many touches started. The keyboard module reads it at each of
its five places. No behavior changes, and the same tests pass through
the one reader.

* docs(AST-099): name the input stream's one touch reader

AST-099's current-state list names getTouches, the one reader that
replaces isTouchOnScreen and getTouchStartCount.

* Merge commit '7e7fbae0fa0ba389ad37fafdb26e6495fab19fd4' into motion/rect-morph

# Conflicts:
#	packages/core/src/SegmentedControl/useSegmentedSelectionMotion.ts

* Merge main into the rect morph stack

* Merge main and the rect morph stack's live head

* docs(AST-094): name the morph path module

* Merge commit '6176b9dccc1986b83713e4c9dcf39688e7c5b3e6' into motion/rect-morph

* docs(AST-094): name the rect morph module

* refactor(Popover): name the tap hold until the grow's first frame

* Merge main into the rect morph stack

* Merge main and the rect morph stack's live head

* refactor(DropdownMenu): grow on Popover's own surface motion

* Merge main, without the rect morph stack

* fix(Popover): grow from the trigger's box without its press scale

* Merge main for useCommittedRefInto

* fix(DropdownMenu): commit presentSurfaceRef through useCommittedRefInto

* refactor(DropdownMenu): read the click's press from the press model

* docs(DropdownMenu): record the press report and the entrance without one

* docs(DropdownMenu): word the press records in the present tense

* Merge main for the press model's committed refs

* fix(DropdownMenu): mark a finger's open only where the menu opens

* Merge main

* fix(DropdownMenu): tie a finger's open to its gesture

* fix(core): keep the keyboard store apart from copies of another shape

The hide's touch count changes the keyboard store's shape, so its shared
key moves to version 2. A copy of Core built against the earlier shape
keeps its own store, as spec:AST-110 FR3 requires.

A case puts an earlier copy's listening store under version 1: the
package keeps its own store and reads its own height, and the other
store keeps its height and shape. On version 1 the package reads the
other copy's 300 px.

touchQueries.ts's comment also names the scroll back from the blur among
isIosWebKit's readers.

* fix(DropdownMenu): an open from code plays the layer's entrance

A Reduce Motion comment drops a claim a reduced-motion theme breaks.

* Merge main

* refactor(core): state the keyboard store's constraint in its comment

The version comment now says what the store holds and why a copy of
Core with another store shape keeps its own, instead of how the
version came to change.

* Merge main for the menu press's touch identifier

* fix(DropdownMenu): under Reduce Motion a menu fades out where it stands

* Merge main

* Merge main for the menu's show and hide refs at commit

* Merge main

* fix(DropdownMenu): say Reduce Motion fades only on a coarse pointer

* Merge main for the layer's show from another trigger

* Merge main

* Merge main

* Merge main for the alert dialog's touch motion and the swipe actions

* Merge main for the popover's focus-return target

* fix(Layer): an exit copy keeps the padding and colors of what it copies

* Merge the exit copy fix, with main

* test(DropdownMenu): a finger's close copy draws the menu's rows in place

* test(Layer): the browser's popover style reaches the exit copy

* docs(DropdownMenu): the press model's record says why no engine fits

* Merge the exit copy fix's test update

* Merge main into the exit copy fix

* Merge main for the kept-inside hold's release

* fix(menu press): cancel a pick's touchend on the node the touch began on

A finger's pick that closes the menu can take its row out of the
document before the touch's touchend arrives: a pick in a submenu does.
The browser still sends that touchend to the row, but the window, where
the click guard listened, never receives it. So the touchend went
uncancelled, and the browser's click for it reached the control under
the finger once a busy main thread had outlasted the 400 ms click guard.

The menu press model now keeps the node the touch began on, from the
touchstart that names the touch, and the click guard also listens for
the touchend there. One listener cancels it, and both stop together.
The menu still closes at the pick.

* Merge main into the exit copy fix

* Merge main

* Merge main

* Merge main

* Merge main

* Merge main

* fix(DropdownMenu): a finger's open that waits still grows

* Merge main

* Merge main

* Merge main

* docs(keyboard): record Back in Firefox for Android as a gap

Main shows it too.

* docs(keyboard): say that Gap 21 shows more often on main

* Merge #9777

* Merge #8080

* docs(keyboard): narrow the changeset for Back in Firefox for Android

Gap 21 names FR9 and no longer names main.

* test(DropdownMenu): pin a waiting finger open that another press leaves

* Merge main

* Merge #9777

* Merge #8080

* Merge main

* Merge #9777

* Merge #8080

* Merge main

* Merge #8080

* Merge main

* Merge #8080

* Merge main

* Merge #8080

* Merge main

* Merge #8080

* Merge main

* Merge #8080

* fix(DropdownMenu): one top-layer shield for a finger's open

A finger's open raised two viewport shields: the hold until the grow's
first frame keyed on the menu's surface, and the entrance hold on its
popover. Each showed its shield in the top layer, which forces a style
update in the open's task. The touch presentation's holds now key on
the top-layer popover around the surface (holdLayerOf), so they share
one shield. The gap until the first frame stays held over the viewport.

* Merge #8080

* Merge main

* Merge #8080

* ci: record the Chromium time of the new DropdownMenu touch-grow spec

The pr-interaction leg that ran it took 13.2 s for its 11 tests, timed
as recordLog times a file. Without a time, fewer than nine in ten of the
interaction specs on main plus this change have one.

* Merge #8080

* ci: record the Chromium time of the new DropdownMenu tap-through spec

The pr-interaction leg that ran it took 10 s for its 3 tests, timed as
recordLog times a file. Without a time, fewer than nine in ten of the
interaction specs on main plus this change have one.

* Merge main

* Merge #8080

* Merge main

* Merge #8080

* Merge main

* Merge #8080

Co-authored-by: Cindy Zhang <[email protected]>
cixzhang added a commit that referenced this pull request Nov 23, 2026
…12179)

* feat(core): one progress module for the motion foundation

progressCurve, mapProgress, mapRange and presentedProgressVelocity in
motion/progress.ts, internal, one velocity unit (progress per second).
Rebuilt on main from the pull request's own change, without the open
dependency chain it no longer needs.

Co-authored-by: Cindy Zhang <[email protected]>

* refactor(animatedLayout): take the settle spring's progress from progressCurve

CodeBunny on #9755: springProgress solved the same spring as progressCurve.
It now reads progressCurve (remaining = 1 - progress), so one implementation
remains. Same curve, same settle epsilon (0.001) and duration.

* feat(core): the rect morph's paths, the rect a grow-out presentation shows at each progress

lerpPath, edgeGrowPath, each path's restartFrom and morphCurves in
motion/morphPath.ts, internal. Pure geometry over a progress curve: the
caller chooses the timing. Rebuilt on the progress module from the pull
request's own change, without the open chain it no longer needs.

Co-authored-by: Cindy Zhang <[email protected]>

* Merge remote-tracking branch 'origin/main' into motion/morph-path

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

* feat(core): one rect morph for touch presentations that grow out of a source rect

createRectMorph in motion/rectMorph.ts, internal: present along a path and
dismiss back onto a copy or the element, each continuing the other from the
rect on screen. Rebuilt on main from the pull request's own change and
ported to main's engine (createMotionAnimator).

Timing follows the owner's rule for touch motion: present and dismiss take
a motion, either a theme duration and easing (a tap, a key, the program) or
a spring (a gesture's release, from its velocity). timedProgressCurve joins
the progress helpers. architecture:react-component-runtime INV12 records the
implementation gap: the size-change glide moves onto the morph next.

Co-authored-by: Cindy Zhang <[email protected]>

* feat(TextInput, TextArea, NumberInput): fields stay above the keyboard

Each passes its input to `useMobileKeyboard` from its own render, with
no prop and no Effect of its own. On focus the field decides where it
is: inside a keyboard target such as a Tall BottomSheet it moves
nothing; in an app's bar docked at the viewport's bottom, the bar rides
the keyboard, its bottom on the keyboard's top; in scrolling content,
its nearest scroller, the document included, scrolls it 10 px above the
keyboard in the keyboard's report. In a fixed container the app
positions itself, a scroller around the field reveals it, and with none
the browser's own reveal stays. Its first tap and focus moves into it
arrive without the browser's reveal where the module places the field,
so the page never pans there.

A scroll area does not gain the range it lacks at its end yet. Where a
field's scroll area cannot place it, the document reveals it, in the
page and in a fixed container where the document's scroll moves the
container, as in Safari while its keyboard shows; elsewhere Core scrolls
the document back. Where the document cannot scroll far enough, as at a
short page's end in Chrome, a pan of the visual viewport takes the rest
in the same frame (`panVisualViewportTo`): a probe fixed in the layout
viewport is scrolled into view, as the reveal-pan watch puts a pan back.
The watch takes Core's own pan as the new rest. Firefox for Android does
not pan for the probe. A page with nothing to scroll keeps the browser's
own reveal.

On Chrome's show, a docked bar first sets its field 4 px above the
keyboard's top at once, as the Tall sheet does, and only the rest rides,
so Chrome's own pan finds the field clear. Every viewport report now
feeds the ride's reveal-pan watch, so a pan Chrome still makes is put
back, and a pan made at one keyboard height goes back at the next.
Under Remove animations, Gboard first reports a keyboard 48 px tall,
and Chrome may then reveal the bar's field itself: it scrolls the page
behind the bar, then pans. In Chrome, the ride's watch scrolls the
document back as well, when the scroll and the pan centre the field as
Chrome's reveal does; the app's own scroll to another element stays.

On iOS, a reveal that places the field rises on the browser's smooth
scroll from the keyboard's first report, which comes as the keyboard
starts to slide, so the field rises beside it (`risesSmoothly`, which
reads Core's iOS WebKit check, `isIosWebKit`). The scroll back records
where the rise is headed, and a rise still on its way when the keyboard
changes height carries on from its target. Under Reduce Motion, in a
theme that reduces motion for everyone, and in Chrome, which checks the
field in the resize's own commit, the reveal moves at once. The rise and
the scroll back ask the motion module's new `reducesMotion`, beside
`reducedMotionFade`, which now uses it, so a theme that reduces motion
for everyone counts as the setting for both. A scroll area's reveal goes
through its own `scrollBy` with an explicit behavior where it has one,
so a smooth `scroll-behavior` on the area cannot slow an instant reveal,
as the Tall sheet's reveal already does.

When the keyboard closes, each scroller a reveal moved scrolls back to
where it was (keyboardScrollBack.ts), on the browser's smooth scroll.
Safari on iOS reports the keyboard gone about half a second after the
blur that closes it, once it is down. There the scroll back starts at
that blur, once the focus change settles on nothing that brings up a
keyboard with no finger on the screen, and slides down beside the
keyboard; the report only confirms it. A finger then can be a tap that
brings the keyboard back, so the report decides, as elsewhere and under
Reduce Motion, where the scroll lands at once. Safari applies a scripted
scroll a frame late, so a scroll set each frame jitters. A scroller the
person scrolled meanwhile keeps their scroll. A field that gains focus
during the slide stops the scroll back where the page is
(`stopKeyboardScrollBack`), and its reveal goes on from there as Core's
own scroll. A sandbox page puts three fields in the middle of a page
that scrolls the document.

Each field's `.keyboard.test.tsx` drives the keyboard module's test
double. Mobile keyboard stories on TextInput place the fields low in the
page, a TextInput in a toolbar fixed at the bottom (docked, floating
above the edge, or with its own `translate`), a last field at the end of
a short page and of a scroll area, a scroll area low on the page, a
scroll area in a floating panel and in a full-viewport panel, and a
field in a sheet of a set height.

Firefox for Android can carry the reveal's document scroll as a
visual-viewport offset, show the document where it was before the
reveal at the keyboard's hide report, and turn the offset back into a
document scroll only after it. The scroll back then waits up to a
second for the first document scroll: one that lands where Core left
the document is the browser's own, and the scroll back follows it. A
touch, a keyboard that comes back, the field's page going, or the
wait's end puts nothing back.

The reveal-pan watch's touch flag now holds through a report that comes
while a finger is on the screen. In Firefox the toolbar hides in a drag,
which changes the measured keyboard height mid-drag; the watch then took
the drag's own pan for the browser's and put it back. The input stream
now counts the fingers on the screen from touch events
(`isTouchOnScreen`), only while `touchend` and `touchcancel` are heard.
A native pan keeps a finger there, though its `pointercancel` drops the
press from `getDownPresses`, so that record cannot serve. The watch's
shared touch subscription hears those two types, and a report reads the
count.

After the show's first reveal, a keyboard report reveals nothing while a
press that started after the last reveal is down. In Firefox the toolbar
hides in a drag, and the reveal re-applied itself with small scrolls
under the person's finger. The report's height is kept, so the field
stays where the person put it, and a later report with the finger up
reveals it as before. The press that focused the field holds nothing: a
long press focuses with the finger still down, and Gboard can report a
48 px keyboard first, then its full height. The input stream also counts
the touches that start (`getTouchStartCount`), and each reveal notes
that count. The keyboard module reads the finger count through
`isFingerOnScreen`: a finger down at the keyboard's last hide counts no
more until a touch starts, since a touch whose target leaves the page
ends at a node the window never hears. The count includes a stylus,
whose drag moves the page as a finger does.

Nine unit tests cover the scroll back from the blur on iOS: it starts at
the blur and the report moves nothing more; focus that moves on to
another field or into a frame keeps the page; a finger on the screen at
the blur leaves it to the report; a person's scroll stands; Reduce
Motion waits for the report; a field focused again during the slide
stops the scroll back and rises from where the page is, or stays where a
touch stopped it with nothing left to raise; and the next close goes
back to the first place, at a blur or at a report.

Six unit tests cover the scroll back: the page's smooth scroll at the
report (nothing before it), Reduce Motion, a theme that reduces motion,
a person's scroll kept, a scroll area after Back, and a focus move to
another field. Firefox-shaped cases carry the reveal as an offset and
close the keyboard before the fold: the scroll back follows the fold, a
touch-drag control keeps the page, only the first document scroll
counts, and each way the wait ends leaves no scroll listener. Safari's
and Chrome's close sequences still decide at the report, with no wait. A
Firefox-shaped drag grows the viewport twice with the finger down and
finds no put-back; after the finger is up, a browser pan is put back.
Another drags the page with the toolbar hiding twice and finds no reveal
scroll until the finger is up. A long press focuses the field while
Gboard grows from 48 to 290 px, and the field is revealed at 290; the
next show's first reveal runs again under the same press, and a press
that starts after the reveal holds the next report until it lifts. After
the keyboard goes with no finger down, a long press that brings it back
is revealed with that press still down. Another holds a report while the
long press's finger stays down after a second finger tapped and lifted.
Another misses a touch's end, as when its target leaves the page, and
finds a browser pan put back once the keyboard has hidden and shown
again. The input stream's tests count fingers through a second finger, a
cancel and a native pan's `pointercancel`, count nothing while a touch
end could go unheard, and count the touches that start. Six cover the
rise on iOS: its smooth scroll, Reduce Motion, a theme that reduces
motion, the scroll back after a rise drawn later, a rise carried on at a
new height, and no second reveal while a scroll area's rise is drawn.
Their CSS.supports stub answers both of Safari's forms, a property and
value or a condition. Another drives a scroll area with a smooth
`scroll-behavior` and finds its own `scrollBy` called at once. Two in
the motion module cover `reducesMotion`: the setting, and a theme that
reduces motion for everyone.

* fix(rectMorph): a handed-in animator stays on the element through a copy dismissal

CodeBunny on #9769: a dismissal onto a copy detached the animator, and a
handed-in one was never attached again, so its owner's writes stopped
reaching the element. Only the morph's own animator lets go now.

Co-authored-by: Cindy Zhang <[email protected]>

* fix(motion): one timed curve keeps a retargeted velocity, for the pager and the morph

CodeBunny on #9769: solveAnimatedPageScroll already played this curve and
keeps the velocity of the move it retargets. timedCurve in progress.ts is
now that one curve; the pager and the morph's timed motion call it, so a
timed present that interrupts a dismissal keeps its velocity. The INV12
note states the system only. File header and comments trimmed.

Co-authored-by: Cindy Zhang <[email protected]>

* fix(rectMorph): a timed motion from rest plays its easing as given

CodeBunny on #9769: with nothing in flight the morph handed timedCurve a
velocity of 0, which it treats as a retarget and uses to cancel the
easing's starting slope. Only a motion in flight hands its velocity on now;
tests check a present from rest and a dismissal from a settled present
against the easing itself. Header and comments shortened.

Co-authored-by: Cindy Zhang <[email protected]>

* docs(rectMorph): the timing follows the component's motion record

The type's doc, the example and the changeset name no rule of their own
about which input plays which timing: each play takes the timing the
adopting component's motion record names (AST-094 FR45).

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

* docs(AST-099): TextInput, TextArea and NumberInput meet FR9

FR9's scrolling-content bullet adds the spec owners' sentence: where a
browser carries out the document's scroll by moving the visual viewport,
that offset is the reveal, not a pan. Gap 2 is met. Gaps 1, 10 and 11
say what the three fields now do. Gap 11 keeps the missing scroll range
as the fix; until a scroller gains it, Core pans the visual viewport
where the document cannot scroll far enough.

Two verification rows cover Firefox for Android (the offset equals the
computed reveal) and Chrome (no pan added after Core places the field).
Chrome's names the cases Core pans, and fails a field Core pans that
ends other than 10 CSS px above the keyboard. In Firefox for Android
the pan moves nothing where the page has no scroll range; Gap 11 names
those cases.
The device-evidence row records that a docked toolbar resting under the
keyboard while a field outside it has focus is not a failure.
BottomSheet's height doc says what such a field gets in a sheet that is
not a fully expanded Tall sheet.

FR9's scrolling-content bullet adds the close: each scroller that
revealed the field scrolls back to where it was before the reveal, and
a scroll the person made while the keyboard showed is kept. A
verification row covers a field in the middle of a page that scrolls
the document.

FR9's scrolling-content bullet adds the open: on iOS the field rises on
the browser's own smooth scroll beside the keyboard's slide, settling
within 0.15 s after the keyboard settles, and it moves in one frame
under Reduce Motion, in a theme that reduces motion for everyone, and in
other browsers. A verification row reads every drawn frame of the rise.
Gap 13 records Chrome's rise, which stays in one frame because Chrome
checks the field in the resize's own commit; Firefox for Android takes
the same path. The device-evidence row's
failure for a reveal later than the keyboard's report notes that on iOS
the rise starts in that frame and settles as FR9 states.

FR9's scrolling-content bullet adds the hold: a show's first report
always places the field, and a later report that comes while a finger
is down, after a touch has begun since the field's last placement,
moves nothing.

FR9's close adds that at the hide report, Firefox for Android can still
show the document where it was before the reveal, and turns the reveal
back into a document scroll only after that report; the scroll back
follows that scroll. A row closes the keyboard with Back in
Firefox for Android at normal speed and on a slow profile.

The input-fields family's FR13 status says the same: the three fields
meet FR13 through FR9, apart from Gap 11.

FR9's close now starts the scroll back at the blur that closes the
keyboard in Safari on iOS, beside the keyboard's slide; the report that
the keyboard has gone comes later and only confirms it. Elsewhere it
starts at that report, and under Reduce Motion, and in a theme that
reduces motion for everyone, it lands at once there. A scroller the
person scrolled keeps the person's scroll, a finger on the screen at the
blur leaves the scroll back to the report, and a field that gains focus
during the slide stops the scroll back where the page is. Safari's close
row reads every drawn frame from Done until the page rests, and adds a
tap on the field 80 ms and 150 ms after Done. The open sentence is
rewrapped, word for word.

* Merge main into motion/morph-path

* Merge motion/morph-path into motion/rect-morph

Main renamed the engine's factory to createMotionEngine. The merge
takes that name in the test bundle and in rectMorph and its tests.

* fix(rectMorph): AST-094 links the morph; the proof imports a safe test

The morph's comment cited AST-094 FR45 as its only link to that
record. AST-094 now lists the file, and the comment keeps the fact
without the citation. The proof imports `test` from the a11y-spec
package, whose contexts reach no remote host, as main's lint asks.

* test(SnapPaging): the pager's bundle lists the progress module

The pager's timed settle takes its curve from motion/progress.ts, so
the hook adds that module over Carousel alone. The bundle test lists
it as pager code.

* test(motion): the popover's proofs read Popover's live geometry

The morph's popover proofs played a copy of Popover's growth that had
drifted: it lacked the overlap rule, so an overlapping popover grew
from its left edge where Popover grows from its top. The proofs now
import popoverCollapsedState, popoverFrame and frameOf from Popover.
A new overlapping case, which the deleted copy fails, pins the growth
from the top edge.

* Merge motion/morph-path into motion/rect-morph

* refactor(motion): one eased progress, with a retargeted velocity

The rect morph's timedProgressCurve played, from rest, the curve that
easedProgress already plays for Popover, SegmentedControl and the
layout glide. easedProgress moves into progress.ts and takes an
optional velocity: the Hermite carry that the pager and the morph use.
From rest its values do not change. Its velocity is a central
difference that stays inside the curve, and from rest it starts on the
curve's own slope. timedProgressCurve goes, and timedCurve maps
easedProgress onto values, keeping only its carry for no distance.

* test(motion): the popover's turn-around reads Popover's live curves

The morph's turn-around proof compared restartFrom with lines written
in the test, so a change to Popover's readState or surfaceCurves left
it green. Popover exports both for the proofs, which now replay its
own turn-around. morphPath.ts's header keeps only its tags: the
paths' own JSDoc says the rest.

* Merge motion/morph-path into motion/rect-morph

* docs(changeset): the rect morph's note names the eased-progress move

The note said timedProgressCurve joins the progress helpers, which
this pull request no longer adds. It now says easedProgress moves to
them with a retargeted velocity, and timedCurve joins them.

* Merge main into motion/rect-morph

Main's Popover touch growth, which plays on the surface and floors its
opacity curve with motion/opacityFloor.ts, meets the rect morph's move
of easedProgress into motion/progress.ts in the imports of
popoverSurfaceMotion.ts. The merge keeps both: the floor's import, and
easedProgress from progress.

* test(motion): the popover's turn-around compares opacity as drawn

Popover's surface curves now stop their opacity at 0 or a floor above
it. Past its end, a turn-around toward the source takes the popover
path's opacity below 0, where Popover's stops at 0. An opacity draws
clamped to 0 through 1, so both draw 0. The proof now compares the two
as drawn, which holds with Popover's curves before and after the
floor.

* Merge motion/morph-path into motion/rect-morph

* Merge main

* fix(motion): a popover's morph never reads an opacity below 0

A popover's grow path read its opacity on a straight line, so before
its start and past its end it went below 0: a turn-around toward the
source read -0.025 at 1.05. An opacity below 0 draws as 0, so
opacityAt now stops at 0. The popover proofs compare opacities as
drawn, since Popover's own model still reads below 0 there.

* Merge motion/morph-path into motion/rect-morph

* feat(DropdownMenu): a finger or a pen opens the menu as it presses

Under a finger or a pen, a DropdownMenu or MoreMenu trigger opens its
menu as it is pressed, instead of after a 500 ms hold (spec:AST-094
FR29, FR43). Inside a scroll view it opens once the 150 ms
content-touch delay passes with no scroll, so a scroll that starts on
the trigger still scrolls. The finger that opened the menu picks a row
only after moving 10 px. presentation="popover" keeps the previous
behavior.

useMenuPress with no longPressDelayMs follows the same rules, and
longPressDelayMs: 500 keeps the previous hold.

* test(motion): the morph proofs drop the menu's old straight line

The anchored menu's case modeled a straight line from a 22 px square on
its control. The menu now grows out of its trigger on Popover's edge
path, which the popover cases already check, so the case no longer
describes any presentation's model. The file header follows.

* Merge main

* Merge main

* docs(DropdownMenu): open-on-press notes name the anchored menu

A menu shown as a bottom sheet still opens at the tap's click, so the
release note names the anchored menu, as the press does. The hook's doc
names a finger or a pen on every device, as the hook acts.

* Merge main

* sandbox: a page to try a menu's press under a finger

A raw page that scrolls with the document. Its Actions menu sits in a
fixed top bar, so it opens as a finger presses it, and a slide onto a
row runs that row once. Its More menu sits in the page, so a flick that
starts on it scrolls the page. The bar shows which row ran and how many
times.

* Merge main

* Merge the open-on-press change into the rect morph stack

* feat(DropdownMenu): a finger's open grows the menu out of its trigger

Under a finger or a pen, a DropdownMenu or MoreMenu grows out of its
trigger as it opens and shrinks back into it as it closes. It plays on
the shared rect morph, on the popover's path and timing, so it grows as
a Popover does. A tap's open grows as a hold's does: the open at a tap's
lift used to take the mouse's path.

The grow's code loads at the first touch on the page or on a trigger. A
mouse, the keyboard and presentation="popover" keep the layer's own
entrance.

* fix(DropdownMenu): under Reduce Motion a finger's open only fades in

Under Reduce Motion, a finger's open played the grow, which the animator
turns into a dip: for its first half the menu sat collapsed at the
trigger. A resting mouse's click then missed the row it rested on. The
open now keeps the layer's own entrance, which only fades in where the
menu rests, as before the grow. FR21 and the changeset say so.

* test(DropdownMenu): touch specs wait out a finger's grow

A finger's grow starts a frame after the open, or once its code arrives,
and holds input until its curve ends. The press specs now wait for three
still frames, and the entrance-hold spec waits for the grow to start and
for its natural end. Finishing its animations from a script leaves the
grow's hold in place until its curve ends.

* refactor(core): one Reduce Motion predicate for the animator and menu

The menu's glue copied the animator's Reduce Motion read. A leaf
module now holds the one predicate: the person's setting, or a theme
that reduces motion for everyone. The animator, the Reduced Motion
policy and the glue call it. It imports no motion code, so the glue
reads it without the animator in DropdownMenu's static bundle. No
behavior changes.

* fix(DropdownMenu): every copy of Core shares the grow's one load

The menu kept its loaded grow code, the load in flight and the
replaceable import in module scope. Every copy of Core now shares them
under a registered key. A change to the module's calls bumps the
version, so each copy then keeps its own.

* fix(DropdownMenu): taps stay off the page until the menu shows

Under a coarse primary pointer, the grow takes its input hold at its
first frame. Before that frame, a tap reached the page: on an open
with the code loaded, and on the first open between the code's arrival
and the grow. A hold now lasts from the open until the grow's first
frame. The press model's unit cases stub the presentation's hold, as
jsdom never ends the grow.

* docs(AST-094): FR31 grows once the grow's code is loaded

Until the code is loaded, an open fades. Only an open before the code
first loads in a page session can fade: the first open, or an open
after a failed load.

* Merge main

* docs(AST-094): FR31's faded open closes with no shrink

An open before the grow's code loads fades, and its close plays no
shrink, as the DropdownMenu record's FR21 states.

* fix(keyboard): the scroll back's records are one per page across copies

keyboardScrollBack.ts keeps its four per-window stores under registered
shared keys, as main now keeps the rest of the keyboard model. A
swizzled copy's field and the package's field then note into one record,
so one scroll back runs per page.

The shared-identity check flagged the four module-scope stores after the
merge of main. focusKeyboard.shared.test.tsx gains a case: the package
sees where a copy's scroll for the keyboard is headed.

* fix(DropdownMenu): the grow's code loads through the shared loader

The grow's code now loads through the shared module loader that the
menu's bottom sheet uses, as the import boundaries require. A failed
load warns once in development builds, and the next open still asks
again. The DropdownMenu record's FR21 names when the code loads: at a
trigger's first touch, or the page's first touch where touch is the
primary input.

* Merge main

* fix(keyboard): a field focused as it mounts starts its session at attach

A TextInput, TextArea or NumberInput with hasAutoFocus has focus before
the keyboard path attaches, so no later focus event starts its session,
and it kept only the browser's own reveal. keepFieldAboveKeyboard now
starts the session at attach when the field already has focus. Every
other route is unchanged.

Each field's keyboard test gains a hasAutoFocus case, which fails
without the fix.

* Merge main

* Merge the open-on-press change into the rect morph stack

* Merge main and the open-on-press change

* Merge commit 'ebb9ddecc0219bc6eaf3caf40b6e4e45f81dc0e5' into motion/rect-morph

* fix(motion): existing callers keep easedProgress's values; the pager and the rect morph use timedCurve

easedProgress moves to the progress helpers byte for byte, so Popover and
SegmentedControl read the same positions and velocities as on main.
timedCurve is the pager's curve as on main, with one change: from rest,
its velocity at t <= 0 is the curve's own starting slope. The rect morph
plays its timed motion on timedCurve from 0 to 1.

callerMotionValues.test.ts pins easedProgress and the pager on a fixed
grid, bit for bit, to main's values.

Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant)

* test(paging): a retarget at the first instant goes on at the starting speed

A linear move of 300 px over 0.3 s, retargeted at t = 0, reads 0 px/s on
main, so the retarget starts from rest. Now it reads about 1000 px/s, the
curve's own starting slope, and the retarget keeps that speed. The
position stays continuous.

Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant)

* test(paging): a 0 ms move is on its target at once, at rest

On main a 0 ms animated scroll reads NaN at t = 0 and its start position
before it. timedCurve's 0 ms guard puts it on its target with no speed,
as the rect morph's 0 ms timing does.

* test(motion): compare the callers' values with copies of the earlier functions

A float64 hash of easedProgress's values is not the same on every
platform: macOS arm64 and CI's Linux give different hashes for main's
code. The test now keeps copies of easedProgress and
solveAnimatedPageScroll as they are on main (ebb9dde), and checks that
the shipped functions give the same number, bit for bit (Object.is), for
each position and velocity on the grid. From rest, the pager's velocity
at t <= 0 stays the one value left out.

Based on vjeux's test (vjeux/astryx coverage/rect-morph-first-instant)

* Merge the open-on-press change into the rect morph stack

* Merge the rect morph's new head

* refactor(core): one useMenuPress for every menu

* refactor(keyboard): read Reduce Motion through reducedMotionFade

The keyboard path asks the Reduced Motion policy that already serves
motion the animator does not drive: reducedMotionFade(element) is null
when motion is not reduced. That answer counts the person's setting and
a theme that reduces motion for everyone, as before.

reducesMotion, which this branch added to reducedMotion.ts, goes, so
reducedMotion.ts, its test and the motion README are as on main.
Behavior is unchanged.

* refactor(keyboard): the scroll back lives in keyboardTarget.ts

keyboardTarget.ts, the scroll back's only caller, already imports
everything it uses, so the scroll back moves there verbatim and its
functions become private. keyboardScrollBack.ts and its five exports go.
Its four stores keep their shared keys, now named for keyboardTarget.

focusKeyboard.shared.test.tsx is as on main: the shared-identity source
check covers the stores. Behavior is unchanged.

* docs(AST-099): name the keyboard module's new cross-module exports

Current-state impact names the five exports the keyboard path adds and
why each one is needed: the input stream's two touch counts,
keyboardHeight's finger read and visual-viewport pan, and
keyboardTarget's clearance at the first report.

* Merge the open-on-press change into the rect morph stack

* Merge the open-on-press change's rework

* docs(AST-099): Gap 19, a field in a modal sheet shorter than tall

FR9's implementation gaps gain Gap 19. A modal BottomSheet shorter than
tall is a full-viewport dialog with no scroller, and BottomSheet's
keyboard path runs only for a tall sheet. So a field there keeps the
browser's own reveal, and Chrome on Android pans the page.

* refactor(DropdownMenu): grow with the page, on Popover's surface motion

* docs(Popover): name the surface motion options DropdownMenu passes

* Merge main

* Merge main

* Merge the open-on-press change into the rect morph stack

* Merge the open-on-press change's main merge

* test(DropdownMenu): read the row under a held finger once the grow rests

* docs(AST-099): name Gap 19 where the fields meet FR9

The implementation-gaps lead, Gap 2 and family:input-fields' FR13 status
line say TextInput, TextArea and NumberInput meet FR9 apart from the
missing scroll range. They now also name Gap 19, a modal BottomSheet
shorter than tall.

* refactor(input): one touch reader in the input stream

isTouchOnScreen and getTouchStartCount become one reader, getTouches. It
returns the record the stream already keeps: the fingers on the screen
and how many touches started. The keyboard module reads it at each of
its five places. No behavior changes, and the same tests pass through
the one reader.

* docs(AST-099): name the input stream's one touch reader

AST-099's current-state list names getTouches, the one reader that
replaces isTouchOnScreen and getTouchStartCount.

* Merge commit '7e7fbae0fa0ba389ad37fafdb26e6495fab19fd4' into motion/rect-morph

# Conflicts:
#	packages/core/src/SegmentedControl/useSegmentedSelectionMotion.ts

* Merge main into the rect morph stack

* Merge main and the rect morph stack's live head

* docs(AST-094): name the morph path module

* Merge commit '6176b9dccc1986b83713e4c9dcf39688e7c5b3e6' into motion/rect-morph

* docs(AST-094): name the rect morph module

* refactor(Popover): name the tap hold until the grow's first frame

* Merge main into the rect morph stack

* Merge main and the rect morph stack's live head

* refactor(DropdownMenu): grow on Popover's own surface motion

* Merge main, without the rect morph stack

* fix(Popover): grow from the trigger's box without its press scale

* Merge main for useCommittedRefInto

* fix(DropdownMenu): commit presentSurfaceRef through useCommittedRefInto

* refactor(DropdownMenu): read the click's press from the press model

* docs(DropdownMenu): record the press report and the entrance without one

* docs(DropdownMenu): word the press records in the present tense

* Merge main for the press model's committed refs

* fix(DropdownMenu): mark a finger's open only where the menu opens

* Merge main

* fix(DropdownMenu): tie a finger's open to its gesture

* fix(core): keep the keyboard store apart from copies of another shape

The hide's touch count changes the keyboard store's shape, so its shared
key moves to version 2. A copy of Core built against the earlier shape
keeps its own store, as spec:AST-110 FR3 requires.

A case puts an earlier copy's listening store under version 1: the
package keeps its own store and reads its own height, and the other
store keeps its height and shape. On version 1 the package reads the
other copy's 300 px.

touchQueries.ts's comment also names the scroll back from the blur among
isIosWebKit's readers.

* fix(DropdownMenu): an open from code plays the layer's entrance

A Reduce Motion comment drops a claim a reduced-motion theme breaks.

* Merge main

* refactor(core): state the keyboard store's constraint in its comment

The version comment now says what the store holds and why a copy of
Core with another store shape keeps its own, instead of how the
version came to change.

* Merge main for the menu press's touch identifier

* fix(DropdownMenu): under Reduce Motion a menu fades out where it stands

* Merge main

* Merge main for the menu's show and hide refs at commit

* Merge main

* fix(DropdownMenu): say Reduce Motion fades only on a coarse pointer

* Merge main for the layer's show from another trigger

* Merge main

* Merge main

* Merge main for the alert dialog's touch motion and the swipe actions

* Merge main for the popover's focus-return target

* fix(Layer): an exit copy keeps the padding and colors of what it copies

* Merge the exit copy fix, with main

* test(DropdownMenu): a finger's close copy draws the menu's rows in place

* test(Layer): the browser's popover style reaches the exit copy

* docs(DropdownMenu): the press model's record says why no engine fits

* Merge the exit copy fix's test update

* Merge main into the exit copy fix

* Merge main for the kept-inside hold's release

* fix(menu press): cancel a pick's touchend on the node the touch began on

A finger's pick that closes the menu can take its row out of the
document before the touch's touchend arrives: a pick in a submenu does.
The browser still sends that touchend to the row, but the window, where
the click guard listened, never receives it. So the touchend went
uncancelled, and the browser's click for it reached the control under
the finger once a busy main thread had outlasted the 400 ms click guard.

The menu press model now keeps the node the touch began on, from the
touchstart that names the touch, and the click guard also listens for
the touchend there. One listener cancels it, and both stop together.
The menu still closes at the pick.

* Merge main into the exit copy fix

* Merge main

* Merge main

* Merge main

* Merge main

* Merge main

* fix(DropdownMenu): a finger's open that waits still grows

* fix(menu press): swallow a Home Screen app's late click after a pick

* test(menu press): a later tap still acts; cite the records exercised

* Merge main

* Merge main

* Merge main

* docs(keyboard): record Back in Firefox for Android as a gap

Main shows it too.

* docs(keyboard): say that Gap 21 shows more often on main

* Merge #9777

* Merge #8080

* Merge #11859

* docs(keyboard): narrow the changeset for Back in Firefox for Android

Gap 21 names FR9 and no longer names main.

* test(DropdownMenu): pin a waiting finger open that another press leaves

* Merge main

* Merge #9777

* Merge #8080

* Merge #11859

* Merge main

* Merge #9777

* Merge #8080

* Merge #11859

* Merge main

* Merge #8080

* Merge #11859

* Merge main

* Merge #8080

* Merge #11859

* Merge main

* Merge #8080

* Merge #11859

* Merge main

* Merge #8080

* Merge #11859

* Merge #11859

* Merge main

* Merge #8080

* fix(DropdownMenu): a pick's late click stays guarded after touchend

WebKit in a Home Screen web app can still send the mousedown, mouseup
and click after a menu pick's cancelled touchend, also when the touch's
touchstart was cancelable. The menu press model's click guard now stays
armed after that touchend, until the next pointerdown or the 400 ms
window. It takes only the browser's own late events there (isTrusted,
through utils/eventTrust.ts): a page's dispatchEvent or click() still
acts. A click whose detail is 0 still acts. Other arms keep the early
disarm.

* fix(DropdownMenu): one top-layer shield for a finger's open

A finger's open raised two viewport shields: the hold until the grow's
first frame keyed on the menu's surface, and the entrance hold on its
popover. Each showed its shield in the top layer, which forces a style
update in the open's task. The touch presentation's holds now key on
the top-layer popover around the surface (holdLayerOf), so they share
one shield. The gap until the first frame stays held over the viewport.

* Merge #8080

* Merge #11859

* refactor(clickGuard): keep the trust read in clickGuard.ts

The trust read belongs to the guard, so it stays in the guard's module.
The read and its test-only setter now live in utils/clickGuard.ts,
beside __resetClickGuardForTest, and utils/eventTrust.ts is gone. No
behavior changes; the tests change only their import.

* fix(clickGuard): register the trust read like the guard's state

The trust read is module state that the test-only setter changes, so it
sits under a registered key (sharedKey and realmValue), as the guard's
own state does. A second copy of Core then reads trust the same way.

* Merge main

* chore: re-trigger the preview deployment (empty commit; tree unchanged)

Co-authored-by: Cindy Zhang <[email protected]>

This branch was successfully deployed

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants