Skip to content

perf(core): the reduced-motion queries and the wheel's scroll reading leave the touch runtime's modules - #11530

Draft
cixzhang wants to merge 9 commits into
perf/defer-touch-hooks-barrelfrom
perf/defer-touch-wheel-helpers
Draft

cixzhang wants to merge 9 commits into
perf/defer-touch-hooks-barrelfrom
perf/defer-touch-wheel-helpers

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

Performance, stacked on #11525: two small helpers leave the touch runtime's modules so that the code that reads them stops reaching the runtime. defaultPrefersReducedMotion and defaultIsCoarsePointer move from motion/animator to motion/motionQueries.ts, and scrollTypeOf moves from gestures/GestureHost to gestures/scrollType.ts. Both are re-exported where they were. It's module moves only, with no behavior change.

User or maintainer impact

  • Nothing changes in behavior.
  • Maintainers: the reduced-motion policy (motion/reducedMotion), the date picker's month scroller and the wheels' frame (DateInput/Wheel) no longer reach the animator statically. PickerWheel no longer reaches the gesture host for its mouse-wheel reading. What remains of the wheels' first-load cost is their drag (PickerWheel through useGestureRecognizer) and their spin (wheelStrip through the animator), which the next PR moves behind the loader with its own before-load behavior.

Problem and solution fit

  • motion/reducedMotion.ts imported only the two media-query readers from the animator; PickerWheel.tsx imported only scrollTypeOf from the gesture host. Each is a pure function with no motion or gesture state.
  • The new modules hold just those functions, and the old modules import and re-export them, so every existing caller is unchanged.

Authority

architecture:react-component-runtime INV13: it names the two modules beside the loader's other why-lines, and the gap line drops motion/reducedMotion. The touch-runtime allowlist drops the four entries these moves remove (five left).

Change and evidence

  • motion/motionQueries.ts and gestures/scrollType.ts (new), motion/animator.ts, gestures/GestureHost.ts, motion/reducedMotion.ts, DateInput/PickerWheel.tsx, the allowlist, scripts/snap-paging-bundle.test.mjs (motionQueries counts as pager code), and INV13.

Bundle comparison (base #11525 head a7c33f6 → head 2c0be41)

pnpm size:pages --base a7c33f6d --head 2c0be417 --page dates=DateInput,TimeInput,DateTimeInput, first-load JavaScript, minified / gzip bytes:

Page (components) Base Head Change
docs (Text, Heading, Link, Card, Divider, List) 228,568 / 74,906 228,568 / 74,906 +0 / +0
form (Button, IconButton, TextInput, CheckboxInput, Text, Heading, Card) 238,851 / 78,035 238,851 / 78,035 +0 / +0
menu (DropdownMenu, ContextMenu, Button, Text) 377,005 / 127,960 377,005 / 127,960 +0 / +0
table (Table, Text, Button) 404,627 / 138,645 404,627 / 138,645 +0 / +0
dates (DateInput, TimeInput, DateTimeInput) 688,552 / 225,716 688,552 / 225,719 +0 / +3

The minified bytes are the same on every page. Moving the reduced-motion queries and the wheel's scroll reading into their own modules adds no first-load code; gzip changes by 3 bytes on the dates page from module order. This comparison covers first-load code; the touch runtime that loads later is not measured here.

Scope

Components: none directly (motion and gesture helpers; DateInput's PickerWheel import)

  • This PR has one primary intent.
  • Independently removable deltas were removed or split (the wheels' drag and spin are the next PR).
  • Public text and artifacts contain no internal Meta context.

Testing

Writing rubric results

  • R1 present tense: pass.
  • R2–R7: none in the record.

Owner and land path

Owner: the Astryx fix loop, lane 3. Lands after #8690 merges, in stack order (#11450, #11463, #11466, #11476, #11478, #11508, #11518, #11525, #11530, #11536, #11540, #11544), each after Specs, CodeBunny at its head and green CI; the drain merges.

… leave the touch runtime's modules

defaultPrefersReducedMotion and defaultIsCoarsePointer move from the animator to motion/motionQueries.ts, and scrollTypeOf moves from the gesture host to gestures/scrollType.ts; both are re-exported where they were. So the reduced-motion policy, MonthScroller and Wheel no longer reach the animator, and PickerWheel no longer reaches the gesture host for its wheel reading. The allowlist drops four entries; INV13 names the two modules and its gap line keeps PickerWheel's drag and wheelStrip's spin.
@vercel

vercel Bot commented Nov 13, 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 14, 2026 8:10pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟡 Reviewed (for maintainers only) Nov 14, 2026, 8:27 PM UTC

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

Copy link
Copy Markdown
Contributor Author

/approve-spec 779dd57

@cixzhang

Copy link
Copy Markdown
Contributor Author

Decision: D-20261113-282

Records the owner's answer that the touch runtime loads once per page after first paint, never on demand, at 779dd57. Two small query helpers move into their own modules, named with their reason in react-component-runtime INV13, so the date and time wheels' reduced-motion and scroll reads no longer load the runtime; nothing a person sees changes. It waives nothing.

@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 description fix. The helper moves themselves are fine: the bodies are identical, the old modules still re-export them, and INV13 as edited here is owner-approved for this head.

Blocking:

  • The description and commit message say DateInput/Wheel no longer reaches the animator statically, but Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19 still imports it, so please reword it to say that only Wheel's reduced-motion import stopped reaching the animator.

Optional: motion/motionQueries.ts could delegate to isCoarsePointer and matchesMediaQuery in utils/coarsePointer.ts instead of keeping its own copies, and the gesture host's scrollTypeOf re-export no longer has an importer.

Claims and files checked

Claims:

  • The title's claim that the reduced-motion queries and the wheel's scroll reading leave the touch runtime's modules: verified (motionQueries.ts:21-36, scrollType.ts:28).
  • The two media-query readers move from the animator to a new module, and the scroll classifier moves from the gesture host to a new module: verified (bodies identical to the base).
  • Both are re-exported where they were, so existing callers are unchanged: verified (animator.ts:209-214, GestureHost.ts:181-183).
  • Module moves only, no behavior change: verified (identical bodies; 3,234 DateInput, TimeInput, DateTimeInput, gesture and motion tests pass).
  • The reduced-motion policy and the month scroller no longer reach the animator statically: verified (touch-runtime rule test and an import-graph walk).
  • The wheels' frame (DateInput/Wheel) no longer reaches the animator statically: false (Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19).
  • PickerWheel no longer reaches the gesture host for its mouse-wheel reading: verified (PickerWheel.tsx:29; scrollType.ts imports only a type).
  • What remains of the wheels' first-load cost is PickerWheel's drag and wheelStrip's spin: verified (the two remaining DateInput allowlist entries; PickerWheel.tsx:32, wheelStrip.ts:19).
  • The reduced-motion policy imported only the two readers from the animator, and PickerWheel only the classifier from the gesture host: verified (base reducedMotion.ts:47, base PickerWheel.tsx:29).
  • Each moved helper is a pure function with no motion or gesture state: verified.
  • INV13 names the two modules and its gap line drops the reduced-motion policy: verified (react-component-runtime.md:366-370, :378-379).
  • The touch-runtime allowlist drops four entries and keeps five: verified.
  • The bundle test counts the new motion module as pager code: verified (snap-paging-bundle.test.mjs:36).
  • Red first, the rule's real-tree test fails on the base once the four entries are removed and passes here: verified (re-run on both trees).
  • The suites, the bundle and shared-identity script tests, eslint and check:knowledge pass: verified (re-run on the head).
  • The record is written in the present tense: verified.
  • No internal context in public text: verified.

Files:

  • docs/architecture/react-component-runtime.md: clear (owner-approved for this head).
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear.
  • packages/core/src/DateInput/PickerWheel.tsx: clear.
  • packages/core/src/gestures/GestureHost.ts: clear (optional: the re-export sits between imports and has no importer).
  • packages/core/src/gestures/scrollType.ts: clear.
  • packages/core/src/motion/animator.ts: clear.
  • packages/core/src/motion/motionQueries.ts: clear (optional: could delegate to utils/coarsePointer.ts).
  • packages/core/src/motion/reducedMotion.ts: clear.
  • scripts/snap-paging-bundle.test.mjs: clear.

Automated review (maintainer link)

Comment on lines +30 to +36
export function defaultIsCoarsePointer(): boolean {
return (
typeof window !== 'undefined' &&
typeof window.matchMedia === 'function' &&
window.matchMedia('(pointer: coarse)').matches
);
}

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: this is isCoarsePointer(window) from utils/coarsePointer.ts (same (pointer: coarse) query), and defaultPrefersReducedMotion above is matchesMediaQuery(window, '(prefers-reduced-motion: reduce)'). That module is already outside the touch runtime, so these two could call it and keep one implementation.

Comment on lines +181 to +183
import {scrollTypeOf} from './scrollType';

export {scrollTypeOf};

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: this re-export sits between two import blocks, and no module imports scrollTypeOf from the gesture host any more. Drop it, or move it below the imports.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec e8722d5

@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: two description fixes. The helper moves themselves are fine: the bodies are identical, the old modules still re-export them, the public API is unchanged, and the INV13 edit naming motion/motionQueries.ts and gestures/scrollType.ts is now owner-approved at this head.

Blocking:

  • The description (and the commit message) says DateInput/Wheel no longer reaches the animator statically, but Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19 still imports it, so please say that only Wheel's reduced-motion import stopped reaching the animator.
  • Regression: the Testing section says the touch-runtime rule's real-tree test passes here, but at this head it fails on three Swipe/useSwipeAction.ts imports that the base branch brings in, so either add Swipe to the rule's opt-in folders beside SnapPaging on the base branch or reword that line.

The two earlier non-blocking notes still apply: motionQueries.ts could call utils/coarsePointer.ts, and the scrollTypeOf re-export in GestureHost.ts has no importer and sits between two import blocks.

Claims and files checked
  • Claim: the two media-query readers and the wheel's scroll reading move to the two new modules and stay re-exported from the old ones. Verified (animator.ts:209-214, GestureHost.ts:181-183).
  • Claim: module moves only, with no behavior change. Verified (byte-identical bodies; the DateInput, TimeInput, DateTimeInput, gestures and motion suites pass, 3,342 tests at this head).
  • Claim: the reduced-motion policy and the month scroller no longer reach the animator. Verified.
  • Claim: the wheels' frame (DateInput/Wheel) no longer reaches the animator. False (Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19).
  • Claim: PickerWheel no longer reaches the gesture host for its wheel reading, and the wheels' drag and spin remain. Verified (PickerWheel.tsx:29, :32, wheelStrip.ts:19).
  • Claim: each moved helper is a pure function and was the only thing its reader took from the runtime module. Verified on the base.
  • Claim: the allowlist drops four entries (five left) and INV13 names both modules and drops the reduced-motion policy from its gap line. Verified.
  • Claim: the bundle test counts the new query module as pager code. Verified (the test passes).
  • Claim: the rule's real-tree test is red on the base without the four entries. Verified; that it passes here is false at this head (three Swipe imports).
  • Claim: the bundle and shared-identity script tests, eslint and the knowledge check pass. Verified.
  • Claim: no internal context, and present-tense record text. Verified.
  • File docs/architecture/react-component-runtime.md: clear (owner-approved at this head).
  • File internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear.
  • File packages/core/src/DateInput/PickerWheel.tsx: clear.
  • File packages/core/src/gestures/GestureHost.ts: non-blocking note.
  • File packages/core/src/gestures/scrollType.ts: clear.
  • File packages/core/src/motion/animator.ts: clear.
  • File packages/core/src/motion/motionQueries.ts: non-blocking note.
  • File packages/core/src/motion/reducedMotion.ts: clear.
  • File scripts/snap-paging-bundle.test.mjs: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 0fc9823

@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 description fix. The helper moves are sound: the three functions keep identical bodies and stay re-exported at their old paths, the touch-runtime rule test passes here and fails as intended without the move, and the INV13 edit has an engineering owner's approval for this head.

  • The description and commit message say the wheels' frame (DateInput/Wheel) no longer reaches the animator statically, but Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19 still imports it, so reword that sentence to say Wheel loses only its own path through reducedMotion.

The two earlier non-blocking notes still apply (the scrollTypeOf re-export placement in GestureHost.ts, and the readers repeating utils/coarsePointer.ts), and the Testing section's suite count is from an earlier head (3,342 tests run here).

Claims and files checked

Claims:

  • The two media-query readers move from the animator to a new motion module: verified (motionQueries.ts:21-36, animator.ts:209-214).
  • The wheel scroll classifier moves from the gesture host to a new gestures module: verified (scrollType.ts:28-66, GestureHost.ts:181-183).
  • Both stay re-exported at their old paths: verified.
  • Module moves only, with no behavior change: verified (identical function bodies; the date, time, gestures and motion suites pass).
  • The reduced-motion policy and the month scroller no longer reach the animator statically: verified.
  • The wheels' frame no longer reaches the animator statically: false (Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19).
  • PickerWheel no longer reaches the gesture host for its wheel reading: verified (PickerWheel.tsx:29).
  • What remains of the wheels' first-load cost is their drag and their spin: verified (the remaining allowlist entries).
  • On the base, the policy imported only the two readers from the animator, and PickerWheel only the classifier from the gesture host: verified.
  • The moved functions are pure, and the new modules hold just them: verified.
  • INV13 names both modules, and its gap line drops the policy module: verified (react-component-runtime.md:365-369, :377-378).
  • The allowlist drops four entries and keeps five: verified.
  • The bundle test counts the new motion module as pager code: verified (the test passes).
  • Red first: the rule's real-tree test fails on the lower pull request's head without the four entries and passes here: verified.
  • The DateInput, TimeInput, DateTimeInput, gestures and motion suites pass: verified (3,342 tests here; the description says 3,234).
  • The bundle and shared-identity script tests, eslint and the knowledge check pass: verified.
  • One primary intent, nothing separable left in, no internal context, present-tense record text: verified.
  • The land-order prerequisite has merged: verified. The next pull request's work is not checkable here.

Files:

  • docs/architecture/react-component-runtime.md: clear
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear
  • packages/core/src/DateInput/PickerWheel.tsx: clear
  • packages/core/src/gestures/GestureHost.ts: non-blocking (re-export placement)
  • packages/core/src/gestures/scrollType.ts: clear
  • packages/core/src/motion/animator.ts: clear
  • packages/core/src/motion/motionQueries.ts: non-blocking (repeats utils/coarsePointer.ts)
  • packages/core/src/motion/reducedMotion.ts: clear
  • 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.

Changes requested. The helper moves themselves are sound: the three functions keep identical bodies, stay re-exported at their old paths, and change no public API. This head only merges the base branch, so the earlier spec approval no longer counts, and the rule-test failure the base brought in is still there.

  • Regression: packages/core/src/gestures/scrollType.ts (imported by DateInput/PickerWheel.tsx) is again a new internal shared module that no current record names, because the base-branch merge made a new head and the engineering-owner approval of the INV13 edit that names it no longer counts; an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
  • The description and commit message say the wheels' frame (DateInput/Wheel) no longer reaches the animator statically, but Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19 still imports it, so reword that sentence to say Wheel loses only its own path through reducedMotion.
  • Regression: the Testing section says the touch-runtime rule's real-tree test passes here, but at this head (and on the base) it fails on AlertDialog/useAlertMotion.ts -> motion/animator.ts, which the base names in INV13's gap line without listing it in the allowlist, so reword that line or have the lower branch add the entry and merge it here.

The earlier non-blocking notes still apply (the scrollTypeOf re-export placement in GestureHost.ts, and the readers repeating utils/coarsePointer.ts), and the Testing section's suite count is out of date (3,344 tests run here).

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • The two media-query readers move from the animator to a new motion module: verified (motionQueries.ts:21-36, animator.ts:209-214).
  • The wheel scroll classifier moves from the gesture host to a new gestures module: verified (scrollType.ts:28-66, GestureHost.ts:181-183).
  • Both stay re-exported at their old paths: verified.
  • Module moves only, with no behavior change: verified (identical function bodies; the date, time, gestures and motion suites pass).
  • The reduced-motion policy and the month scroller no longer reach the animator statically: verified (the rule's import walk).
  • The wheels' frame no longer reaches the animator statically: false (Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19).
  • PickerWheel no longer reaches the gesture host for its wheel reading: verified (PickerWheel.tsx:29).
  • What remains of the wheels' first-load cost is their drag and their spin: verified (the remaining allowlist entries).
  • On the base, the policy imported only the two readers from the animator, and PickerWheel only the classifier from the gesture host: verified.
  • The moved functions are pure, and the new modules hold just them: verified.
  • INV13 names both modules, and its gap line drops the policy module: verified (react-component-runtime.md:365-369, :377-378); its owner approval for this head: missing.
  • The allowlist drops four entries and keeps five: verified.
  • The bundle test counts the new motion module as pager code: verified (the test passes).
  • Red first, the rule's real-tree test fails on the lower pull request's head without the four entries: verified.
  • The touch-runtime rule's real-tree test passes here: false (no-static-touch-runtime.test.mjs:180 lists AlertDialog/useAlertMotion.ts -> motion/animator.ts).
  • The DateInput, TimeInput, DateTimeInput, gestures and motion suites pass: verified (3,344 tests here; the description says 3,234).
  • The bundle and shared-identity script tests, eslint and the knowledge check pass: verified.
  • One primary intent, nothing separable left in, no internal context, present-tense record text: verified.
  • The land-order prerequisite has merged: verified.

Files:

  • docs/architecture/react-component-runtime.md: needs engineering-owner re-approval at this head
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear
  • packages/core/src/DateInput/PickerWheel.tsx: clear
  • packages/core/src/gestures/GestureHost.ts: non-blocking (re-export placement)
  • packages/core/src/gestures/scrollType.ts: blocking (no current record)
  • packages/core/src/motion/animator.ts: clear
  • packages/core/src/motion/motionQueries.ts: non-blocking (repeats utils/coarsePointer.ts)
  • packages/core/src/motion/reducedMotion.ts: clear
  • 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.

Changes requested. The helper moves themselves are sound: the three functions keep identical bodies, stay re-exported at their old paths, and change no public API. This head only merges the base branch again, which makes the touch-runtime rule test pass but leaves the spec approval behind and one count in the description out of date.

  • Regression: packages/core/src/gestures/scrollType.ts (imported by DateInput/PickerWheel.tsx) is a new internal shared module that no current record names, because the engineering-owner approval of the INV13 edit that names it does not carry to a new head; an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
  • The description and commit message say the wheels' frame (DateInput/Wheel) no longer reaches the animator statically, but Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19 still imports it, so reword that sentence to say Wheel loses only its own path through reducedMotion.
  • Regression: the Authority section says five allowlist entries remain, but six remain at this head because the base-branch merge added AlertDialog's entry, so say six or drop the count.

The earlier non-blocking notes still apply (the scrollTypeOf re-export placement in GestureHost.ts, and the readers repeating utils/coarsePointer.ts), and the Testing section's suite count is out of date (3,344 tests run here).

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • The two media-query readers move from the animator to a new motion module: verified (motionQueries.ts:21-36, animator.ts:209-214).
  • The wheel scroll classifier moves from the gesture host to a new gestures module: verified (scrollType.ts:28-66, GestureHost.ts:181-183).
  • Both stay re-exported at their old paths: verified.
  • Module moves only, with no behavior change: verified (identical function bodies; the date, time, gestures and motion suites pass).
  • The reduced-motion policy and the month scroller no longer reach the animator statically: verified (static import walk).
  • The wheels' frame no longer reaches the animator statically: false (Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19).
  • PickerWheel no longer reaches the gesture host for its wheel reading: verified (PickerWheel.tsx:29).
  • What remains of the wheels' first-load cost is their drag and their spin: verified (the remaining allowlist entries for useGestureRecognizer and wheelStrip).
  • On the base, the policy imported only the two readers from the animator, and PickerWheel only the classifier from the gesture host: verified.
  • The moved functions are pure, and the new modules hold just them: verified.
  • INV13 names both modules, and its gap line drops the policy module: verified (react-component-runtime.md:365-369, :377-378); its owner approval for this head: missing.
  • The allowlist drops four entries: verified.
  • Five allowlist entries remain: false (six remain; no-static-touch-runtime.allowlist.json:24-27 came from the base branch).
  • The bundle test counts the new motion module as pager code: verified (the test passes).
  • Red first, the rule's real-tree test fails on the lower pull request's head without the four entries: verified (it fails on exactly those four).
  • The rule's real-tree test passes here: verified (10 of 10).
  • The DateInput, TimeInput, DateTimeInput, gestures and motion suites pass: verified (3,344 tests here; the description says 3,234).
  • The bundle and shared-identity script tests, eslint and the knowledge check pass: verified.
  • One primary intent, nothing separable left in, no internal context, present-tense record text: verified.
  • The land-order prerequisite has merged: verified.

Files:

  • docs/architecture/react-component-runtime.md: needs engineering-owner re-approval at this head
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear
  • packages/core/src/DateInput/PickerWheel.tsx: clear
  • packages/core/src/gestures/GestureHost.ts: non-blocking (re-export placement)
  • packages/core/src/gestures/scrollType.ts: blocking (no current record)
  • packages/core/src/motion/animator.ts: clear
  • packages/core/src/motion/motionQueries.ts: non-blocking (repeats utils/coarsePointer.ts)
  • packages/core/src/motion/reducedMotion.ts: clear
  • 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.

Changes requested: two description fixes. The helper moves are sound: the three functions keep identical bodies, stay re-exported at their old paths, and change no public API. The engineering-owner approval for this head settles the INV13 edit, so gestures/scrollType.ts now has the record it needs.

  • The description and commit message say the wheels' frame (DateInput/Wheel) no longer reaches the animator statically, but Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19 still imports it, so reword that sentence to say Wheel loses only its own path through reducedMotion.
  • Regression: the Authority section says five allowlist entries remain, but six remain at this head because the base-branch merge added AlertDialog's entry, so say six or drop the count.

The earlier non-blocking notes still apply (the scrollTypeOf re-export placement in GestureHost.ts, and the readers repeating utils/coarsePointer.ts), and the Testing section's suite count is out of date (3,344 tests run here).

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • The two media-query readers move from the animator to a new motion module: verified (motionQueries.ts:21-36, animator.ts:209-214).
  • The wheel scroll classifier moves from the gesture host to a new gestures module: verified (scrollType.ts:28-66, GestureHost.ts:181-183).
  • Both stay re-exported at their old paths: verified.
  • Module moves only, with no behavior change: verified (identical function bodies; the date, time, gestures and motion suites pass).
  • The reduced-motion policy and the month scroller no longer reach the animator statically: verified (static import walk).
  • The wheels' frame no longer reaches the animator statically: false (Wheel.tsx:54 → PickerWheel.tsx:52 → wheelStrip.ts:19).
  • PickerWheel no longer reaches the gesture host for its wheel reading: verified (PickerWheel.tsx:29).
  • What remains of the wheels' first-load cost is their drag and their spin: verified (the remaining allowlist entries for useGestureRecognizer and wheelStrip).
  • On the base, the policy imported only the two readers from the animator, and PickerWheel only the classifier from the gesture host: verified.
  • The moved functions are pure, and the new modules hold just them: verified.
  • INV13 names both modules, and its gap line drops the policy module: verified (react-component-runtime.md:365-369, :377-379); approved by an engineering owner for this head.
  • The allowlist drops four entries: verified.
  • Five allowlist entries remain: false (six remain; no-static-touch-runtime.allowlist.json:24-27 came from the base branch).
  • The bundle test counts the new motion module as pager code: verified (the test passes).
  • Red first, the rule's real-tree test fails on the lower pull request's head without the four entries: verified (it fails on exactly those four).
  • The rule's real-tree test passes here: verified.
  • The DateInput, TimeInput, DateTimeInput, gestures and motion suites pass: verified (3,344 tests here; the description says 3,234).
  • The bundle and shared-identity script tests, eslint and the knowledge check pass: verified.
  • One primary intent, nothing separable left in, no internal context, present-tense record text: verified.
  • The land-order prerequisite has merged: verified.

Files:

  • docs/architecture/react-component-runtime.md: clear (approved for this head)
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear
  • packages/core/src/DateInput/PickerWheel.tsx: clear
  • packages/core/src/gestures/GestureHost.ts: non-blocking (re-export placement)
  • packages/core/src/gestures/scrollType.ts: clear
  • packages/core/src/motion/animator.ts: clear
  • packages/core/src/motion/motionQueries.ts: non-blocking (repeats utils/coarsePointer.ts)
  • packages/core/src/motion/reducedMotion.ts: clear
  • scripts/snap-paging-bundle.test.mjs: clear

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 2c0be41

This branch was successfully deployed

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

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant