Skip to content

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

Draft
vjeux wants to merge 1716 commits into
meta:mainfrom
vjeux:uikit/c26-rect-morph
Draft

vjeux wants to merge 1716 commits into
meta:mainfrom
vjeux:uikit/c26-rect-morph

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8909 (the paths), #8340 (the animator) and #8497 (the progress module), on #8360. Review only this PR's change: vjeux/astryx@d1b883e...e874b14.

Why

Five touch presentations grow a surface out of what the finger touched and shrink it back: menus (#8080), Popover (#8187), the lifted preview (#8201), Lightbox's zoom (#8231) and a sub-menu's parent card (#8220). Each was writing its own version, and each would have to get interruptions and Reduce Motion right on its own.

What led to it

This comes from the work to make Astryx's touch components behave as native iOS ones do (sheets, menus, gestures and their motion). On iOS, a popover or menu grows from its source and, when interrupted, turns around from where it is on screen.

Options and tradeoffs

  • Keep one implementation per presentation: no shared module, but five sets of interruption bugs.
  • Animate width, height and top: simple paths, but layout and paint every frame on a phone.
  • Translate and scale about the top-left corner, on compositor properties only: fits every path, including UIKit's edge growth, at the cost of computing the transform for each frame.

Why this choice

A transform about the top-left corner fits every path; a computed origin (the menu's) fits only paths with a fixed point. Restarting an interrupted motion in the path's own law keeps the popover's edge growth, where a straight restart would bend it.

What changes

How to check it

  1. Open the rect morph's fixture page in Chromium: a 22 px square grows along a straight line with a fade, and a popover grows from its edge as UIKit's does.
  2. Dismiss it, then present it again 130 ms in: it turns around from where it is, without a jump.
  3. Run pnpm test:interaction rectMorph in Chromium and WebKit: the presentations do no layout or paint per frame.

The rect morph: a straight line with a fade, a popover's edge growth, and an interrupted dismissal

Evidence

Scope

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

@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 30, 2026 12:34am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 30, 2026, 12:52 AM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 24, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 24, 2026
@vjeux
vjeux force-pushed the uikit/c26-rect-morph branch from 2648906 to 3162635 Compare October 25, 2026 00:00

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This pull request can't be approved yet: the experimental rect morph has no approved spec behind it, because it rests on draft spec:AST-094 (FR5 and FR6, with FR8 for Reduce Motion), which this branch also adds. An engineering owner needs to decide whether those requirements govern the morph, with FR8 first brought in line with design:reduced-motion DR2's 200 ms opacity-only cross-fade, and record it by commenting /approve-spec <full head SHA>; the author is an engineering owner and may do so. Separately, the diff against main carries the whole predecessor stack (193 files, about 31,000 changed lines), so once #8076 and its predecessors land, please rebase so this pull request holds only its own commit, and split or justify that commit's 2,045 lines.

  • spec:AST-094 FR4 and DEC-1 say touch motion is not themable, while the stack's defineTheme({motion}) makes it themable; one of them needs to change.
  • The note in rectMorph.ts that a present fades in and a dismissal fades out under Reduce Motion holds only for paths with an opacity; document crossfadeAs for opacity-less entrances and exits and add a test for one.

[Automated review]

Comment on lines +102 to +115
- **FR8 — Reduce Motion substitutes, never jumps.** Under
`prefers-reduced-motion: reduce`, a touch presentation MUST behave as its
UIKit counterpart does with Reduce Motion and Prefer Cross-Fade Transitions
on: a transition that travels becomes a cross-fade carrying the same change
of state. An entrance lands in place and fades in, an exit fades out in
place, and any other move fades through. A navigation push or pop
cross-fades over 0.5 s on the ease-in-out curve; a sheet, a full-screen
modal or an alert fades on its own presentation spring and drops its travel
and scale; menus open and close on UIKit's Reduce Motion spring. Motion that
follows a finger, such as a throw, MUST keep its motion. **Proposed; pending
owner review:** this is the minimally moving form the draft `design:motion`
DR5 asks for, for touch presentations (owners: ernestt, cixzhang); the
alternative is UIKit's Reduce Motion alone, which keeps the slides of
navigation, sheets and modals.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FR8 contradicts current design:reduced-motion DR2, which says each Reduce Motion transition "MUST change opacity only and MUST finish in 200 ms or less" (and DR1 forbids springing content). The 0.5 s navigation cross-fade and the spring-timed sheet and menu fades exceed it, and the animator in this branch already follows DR2 with a 200 ms fade. Suggest having FR8 defer to design:reduced-motion DR1-DR3 for touch presentations.

Comment on lines +73 to +80
- **FR4 — Physics are not themable in touch presentations.** A touch
presentation MUST read its motion from the table on every theme. Themes keep
color, shape, type and spacing; the theme's duration and easing tokens keep
governing pointer presentations. **Proposed; pending owner review:** this
narrows `architecture:theme-tokens` (owners: cixzhang, imdreamrunner) to
pointer presentations, and departs from the draft `design:motion` DR3
(owners: ernestt, cixzhang) wherever UIKit settles with an overshoot or
stretches with a rubber band.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FR4 (and DEC-1) say touch motion reads the table on every theme, but this branch also adds defineTheme({motion}) so themes can retune touch springs, durations and curves, and the animator plays the theme's value for any table spring. One of the two needs to change.

Comment on lines +42 to +45
* Reduced Motion is the animator's (design:reduced-motion): on a coarse
* pointer a present lands at rest and fades in, a dismissal fades out where
* it stands, opacity only, in 200 ms; on any other pointer the change
* completes at once.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This holds only for a path with an opacityAt. Without one (and without crossfadeAs), present first writes the source rect at full opacity and the animator then dips: fade out, land, fade back in (animator.ts:1591-1601). Suggest saying here and on RectMorphPlayOptions.crossfadeAs that an entrance or exit along an opacity-less path passes crossfadeAs, and adding a Reduced Motion test with lerpPath(SQUARE, BOX).

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This pull request can't be approved yet: the experimental rect morph rests only on draft spec:AST-094 (FR5 and FR6, with FR8 for Reduce Motion), which this branch also adds, so an engineering owner needs to decide whether those requirements govern the morph, with FR8 first brought within design:reduced-motion DR2's 200 ms opacity-only cross-fade, and record it by commenting /approve-spec <full head SHA>; the author is an engineering owner and may do so. Separately, the diff against main carries the whole predecessor stack (197 files, about 32,000 changed lines), so once #8076 and its predecessors land, please rebase so this pull request holds only its own commit, and split or justify that commit's 2,047 lines. These also need fixing before the stack lands:

  • The adaptation platform condition adds a field that spec:AST-012 FR2's closed condition vocabulary does not allow.
  • @astryxdesign/core/motion/reducedMotion.stylex is published as an ordinary, non-experimental subpath under a [fix] changeset, and its comment cites an AST-094 OQ4 that the record does not have.
  • The adaptive presentation switch reads the default md breakpoint rather than the theme's, although its changeset says it follows the theme.
  • A theme's motion roles never reach createRectMorph, which plays the springs it is given, while spec:AST-094 FR4 says touch motion is not themable at all; one direction needs to win.
  • The rect morph's Reduce Motion note holds only for paths with an opacity; document crossfadeAs for opacity-less entrances and exits and test one.

[Automated review]

* is everything else. Pair `ios` with `pointer: 'coarse'` for a touch
* profile, such as touch motion tuned per platform.
*/
platform?: 'ios' | 'other';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

spec:AST-012 FR2 says a when object "may contain width, height, pointer, contrast, and motion" and that "Future environment fields require explicit additions to this closed vocabulary." This adds a sixth field without amending FR2, so it contradicts the current record. Suggest dropping platform from this stack, or landing an owner-approved FR2 amendment first.

Comment thread scripts/sync-exports.js Outdated
@@ -177,6 +190,13 @@ const STATIC_EXPORTS = {
types: './dist/utils/interactionOverlay.stylex.d.ts',
default: './dist/utils/interactionOverlay.stylex.js',
},
// Proposed; pending owner review (spec:AST-094 OQ4): the Reduce Motion

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

spec:AST-094 has only OQ1 and OQ2, so this owner question is not recorded anywhere. And because ./motion/reducedMotion.stylex is an ordinary subpath whose constants carry no @experimental, spec:AST-017 FR21 makes them stable API on release, under a [fix] changeset that never names the import path. Suggest moving them behind motion/experimental, or recording the question in AST-094 and shipping them with a changeset that names the subpath.

export const COMPACT_QUERY = DEFAULT_COMPACT_DEFINITION.query;

/** Both: presentations such as a sheet in place of a popover. */
export const COMPACT_TOUCH_QUERY =

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is the default definition (compactDefinition() with no theme points), so presentation="adaptive" switches at 768 px even when the theme overrides md. .changeset/touch-presentation.md says the components follow "the theme's md point", and spec:AST-012 FR9 says "below the effective md point", with "overridden md" a required verification state. Suggest building the query from the nearest theme's breakpoints and adding that test, or narrowing the changeset to the default.

Comment thread packages/core/src/motion/rectMorph.ts Outdated
play: RectMorphPlayOptions,
velocity: number,
) => {
const progress = progressCurve(spring, {velocity});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

progressCurve solves the spring as given (progress.ts:64) and the animator only applies a theme's role value to a spring it is handed (animator.ts:1529-1530), so a theme that retunes springs.menuOpen never reaches the morph. That matches draft AST-094 FR4 but not the stack's theme motion roles and astryx docs motion; once FR4 is settled, either resolve the spring here through resolveMotion(element, spring) or drop the roles.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 56.9KB 57.0KB +117B 12.4KB 12.4KB 0B
core/AppShell 57.9KB 58.0KB +90B 11.6KB 11.6KB 0B
core/AvatarGroupOverflow 39.9KB 40.0KB +125B 6.4KB 6.4KB 0B
core/Banner 47.8KB 47.9KB +123B 9.9KB 9.9KB 0B
core/BaseTypeahead 54.3KB 54.4KB +111B 9.9KB 9.9KB 0B
core/BreadcrumbItem 66.4KB 66.5KB +105B 11.0KB 11.0KB 0B
core/Button 43.3KB 43.4KB +102B 9.2KB 9.2KB 0B
core/Calendar 54.9KB 55.0KB +110B 10.0KB 10.0KB 0B
core/Carousel 50.2KB 50.3KB +82B 10.2KB 10.2KB 0B
core/ChatComposer 60.6KB 60.7KB +100B 10.8KB 10.8KB 0B
core/ChatComposerInput 55.7KB 55.8KB +99B 10.1KB 10.1KB 0B
core/ChatComposerTokenElement 55.7KB 55.8KB +100B 10.1KB 10.1KB 0B
core/ChatDictationButton 46.5KB 46.6KB +107B 9.5KB 9.5KB 0B
core/ChatLayout 48.8KB 48.9KB +104B 9.9KB 9.9KB 0B
core/ChatLayoutScrollButton 46.4KB 46.5KB +84B 9.6KB 9.6KB 0B
core/ChatSendButton 45.8KB 45.9KB +96B 9.2KB 9.2KB 0B
core/CheckboxInput 49.9KB 50.0KB +105B 9.3KB 9.3KB 0B
core/CheckboxListItem 54.0KB 54.1KB +92B 10.5KB 10.5KB 0B
core/ClickableCard 12.8KB 12.9KB +117B 6.9KB 6.9KB 0B
core/CodeBlock 60.5KB 60.6KB +106B 10.7KB 10.7KB 0B
core/Collapsible 11.7KB 11.8KB +113B 4.2KB 4.2KB 0B
core/CommandPalette 50.9KB 51.0KB +104B 11.8KB 11.8KB 0B
core/CommandPaletteItem 8.4KB 8.5KB +110B 3.5KB 3.5KB 0B
core/ComplexSelector 55.8KB 55.9KB +132B 10.6KB 10.6KB 0B
core/ContextMenu 77.7KB 77.8KB +87B 14.6KB 14.6KB 0B
core/ContextMenuItem 16.6KB 16.7KB +117B 5.2KB 5.2KB 0B
core/DateInput 99.9KB 100.0KB +88B 14.8KB 14.8KB 0B
core/DateRangeInput 69.4KB 69.5KB +103B 11.2KB 11.2KB 0B
core/DateTimeInput 110.1KB 110.2KB +77B 15.2KB 15.2KB 0B
core/DialogHeader 48.8KB 48.9KB +101B 9.8KB 9.8KB 0B
core/DrawerHeader 48.9KB 49.0KB +97B 11.2KB 11.2KB 0B
core/DropdownMenu 72.7KB 72.8KB +106B 14.7KB 14.7KB 0B
core/DropdownMenuCheckboxItem 16.1KB 16.2KB +106B 5.6KB 5.6KB 0B
core/DropdownMenuItem 15.4KB 15.5KB +101B 5.2KB 5.2KB 0B
core/DropdownMenuRadioItem 16.2KB 16.3KB +110B 5.6KB 5.6KB 0B
core/DropdownMenuSubMenu 58.1KB 58.2KB +95B 9.5KB 9.5KB 0B
core/FileInput 54.1KB 54.2KB +102B 10.3KB 10.3KB 0B
core/IconButton 43.3KB 43.4KB +113B 9.2KB 9.2KB 0B
core/Item 11.4KB 11.5KB +98B 4.7KB 4.7KB 0B
core/LayerProvider 63.3KB 63.4KB +121B 10.1KB 10.1KB 0B
core/Lightbox 51.2KB 51.3KB +95B 9.8KB 9.8KB 0B
core/Link 43.5KB 43.6KB +112B 7.6KB 7.6KB 0B
core/ListItem 53.5KB 53.6KB +103B 10.5KB 10.5KB 0B
core/Markdown 144.5KB 144.5KB +79B 17.4KB 17.4KB 0B
core/MobileNav 51.0KB 51.1KB +97B 10.1KB 10.1KB 0B
core/MobileNavToggle 46.2KB 46.3KB +104B 9.4KB 9.4KB 0B
core/MoreMenu 72.9KB 73.0KB +103B 14.7KB 14.7KB 0B
core/MultiSelector 76.2KB 76.3KB +110B 14.6KB 14.6KB 0B
core/NumberInput 55.7KB 55.8KB +108B 10.7KB 10.7KB 0B
core/Outline 28.6KB 28.7KB +113B 4.0KB 4.0KB 0B
core/Pagination 87.7KB 87.8KB +105B 15.3KB 15.3KB 0B
core/Popover 49.8KB 49.9KB +84B 12.1KB 12.1KB 0B
core/PowerSearch 155.1KB 155.1KB +87B 18.6KB 18.6KB 0B
core/RadioListItem 52.1KB 52.3KB +111B 9.7KB 9.7KB 0B
core/SegmentedControlItem 8.6KB 8.7KB +116B 3.9KB 3.9KB 0B
core/SelectableCard 12.8KB 12.9KB +114B 7.1KB 7.1KB 0B
core/Selector 79.1KB 79.2KB +81B 15.0KB 15.0KB 0B
core/SelectorOption 14.5KB 14.6KB +97B 5.1KB 5.1KB 0B
core/SideNav 58.0KB 58.1KB +97B 10.6KB 10.6KB 0B
core/SideNavCollapseButton 46.6KB 46.7KB +90B 9.5KB 9.5KB 0B
core/SideNavHeading 54.7KB 54.8KB +96B 10.1KB 10.1KB 0B
core/SideNavItem 54.5KB 54.6KB +97B 10.1KB 10.1KB 0B
core/Step 32.4KB 32.5KB +118B 5.3KB 5.3KB 0B
core/Stepper 47.4KB 47.5KB +106B 9.6KB 9.6KB 0B
core/Switch 48.4KB 48.5KB +111B 9.3KB 9.3KB 0B
core/Tab 9.7KB 9.8KB +119B 4.1KB 4.1KB 0B
core/TabMenu 51.6KB 51.7KB +83B 10.0KB 10.0KB 0B
core/Table 84.0KB 84.0KB +71B 15.1KB 15.1KB 0B
core/TableCell 78.8KB 78.9KB +89B 14.8KB 14.8KB 0B
core/TableHeaderCell 78.6KB 78.7KB +92B 14.8KB 14.8KB 0B
core/TableSelectionToolbar 52.4KB 52.5KB +98B 11.2KB 11.2KB 0B
core/TextInput 53.5KB 53.6KB +100B 10.5KB 10.5KB 0B
core/Thumbnail 50.7KB 50.8KB +103B 11.0KB 11.0KB 0B
core/TimeInput 86.8KB 86.9KB +83B 13.8KB 13.8KB 0B
core/Timestamp 27.5KB 27.5KB 0B 9.5KB 9.5KB 0B
core/Toast 59.8KB 59.9KB +105B 9.7KB 9.7KB 0B
core/ToggleButton 44.1KB 44.2KB +91B 9.3KB 9.3KB 0B
core/Token 29.6KB 29.7KB +111B 4.5KB 4.5KB 0B
core/Tokenizer 64.8KB 64.9KB +114B 11.7KB 11.7KB 0B
core/TopNav 51.9KB 52.0KB +104B 10.4KB 10.4KB 0B
core/TopNavHeading 54.2KB 54.3KB +101B 9.9KB 9.9KB 0B
core/TopNavItem 9.0KB 9.2KB +116B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 54.2KB 54.3KB +121B 10.8KB 10.8KB 0B
core/TopNavMegaMenuItem 9.1KB 9.2KB +119B 4.1KB 4.1KB 0B
core/TopNavMenu 53.6KB 53.7KB +97B 10.1KB 10.1KB 0B
core/TreeList 32.5KB 32.6KB +111B 4.7KB 4.7KB 0B
core/Typeahead 61.5KB 61.6KB +101B 11.3KB 11.3KB 0B

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

Bundle Size Summary

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

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

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

55 of 502 shot(s) changed.

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

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

and 35 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Changes are needed before this can be approved: the diff against main still carries the whole predecessor stack (186 files, about 31,000 authored lines), so once #8076 and its predecessors land, please rebase so this pull request holds only its own commit, and split or justify that commit's 2,019 lines. With the morph now internal it needs no new spec decision, but two fixes remain in it:

  • createRectMorph turns its spring into a finished curve with progressCurve, so a theme's motion role such as springs.menuOpen never reaches it, although the motion README says table springs take the theme's value; resolve the spring with resolveMotion (or document that it plays as given) and add a test.
  • The Reduce Motion note in rectMorph.ts holds only for paths with an opacity, since an opacity-less present first shows the source rect and then dips, so document crossfadeAs for such entrances and exits and test one.

[Automated review]

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
Popover's grow out of its trigger and shrink back into it now run on the
motion foundation's rect morph (meta#8329). The popover's path is an edge grow
(edgeGrowPath) from the point where it meets its source, with the collapsed
scale and length from motion/uikit/popover.ts, on UIKit's present and
dismiss springs. The morph plays it as translate and scale about the box's
corner and presents the same rects as before (the unit tests compare the
visual rect at each time with the previous model), interrupts from the rect
on screen with its velocity, and retires its inline state once it settles.
The dismissal still plays on the layer runtime's exit copy, and the hold
during the presentation is unchanged.

The layer runtime's keyboard cap reads the layer's offset box, which the
morph's translate and scale do not move, so it needs no change.

No change in behavior.
vjeux added 15 commits October 29, 2026 10:13
…nt lets go

The host's touch-action rules sit in an adopted sheet or a style element
per document or shadow root, and were never removed, so a page whose
last recognizer detached kept them, against spec:AST-094 FR24 (nothing
touch-related remains after the last instance unmounts). Fails until a
root's rules go with its last marked element.
…th its last marked element

The touch-action writer records which elements it marked in each
document or shadow root, and when the last one is unmarked (its last
recognizer detached) it removes that root's adopted sheet or style
element, so nothing touch-related remains after the last instance
unmounts (spec:AST-094 FR24). A later mark writes the rules again; an
element marked in another root first lets go of the old one.
… the inline style it reads

- The motion registry, the host's engine gate and the README name the
  presented hit test as an engine workaround (spec:AST-013 FR6) with its
  review condition (re-measure on each iOS release; remove it once iOS
  WebKit hit-tests a compositor-moved element where it is drawn) and its
  regression fixture.
- While a curve runs the animator holds the value it starts from inline,
  so presentation.ts and the README no longer say the inline style holds
  the end.
…core/internal/touch

Core ships the internal entry @astryxdesign/core/internal/touch, which
re-exports the gesture primitives for Astryx's own packages, and the
Lab-import guard fails a Lab import of core outside core's exports
(architecture:react-component-runtime INV13). The README and the barrel's
header named internal workspace imports and said nothing here is
exported; they now name that entry.
…ill needs the element, and the listeners that cancel

The release note, the stream's header, the host's comment and the README
said the stream is one passive listener per event type and that a
document-capture stopPropagation no longer starves the recognizers. Such a
stop never hid a listener on the same node, and some subscriptions cancel.
They now say what changed: an app's window-capture stopPropagation, or a
document-capture stopImmediatePropagation registered before core, no
longer hides a touch; a recognizer that must claim still needs the touch to
reach its element; the gesture host's touchend, click and contextmenu
cancel while a claimer is attached and the page hold's touchmove while it
holds; and the stream stays ahead of an app's window-capture listener only
until a type's listener is re-added. The README's list of blocking
touchmove listeners gains the claimed touch's target and the document
while a claiming element moves.
…default it moves

The {stylexOptions} form of astryxStylex now passes StyleX
treeshakeCompensation: true unless the caller sets it. spec:AST-017 FR3
asks the release note to name the old and new default and the option
that restores the old one; it now does.
…er and for the two stops the input stream fixes

- A still finger with sub-pixel jitter over a scroll view keeps its tap
  and scrolls nothing (spec:AST-094 FR18–FR22).
- A tap is still recognized under an app's window-capture
  stopPropagation, and under a document-capture
  stopImmediatePropagation registered before core's: the recognizers hear
  touches on the window's capture phase.
Chromium and WebKit pass.
…s once

Where nothing that claims is attached, the host's touchend listener is
passive and cannot cancel the engine's own click after a retargeted tap
clicks what is drawn. The shared click guard swallows that late click
whatever is attached; this case pins it, as asked on meta#8293.
Takes meta#8360's head, which removes a document's or shadow root's
touch-action rules with its last marked element and names the build
changeset's treeshakeCompensation default, in place of 1e1431f.
…esture host's subscriptions

The gesture host subscribes no click: the one cancelling click subscriber
is the click guard's, added at a window's first arm and kept. The release
note, the stream's header and the gestures README listed click with the
host's touchend and contextmenu; they now name the guard's own.
Folds this pull request onto the canonical gesture foundation, meta#8360's
head, which carries meta#8076, and onto main, in place of the old meta#8076 and
harness copies it carried. The one conflict is the motion README's Files
table: meta#8360's table, with this pull request's progress.ts row added
after presentation.ts.
Folds this pull request onto meta#8340's head (the animator's presentation
start, on meta#8360 and main) and meta#8497's new head (the progress module, on
meta#8360 and main), in place of the old copies of meta#8340, meta#8497, meta#8076 and the
harness it carried. No conflicts.
…task ended at once, however late the first read

WebKit under load from other tasks: the call's task ends at once, another
task holds the main thread, and the browser commits the animation after
it, dated at the call. Nothing in the call's task delayed it, but the
first read still moved its start to the read, about 95 ms late on a
loaded box, so whatever chains on its end (the second half of a Reduce
Motion cross-fade, a cancel fading on the previous fade's end) ran that
much late and the cross-fade missed design:reduced-motion DR2's 200 ms.
Fails now: the start moves to 1100.
e7b0676 moved a call's start from rest to its first read whenever
WebKit had dated it more than two frames before that read. Under load
from other tasks the first read comes late with nothing in the call's
task delaying it, so the start moved about 95 ms on a loaded box, and
whatever chained on the call's end ran that late: the second half of a
Reduce Motion cross-fade, so SearchField's cancel missed DR2's 200 ms.
The call's task now records when it ended, at its first microtask (or a
read in those microtasks is that time), and only a call whose own task
ran past the call by more than two frames, the block e7b0676 fixed,
moves its start; a read other tasks delay keeps the browser's start.
…s its start past the block

Core Animation dates an animation at the commit, when the calling task
ends, however short the block before it. A 20 ms block in the call's task,
with WebKit's start dated at the call, left the start at the call: the
two-frame bound skipped it. Fails now.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Requesting changes: the rect morph itself rests on current specs (architecture:layer-runtime INV15 and spec:AST-094 FR5, FR6, FR8 and FR31), but this branch still carries #8076, #8360, #8340 and #8497, so the diff is 29,966 authored lines while the morph alone is 2,121. Please land those first, rebase so only the morph remains, and bring it under 2,000 lines (for example, the path laws with their geometry tests first) or give concrete evidence that it cannot be split. Separately, architecture:react-component-runtime INV12 has the size-change glide play through this morph once Core has it, while packages/core/src/motion/animatedLayout.ts keeps its own translate, so please land #8721 together with this pull request or have an engineering owner amend INV12 first. The carried gesture host also installs nothing under a fine pointer, which current spec:AST-094 FR19 and FR43 no longer allow; that belongs to #8076's review.

[Automated review]

vjeux added 7 commits October 29, 2026 14:29
… task, with no threshold

Core Animation dates an animation at the commit, when the calling task
ends, whatever the block's length. The call's task already records when
it ended, at its first microtask, so a start the browser dated before that
(WebKit's last frame time before the task) now moves to it: a task that
ended at once leaves the start at the call, a blocked one moves it past
the block, however short, and a read other tasks delay changes nothing.
The two-frame bound, which told a read's own frame from a block before the
task's end was known, goes, and the start no longer moves to the read.
The base the rect morph stacks on: the animator and the progress module,
merged with no conflict.
…shows at each progress

Menus, Popover, the lifted preview, Lightbox's zoom and a sub-menu's
parent card grow a surface out of what the finger touched and shrink it
back, and each needs the same geometry. morphPath.ts names it: lerpPath,
a straight line between two rects with an optional companion opacity;
edgeGrowPath, UIKit's popover growth out of a point on its edge (iOS
26.2); each path's restartFrom, how an interrupted motion continues in
its own law; and morphCurves, the translate, scale and opacity curves
that put an element laid out in the path's box on its rect. travelAt is
exported for the rect morph's player. Internal to core; the tests check
both laws, their restarts and the curves at every 1/120 s, and that each
presentation's model is the same rect at every progress within 0.5 px.
Takes the path laws' own pull request, which carries meta#8340 fc42d64 and
meta#8497 c9ca01e. The motion README keeps both new rows, the paths' and
the morph's, in that order.

# Conflicts:
#	packages/core/src/motion/README.md
… keeps only its player

The paths (lerpPath, edgeGrowPath, morphCurves and their geometry) now
live in morphPath.ts, their own pull request, which this one merges. The
morph imports them and re-exports them where its callers import them, so
no caller changes; its file keeps createRectMorph, present and dismiss,
and its tests keep the player's cases (the popover's model stays for the
present that turns around on its edge growth). The README row and the
changeset say what is left.
…the clock's own resolution

'a dismissal mid-present starts from the box: reads either side of the
switch' read the box and switched in a timer task, with the morph on the
timeline's clock. In a timer task WebKit can hand out a timeline time a
frame stale (11-15 ms on a loaded box) while it samples the running box
fresher, so the morph's start sat behind what was on screen: steps of
1.9-4.5 px against the 0.5 px bound (4 in 48 runs). The reads and the
switch now run inside a frame callback, where the timeline's time is the
frame's. What is left is the clock's resolution: WebKit counts it in whole
milliseconds and samples the box between them, up to 0.54 px at this
point of the travel. The bound adds the box's travel in one tick of that
clock, measured over the frame before the switch, to the subpixel; the
restart the proof has teeth against still steps tens of px. 40 of 40 in
WebKit at load 95, 10 of 10 in Chromium.
…sent's first frame on the path

'on screen, the box keeps moving through the switch without a jump'
failed 2 to 5 in 32 in WebKit on a loaded box with a 235-238 px worst step,
always between the first two tracked frames: the screencast opened on the
last frame composited before the present's first, the box at rest, then
showed the present at its start 240 px below. That step onto the path is
not the switch, as the proof's notes already say. The proof now tracks
from the first frame off the rest position, where the present starts. On
both the published head and this one the same frame showed up, so it is
the screencast's, not the morph's. 64 of 64 in WebKit at load 88, with
the container's process cap lifted (its hang is the harness's).
vjeux added 3 commits October 29, 2026 17:24
…this head

The headers of morphPath.ts and its test named rectMorph.ts and
rectMorph.test.ts, which arrive with the pull request stacked on this
one, and cited 'law M1', which no document defines. They now describe the
player without naming its file and cite spec:AST-094 FR5, which keeps
touch motion to translate, scale and opacity on the compositor.
Takes meta#8909's header fix: the paths' headers name nothing missing at that
head and cite spec:AST-094 FR5.
The header cited 'law M1' and 'laws M2, M3', which no document defines.
It now cites spec:AST-094 FR5 for compositor-only motion and FR6 for an
interruption that starts from the presented rect with its velocity, and
its paragraph wraps within the line width.
@vjeux

vjeux commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This can't be approved yet: the rect morph's player itself rests on current specs (architecture:layer-runtime INV15 and spec:AST-094 FR4–FR6, FR8 and FR31), but landing it while the size-change glide keeps its own translate contradicts architecture:react-component-runtime INV12, and the proposal on #8721 is to drop that clause rather than move the glide. An engineering owner needs to settle whether INV12's rect-morph clause stands, so the glide's move lands with this pull request, or is amended on main first, and record that decision on this pull request by commenting /approve-spec <full head SHA>; as an engineering owner, you may record it yourself. Independently, the branch still carries #8909, #8340, #8497, #8360 and #8076 (30,188 authored lines against the player's 1,597), including a copy of #8360 without its latest dip-landing fix, so please land those first and rebase so only the player remains.

[Automated review]

This branch was successfully deployed

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants