Skip to content

lint: no-static-touch-runtime keeps the touch runtime out of Core components' first load - #11518

Draft
cixzhang wants to merge 10 commits into
perf/defer-touch-resizablefrom
perf/defer-touch-guardrail
Draft

cixzhang wants to merge 10 commits into
perf/defer-touch-resizablefrom
perf/defer-touch-guardrail

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

Guardrail, stacked on #11508 (the top of the touch-loader stack): a lint rule, @astryx/no-static-touch-runtime, stops a Core component from putting the shared touch runtime (the animator and the gesture host) back in its first load. The imports that still do so today are named in a shrink-only allowlist. It's a maintainer-facing check, with no product or API change.

User or maintainer impact

Problem and solution fit

  • Before: the boundary test (utils/touchRuntime.boundary.test.ts) checks a fixed list of component entries. A new import from any other component, or a new component, would not be caught.
  • The rule, part of the existing lint step (no new CI job):
    • It walks Core's static graph from every component entry (packages/core/src/<Component>/index.ts), following every static import inside component folders.
    • It reports the import where a component file reaches a shared module that reaches motion/animator or gestures/GestureHost, so the report lands where the fix goes. For example, Calendar's ../hooks barrel import is reported, not createAnimator.
    • It covers import and export … from and resolves relative paths. import type, {type X} and import() are not edges, so the loader and the runtime parts only it reaches are never checked.
    • An opt-in folder (SnapPaging, which INV13's opt-in clause now names) is a shared module, not an entry.
  • The allowlist (no-static-touch-runtime.allowlist.json) lists the 13 imports that reach the runtime today. Each has a why-line and the follow-up that removes it: the date and time fields' hooks barrel imports (follow-up 6), the date and time wheels (7), Slider's touch controller (8) and Chat's keyboard ride (9).
  • The test fails both ways: on a new import without an entry, and on an entry that no longer reaches the runtime. So the list only shrinks.

Authority

architecture:react-component-runtime INV13 (components do not import the touch modules statically; one loader loads them after first paint). INV13's gap line names the same importers, now including TouchDateField and TouchDateTimeField, which the rule found import the hooks barrel too. The INV13 verification row and verified_by add the rule's test.

Change and evidence

  • internal/eslint-plugin-astryx/no-static-touch-runtime.js (the rule), no-static-touch-runtime.allowlist.json, no-static-touch-runtime.test.mjs, the plugin's index and README, eslint.config.js, and INV13.

Scope

Components: none (lint, records)

  • This PR has one primary intent.
  • Independently removable deltas were removed or split (each allowlisted import moves in its own follow-up).
  • Public text and artifacts contain no internal Meta context.

Testing

  • Red first: a miniature Core tree. A component reaching the animator through a shared module, and a component re-exporting it, are reported. A type-only import, a runtime part only import() reaches, an opt-in folder, and an allowlisted import are not. These fail with the rule absent.
  • The repository's own Core: the allowlist equals the rule's findings exactly, and every entry has a why-line and a removing change.
  • eslint over the component folders with allowlisted imports (Calendar, DateInput, DateTimeInput, Slider, Chat) and over the touched config passes.
  • check:knowledge passes.

Writing rubric results

  • R1 present tense: pass; the gap line and the verification row state what holds now.
  • 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.

…ponents' first load

A new rule walks Core's static graph from every component entry and reports the import where a component file reaches a shared module that reaches the animator or the gesture host. The 13 imports that do so today are allowlisted, each with why and the follow-up that removes it; the test fails on a new import and on a stale entry, so the list only shrinks. INV13's gap line adds TouchDateField and TouchDateTimeField, and its verification names the rule.
@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:13pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 13, 2026
@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:43 PM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 5ea4c43

@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 blocking finding. Otherwise the rule and its allowlist match INV13 as approved for this head: the allowlist equals the rule's 13 findings, and the rule's tests and check:knowledge pass.

Blocking

  • internal/eslint-plugin-astryx/no-static-touch-runtime.js copies the touch-module list and the import parser from packages/core/src/utils/touchRuntime.boundary.test.ts (lines 50 and 105-141, against 22 and 30-50). The copies already disagree on import {type X} and on .js specifiers, so have the boundary test import TOUCH_MODULES and staticImports from the rule module and delete its own copies.

Also worth a look

  • The INV13 gap line says the rule reports any static path into "these modules", but the rule only counts paths that reach the animator or the gesture host (a component's static import of gestures/VelocityTracker passes). Naming those two modules would make the record exact.
Claims and files checked

Claims:

  • A new static path from a Core component into the animator or the gesture host fails lint in strict CI: verified (eslint.config.js severity follows CI/ASTRYX_STRICT_LINT; a scratch component's value import is reported).
  • The rule walks every component entry and follows static imports inside component folders: verified (no-static-touch-runtime.js:149-211).
  • It reports the import where a component file reaches a shared module that reaches the runtime, for example Calendar's ../hooks import: verified (Calendar/Calendar.tsx -> hooks/index.ts).
  • import and export … from are edges with relative paths resolved; type-only imports and import() are not: verified (parser cases).
  • An opt-in folder such as SnapPaging is a shared module, not an entry: verified (optInFolders in isComponentFile).
  • The allowlist holds 13 imports, each with a reason and the change that removes it: verified (allowlist JSON; the test's reason check).
  • The test fails on a new import without an entry and on an entry that no longer reaches the runtime: verified (no-static-touch-runtime.test.mjs:158-170).
  • The miniature-tree tests fail without the rule: verified (they import the rule module).
  • The allowlist equals the rule's findings on the repository's Core: verified (13 of 13; the test passes).
  • eslint over Calendar, DateInput, DateTimeInput, Slider, Chat and the touched config passes: verified (0 errors).
  • check:knowledge passes: verified.
  • INV13's gap line adds TouchDateField and TouchDateTimeField, which import the hooks barrel: verified (rule findings).
  • No product or API change and no new CI job: verified (the built public surface is unchanged; no workflow changes).

Files:

  • docs/architecture/react-component-runtime.md: non-blocking wording note on the gap line.
  • eslint.config.js: clear.
  • internal/eslint-plugin-astryx/README.md: clear.
  • internal/eslint-plugin-astryx/index.js: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js: blocking, duplicated touch-module list and import parser.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjs: clear.

Automated review (maintainer link)

};

/** The shared touch modules no component may reach statically. */
export const TOUCH_MODULES = ['motion/animator.ts', 'gestures/GestureHost.ts'];

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.

Blocking: this list, code() (:83-85) and the parser (:105-141) are copies of packages/core/src/utils/touchRuntime.boundary.test.ts:22, :25-27 and :30-50, and the two parsers already disagree. import {type Animator} from '../motion/animator' is an edge for the boundary test but not here. A .js specifier is an edge here but not in the test. Please have the boundary test import TOUCH_MODULES and staticImports from this module and delete its copies, so the touch runtime is defined once.

Comment on lines +377 to +378
import the `hooks` barrel. `@astryx/no-static-touch-runtime` reports any
other static path from a component into these modules; its allowlist names

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: INV13's shared touch modules include the recognizers and the velocity tracker. The rule only counts paths that reach motion/animator or gestures/GestureHost, so a component's static import of gestures/VelocityTracker passes. Suggested: "reports any other static path from a component into the animator or the gesture host".

…date the graph on file changes

A string such as 'image/*' no longer hides an import: the rule reads top-level import and export declarations from a TypeScript parse. The graph is reused for at most a second, then rebuilt when any Core file's change time differs, so an editor's ESLint server sees an edit in a shared module. The README says ESLint's --cache can miss the rule's cross-file results.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec c499161

@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 blocking findings. Otherwise the rule and its allowlist match INV13 as approved for this head: the allowlist equals the rule's 13 findings, and the rule's tests, the boundary test and check:knowledge pass.

Blocking

  • Miss: internal/eslint-plugin-astryx/no-static-touch-runtime.js (lines 247-256) walks a component's import of another component's module without reporting it, so a component that newly imports ../Calendar/Calendar or ../Slider/sliderTouchController brings the touch runtime back into its first load with lint and the allowlist test green (DateRangeInput, PowerSearch, Table and TimeInput already do), against the description's "a new static path from a component into the animator or the gesture host fails lint" and INV13's gap line; please also report the edge where an import leaves its component folder for a module that reaches the runtime and allowlist those four edges, or narrow those claims to imports of shared modules.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js still keeps its own touch-module list (line 51) and import scanner (lines 118-168) beside the ones in packages/core/src/utils/touchRuntime.boundary.test.ts (lines 22 and 25-51), and the second commit's fix for an import hidden behind a /* inside a string reached only the rule, so please have the boundary test import TOUCH_MODULES and staticImports from the rule module and delete its copies.

Also worth a look

  • The "re-export follows a string like 'image/*'" test case also passes against the first commit's scanner; ending its module with a /** … */ block makes it a real regression test.
  • INV13's gap line says the rule covers "these modules", but it counts only paths to the animator or the gesture host, so a static import of gestures/VelocityTracker passes.
Claims and files checked

Claims:

  • A new static path from a component into the animator or the gesture host fails lint in strict pull request CI: false for a path through another component's module (a scratch component importing Calendar passes); true for a component's import of a shared module (a scratch import of the animator is an error, and the Lint job clears the cache and runs strict).
  • The message points to the touch loader: verified (no-static-touch-runtime.js:293-294).
  • Before, the boundary test checked a fixed list of entries: verified (touchRuntime.boundary.test.ts:102-116, 11 entries).
  • The rule walks from every component entry and follows static imports inside component folders: verified (no-static-touch-runtime.js:230-258).
  • It reports the import where a component file reaches a shared module, such as Calendar's hooks barrel import: verified (allowlist entry; Calendar.tsx:33).
  • Import and export-from are covered and relative paths resolved; type-only imports and import() are not edges: verified (no-static-touch-runtime.js:84-168 and the test cases).
  • An opt-in folder (SnapPaging) is a shared module, not an entry: verified (eslint.config.js:991 and the test's opt-in case).
  • The allowlist lists the 13 imports that reach the runtime, each with a reason and its follow-up: verified (13 entries equal the rule's findings).
  • The test fails on a new import and on a stale entry: verified (no-static-touch-runtime.test.mjs:175-187).
  • INV13's gap line names the same importers, including the two touch date fields, and its verification row and verified_by add the test: verified.
  • No product or API change: verified (no package source changed; the built surfaces of all ten published packages are identical).
  • The rule's tests, ESLint over the five component folders and the config, and check:knowledge pass: verified.
  • The first-load savings of the stack below cannot creep back: partly; the boundary test's 11 entries stay guarded, but any other component can gain the runtime through another component without a report.

Files:

  • docs/architecture/react-component-runtime.md: the gap line over-claims the rule's coverage (first blocking finding; second note).
  • eslint.config.js: clear.
  • internal/eslint-plugin-astryx/README.md: clear.
  • internal/eslint-plugin-astryx/index.js: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear (equals the findings).
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js: both blocking findings.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjs: first note.

Automated review (maintainer link)

};

/** The shared touch modules no component may reach statically. */
export const TOUCH_MODULES = ['motion/animator.ts', 'gestures/GestureHost.ts'];

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.

Still blocking: this list and the scanner below (:118-168) are a second definition of what packages/core/src/utils/touchRuntime.boundary.test.ts:22 and :25-51 check. This revision's TypeScript parse fixed an import hidden behind a /* in a string here only: a module with const accept = 'image/*';, then export {animatorFor} from '../motion/animator';, then a /** … */ block is an edge for this rule and not for the boundary test. Please have the boundary test import TOUCH_MODULES and staticImports from this module and delete its copies, so the touch runtime and its scanner are defined once.

// A string that looks like a comment opener must not hide the re-export.
write(
'src/utils/accept.ts',
"const accept = 'image/*';\nconst docs = 'https://example.com';\nexport {animatorFor} from '../motion/animator';\nexport const kinds = [accept, docs];\n",

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 case also passes against the previous regex scanner. Nothing after 'image/*' closes a block comment, so the comment strip never removes the re-export. Ending the module with a /** … */ block makes the case fail on a comment-stripping scanner.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec aa431e7

@cixzhang

Copy link
Copy Markdown
Contributor Author

Decision: D-20261113-278

Records the owner's answer that the touch runtime loads once per page after first paint, never on demand, at aa431e7. This pull request adds the lint rule that keeps components from importing the shared touch modules statically, named in react-component-runtime INV13 with its allowlist; it changes no user-visible behavior. 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: two blocking findings. Otherwise the rule and its allowlist match INV13 as approved for this head: the allowlist equals the rule's 13 findings, and the rule's tests, the boundary test and check:knowledge pass. Required CI has not run on this head, since the Lint and CI workflows run only for pull requests into main.

Blocking

  • Miss: internal/eslint-plugin-astryx/no-static-touch-runtime.js (lines 247-256) walks a component's import of another component's module without reporting it, so a component that newly imports ../Calendar/Calendar or ../Slider/sliderTouchController brings the touch runtime back into its first load with lint and the allowlist test green (DateRangeInput, PowerSearch, Table and TimeInput already do), against the description's "a new static path from a component into the animator or the gesture host fails lint" and INV13's gap line; please also report the edge where an import leaves its component folder for a module that reaches the runtime and allowlist those four edges, or narrow those claims to imports of shared modules.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js keeps its own touch-module list (line 51) and import scanner (lines 64-81 and 118-168) beside the ones in packages/core/src/utils/touchRuntime.boundary.test.ts (lines 22, 25-51 and 83-99), and the two already disagree (the string-hidden /* fix reached only the rule, and TreeList.tsx's inline type-only re-export is an edge only for the test), so please have the boundary test import TOUCH_MODULES and staticImports from the rule module and delete its copies.

Also worth a look

  • The "re-export follows a string like 'image/*'" test case also passes against the first commit's scanner; ending its module with a /** … */ block makes it a real regression test.
  • INV13's gap line says the rule covers "these modules", but it counts only paths to the animator or the gesture host, so a static import of gestures/VelocityTracker passes.
Claims and files checked

Claims:

  • A new static path from a component into the animator or the gesture host fails lint in strict pull request CI: false for a path through another component's module (a scratch component importing Calendar passes); true for a component's import of a shared module (a scratch import of the animator is an error, and the Lint job clears the cache and runs strict).
  • The message points to the touch loader: verified (no-static-touch-runtime.js:293-294).
  • Before, the boundary test checked a fixed list of entries: verified (touchRuntime.boundary.test.ts:102-116, 11 entries).
  • The rule walks from every component entry and follows static imports inside component folders: verified (no-static-touch-runtime.js:230-258).
  • It reports the import where a component file reaches a shared module, such as Calendar's hooks barrel import: verified (allowlist entry; Calendar.tsx:33).
  • Import and export-from are covered and relative paths resolved; type-only imports and import() are not edges: verified (no-static-touch-runtime.js:84-168 and the test cases).
  • An opt-in folder (SnapPaging) is a shared module, not an entry: verified (eslint.config.js rule options and the test's opt-in case).
  • The allowlist lists the 13 imports that reach the runtime today, each with a reason and its follow-up: verified for imports of shared modules (13 entries equal the rule's findings); the four cross-component imports above also reach it and are not listed.
  • The test fails on a new import and on a stale entry: verified (no-static-touch-runtime.test.mjs:175-187).
  • INV13's gap line names the same importers, including the two touch date fields, and its verification row and verified_by add the test: verified.
  • No product or API change: verified (no package source changed; the built surfaces of all ten published packages are identical).
  • The rule's tests, ESLint over the five component folders and the config, and check:knowledge pass: verified.
  • The first-load savings of the stack below cannot creep back: partly; the boundary test's 11 entries stay guarded, but any other component can gain the runtime through another component without a report.

Files:

  • docs/architecture/react-component-runtime.md: the gap line over-claims the rule's coverage (first blocking finding; second note).
  • eslint.config.js: clear.
  • internal/eslint-plugin-astryx/README.md: clear apart from the same over-claim ("out of every Core component's first load").
  • internal/eslint-plugin-astryx/index.js: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear (equals the findings).
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js: both blocking findings.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjs: first note.

Automated review (maintainer link)

while (walk.length > 0) {
const file = walk.shift();
for (const {file: target, specifier} of edges.get(file) ?? []) {
if (!isComponentFile(target) && reaches.has(target)) {

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.

Blocking (Miss): this reports an edge only when its target is outside the component folders, so a component's import of another component's module, such as ../Calendar/Calendar or ../Slider/sliderTouchController, is walked without a report. DateRangeInput, PowerSearch, Table and TimeInput already carry the touch runtime this way with no allowlist entry, and a new component can do the same with lint and the allowlist test green. Please also report an import that leaves the importing file's component folder for a module that reaches the runtime, and allowlist those four edges; or narrow the description, the README and INV13's gap line to imports of shared modules.

@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 decision, and three blocking findings need changes.

Owner decision: this rule enforces architecture:react-component-runtime INV13 as this pull request proposes it ("Components do not import them statically", with one loader after first paint), while INV13 on main still says components import the touch modules statically, and the earlier spec approvals named earlier heads before this head's base-branch merge changed INV13's text. An engineering owner records the decision by commenting /approve-spec <full head SHA> on the pull request; the author may do so as an engineering owner.

Blocking

  • Regression: at this head no-static-touch-runtime.test.mjs fails "lists every import that reaches the runtime" and strict lint errors on packages/core/src/Swipe/useSwipeAction.ts lines 85, 86, 89 and 94, because the base-branch merge brought in the opt-in Swipe folder (createSwipe) and only SnapPaging is listed in optInFolders (eslint.config.js line 991 and the test's lines 171-173), so please add 'Swipe' to both, ideally from one list the rule module exports.
  • Miss: internal/eslint-plugin-astryx/no-static-touch-runtime.js (lines 247-251) walks a component's import of another component's module without reporting it, so DateRangeInput, PowerSearch, Table and TimeInput already carry the touch runtime with no finding or allowlist entry, against the description, the README's "out of every Core component's first load" and INV13's gap line; please also report an import that leaves its component folder for a module that reaches the runtime and allowlist those four edges, or narrow those claims to imports of shared modules.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js keeps its own touch-module list (line 51) and import scanner (lines 64-81 and 118-168) beside the ones in packages/core/src/utils/touchRuntime.boundary.test.ts (lines 22, 25-51 and 83-99), and the two already disagree on inline type-only re-exports, .js specifiers and a comment opener inside a string, so please have the boundary test import TOUCH_MODULES and staticImports from the rule module and delete its copies.

Two non-blocking notes from the earlier inline comments still apply: the "re-export follows a string like 'image/*'" test case also passes against a comment-stripping scanner, and INV13's gap line says the rule covers "these modules" though it counts only the animator and the gesture host.

Claims and files checked

Claims:

  • The rule stops a Core component from putting the touch runtime back in its first load: partly; imports of shared modules are reported, imports of another carrier component's module are not (second blocking finding).
  • Today's imports are named in a shrink-only allowlist: false at this head; the four Swipe/useSwipeAction.ts imports and the four cross-component imports reach the runtime and are not listed.
  • No product or API change: verified; no package source changes and the built surfaces of all ten compared packages are identical.
  • A new static path from a component fails strict lint in pull request CI, with a message pointing to the touch loader: verified for imports of shared modules (strict ESLint errors; message at no-static-touch-runtime.js:294; the Lint job clears its cache and runs strict on pull requests into main); false for paths through another component.
  • Before, the boundary test checked a fixed list of entries: verified (touchRuntime.boundary.test.ts:102-116, 11 entries).
  • The rule walks from every component entry and follows static imports inside component folders: verified (no-static-touch-runtime.js:238-258).
  • It reports the import where a component file reaches a shared module, such as Calendar's hooks barrel import: verified (allowlist entry; Calendar.tsx:33).
  • Import and export-from are covered and relative paths resolved; type-only imports and import() are not edges: verified (no-static-touch-runtime.js:84-168 and the test cases).
  • An opt-in folder (SnapPaging) is a shared module, not an entry: verified (eslint.config.js:991), but the opt-in Swipe folder is not configured (first blocking finding).
  • The allowlist lists the 13 imports that reach the runtime today, each with a reason and its follow-up: 13 entries with both fields verified; they equal the rule's findings only once Swipe is an opt-in folder.
  • The test fails on a new import and on a stale entry: verified (no-static-touch-runtime.test.mjs:175-187); at this head it fails on the Swipe imports.
  • INV13's gap line names the same importers, including the two touch date fields, and its verification row and verified_by add the test: verified.
  • The miniature-tree cases report the shared-module and re-export paths and pass the type-only, import(), opt-in and allowlisted ones: verified (the 7 rule-tester cases pass; the invalid cases expect reports, so they fail without the rule).
  • The allowlist equals the rule's findings exactly: false at this head (one test fails with four unlisted findings).
  • ESLint over Calendar, DateInput, DateTimeInput, Slider, Chat and the config passes: verified (strict, no errors).
  • The knowledge check passes: verified.
  • Public text contains no internal context: verified.

Files:

  • docs/architecture/react-component-runtime.md: the gap line over-claims the rule's coverage (second blocking finding; second note); INV13 as proposed awaits an engineering-owner approval at this head.
  • eslint.config.js: optInFolders lacks Swipe (first blocking finding).
  • internal/eslint-plugin-astryx/README.md: the same over-claim ("out of every Core component's first load").
  • internal/eslint-plugin-astryx/index.js: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear (equals the findings once Swipe is opt-in).
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js: second and third blocking findings.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjs: the opt-in list lacks Swipe (first blocking finding); first note.

Automated review (maintainer link)

Comment thread eslint.config.js Resolved
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec bc623f8

@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 in the rule need fixes. INV13 as this pull request proposes it now has an engineering owner's approval for this head, so the earlier spec question is settled.

Blocking

  • Regression: at this head no-static-touch-runtime.test.mjs fails "lists every import that reaches the runtime" and strict lint errors on packages/core/src/Swipe/useSwipeAction.ts lines 85, 86, 89 and 94, because the base-branch merge brought in the opt-in Swipe folder (createSwipe) and only SnapPaging is listed in optInFolders (eslint.config.js line 991 and the test's lines 171-173), so please add 'Swipe' to both, ideally from one list the rule module exports.
  • Miss: internal/eslint-plugin-astryx/no-static-touch-runtime.js (lines 247-251) walks a component's import of another component's module without reporting it, so DateRangeInput, PowerSearch, Table and TimeInput already carry the touch runtime with no finding of their own and a new component could do the same, against the description, the README's "out of every Core component's first load" and INV13's gap line; please also report an import that leaves its component folder for a module that reaches the runtime and allowlist those four edges, or narrow those claims to imports of shared modules.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js keeps its own touch-module list (line 51) and import scanner (lines 84-168) beside the ones in packages/core/src/utils/touchRuntime.boundary.test.ts (lines 22 and 25-51), and the two already disagree on inline type-only re-exports, .js specifiers and a comment opener inside a string, so please have the boundary test import TOUCH_MODULES and staticImports from the rule module and delete its copies.

Two non-blocking notes from the earlier inline comments still apply: the "re-export follows a string like 'image/*'" test case also passes against a comment-stripping scanner, and INV13's gap line says the rule covers "these modules" though it counts only the animator and the gesture host.

Claims and files checked

Claims:

  • The rule stops a Core component from putting the touch runtime back in its first load: partly; imports of shared modules are reported, imports of another carrier component's module are not (second blocking finding).
  • Today's imports are named in a shrink-only allowlist: false at this head; the four Swipe/useSwipeAction.ts imports are unlisted, and the four cross-component carriers have no finding of their own.
  • No product or API change: verified; no package source changes and the built surfaces of all ten compared packages are identical.
  • A new static path from a component fails strict lint in pull request CI, with a message pointing to the touch loader: verified for imports of shared modules (strict ESLint errors; message at no-static-touch-runtime.js:294; the Lint job clears its cache and runs strict on pull requests into main); false for paths through another component.
  • The rule is part of the existing lint step, with no new CI job: verified; no workflow changes.
  • Before, the boundary test checked a fixed list of entries: verified (touchRuntime.boundary.test.ts:102-116, 11 entries).
  • The rule walks from every component entry and follows static imports inside component folders: verified (no-static-touch-runtime.js:238-258).
  • It reports the import where a component file reaches a shared module, such as Calendar's hooks barrel import: verified (the rule's finding for Calendar/Calendar.tsx into hooks/index.ts).
  • Import and export-from are covered and relative paths resolved; type-only imports and import() are not edges: verified (no-static-touch-runtime.js:84-168 and the test cases).
  • An opt-in folder (SnapPaging) is a shared module, not an entry: verified (eslint.config.js:991), but the opt-in Swipe folder is not configured (first blocking finding).
  • The allowlist lists the 13 imports that reach the runtime today, each with a reason and its follow-up: 13 entries with both fields verified; they equal the rule's findings only once Swipe is an opt-in folder.
  • The test fails on a new import and on a stale entry: verified (no-static-touch-runtime.test.mjs:175-187); at this head it fails on the Swipe imports.
  • INV13's gap line names the same importers, including the two touch date fields, and its verification row and verified_by add the test: verified.
  • The miniature-tree cases report the shared-module and re-export paths and pass the type-only, import(), opt-in and allowlisted ones: verified (the 7 rule-tester cases pass; the invalid cases expect reports, so they fail without the rule).
  • The allowlist equals the rule's findings exactly: false at this head (one test fails with four unlisted findings).
  • ESLint over Calendar, DateInput, DateTimeInput, Slider, Chat and the config passes: verified (strict, no errors).
  • The knowledge check passes: verified.
  • Each allowlisted import moves in its own follow-up: verified; every entry names its follow-up (6 to 9).
  • Public text contains no internal context: verified.

Files:

  • docs/architecture/react-component-runtime.md: the gap line over-claims the rule's coverage (second blocking finding; second note); INV13 as proposed is owner-approved for this head.
  • eslint.config.js: optInFolders lacks Swipe (first blocking finding).
  • internal/eslint-plugin-astryx/README.md: the same over-claim ("out of every Core component's first load", second blocking finding).
  • internal/eslint-plugin-astryx/index.js: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear (equals the findings once Swipe is opt-in).
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js: second and third blocking findings.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjs: the opt-in list lacks Swipe (first blocking finding); first note.

Automated review (maintainer link)

…ntime rule

Swipe/ holds createSwipe, the public constructor INV13 names: only an app that imports it ships the swipe modules, so its static imports of the gesture host do not reach a component's first load. The rule and its real-tree test now count Swipe as an opt-in folder, beside SnapPaging.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 35c9796

@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 blocking findings in the new rule need fixes. INV13 as this pull request proposes it has an engineering owner's approval for this head, and the Swipe opt-in folder is now handled.

Blocking

  • Miss: internal/eslint-plugin-astryx/no-static-touch-runtime.js (lines 248-252) walks a component's import of another component's module without reporting it, so DateRangeInput, PowerSearch, Table and TimeInput already carry the touch runtime with no finding of their own and a new component that imports ../Calendar/Calendar passes lint, against the description, the README's "out of every Core component's first load" and INV13's gap line; please also report an import that leaves its component folder for a module that reaches the runtime and allowlist the existing edges, or narrow those texts to imports of shared modules and add TimeInput to INV13's list of carriers.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js keeps its own touch-module list (line 52) and import scanner (lines 65-169) beside the ones in packages/core/src/utils/touchRuntime.boundary.test.ts (lines 22 and 25-51), and the two already disagree on inline type-only imports, .js specifiers and a /* inside a string, so please have the boundary test import TOUCH_MODULES and staticImports from the rule module and delete its copies.

The earlier non-blocking notes still apply: the 'image/*' test case also passes against a comment-stripping scanner, and INV13's gap line says the rule covers "these modules" though it checks only the animator and the gesture host. The opt-in folder list is written in both eslint.config.js and the test; exporting one list from the rule module would save the next edit.

Claims and files checked

Claims:

  • The rule stops a Core component from putting the touch runtime back in its first load: partly; imports of shared modules are reported, imports of another carrier component's module are not (first blocking finding).
  • The imports that still do so are named in a shrink-only allowlist: verified for the rule's findings (13 findings, 13 entries, none unlisted or stale); four components that carry the runtime through another component have no entry.
  • A maintainer-facing check with no product or API change: verified; no package source changes, and the built public surfaces of all compared packages are identical.
  • A new static path from a component fails strict lint in pull request CI, with a message pointing to the touch loader: verified for paths through shared modules; false for paths through another component's module.
  • The first-load savings of the earlier pull requests cannot creep back: false while the cross-component gap stands.
  • Before, the boundary test checked a fixed list of component entries: verified.
  • The rule is part of the existing lint step, with no new CI job: verified.
  • It walks every component entry and follows static imports inside component folders: verified.
  • It reports the import where a component file reaches a shared module, such as Calendar's hooks barrel import: verified.
  • Import and export-from are covered and relative paths resolved; type-only imports and import() are not edges: verified in the rule and its test cases.
  • The opt-in SnapPaging folder is a shared module, not an entry: verified; Swipe is configured the same way.
  • The allowlist lists 13 imports, each with a reason and the follow-up that removes it: verified.
  • The test fails on a new import without an entry and on a stale entry: verified; it passes at this head.
  • INV13's gap line names the same importers, including the two touch date fields, and its verification row and verified_by add the rule's test: verified; its statement that the rule reports any other static path is false, and it leaves out TimeInput.
  • The miniature-tree cases report the shared-module and re-export paths and pass the type-only, import(), opt-in and allowlisted ones: verified (10 of 10 pass).
  • The allowlist equals the rule's findings on the repository's own Core: verified.
  • ESLint over the component folders with allowlisted imports and the touched config passes: verified in strict mode, with no errors.
  • The knowledge check passes: verified.
  • Each allowlisted import moves in its own follow-up: verified; every entry names one.
  • Public text contains no internal context: verified.

Files:

  • docs/architecture/react-component-runtime.md: the gap line over-claims the rule's coverage and omits TimeInput (first blocking finding); "these modules" wording (note).
  • eslint.config.js: clear; the opt-in list is repeated in the test (note).
  • internal/eslint-plugin-astryx/README.md: the same over-claim (first blocking finding).
  • internal/eslint-plugin-astryx/index.js: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js: both blocking findings.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjs: the 'image/*' case does not discriminate (note).

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.

Approval waits on an engineering owner: the new rule enforces INV13 as this stack proposes it ("Components do not import them statically"), which main does not yet say, and no /approve-spec names this head, so an engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner). Three blocking findings also need fixes:

  • Regression: merging the base branch brings AlertDialog's touch motion, whose packages/core/src/AlertDialog/useAlertMotion.ts imports the animator statically (line 27), so the rule's allowlist test (no-static-touch-runtime.test.mjs lines 177-180) and strict lint now fail; please move that motion behind the touch loader in the base branch, or add the entry with its reason and removing change and name AlertDialog in INV13's gap line.
  • Miss: internal/eslint-plugin-astryx/no-static-touch-runtime.js (lines 247-252) walks a component's import of another component's module without reporting it, so DateRangeInput, PowerSearch, Table and TimeInput carry the touch runtime with no finding of their own and a new component importing ../Calendar/Calendar passes, against the description, the README and INV13's gap line; please report an import that leaves its component folder for a module that reaches the runtime and allowlist the existing ones, or narrow those texts and add TimeInput to INV13's list of carriers.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js keeps its own touch-module list (line 52) and import scanner (lines 65-169) beside the ones in packages/core/src/utils/touchRuntime.boundary.test.ts (lines 22, 25-51 and 83-99), and the two already disagree on inline type-only imports and .js specifiers, so please have the boundary test import TOUCH_MODULES and staticImports from the rule module and delete its copies.

The earlier non-blocking notes still apply: the 'image/*' test case also passes against a comment-stripping scanner, INV13's gap line says "these modules" though the rule checks only the animator and the gesture host, and the opt-in folder list is written in both eslint.config.js and the test. The Swipe opt-in folder is handled.

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • The rule stops a Core component from putting the touch runtime back in its first load: partly; imports of shared modules are reported, imports of another carrier component's module are not (Miss).
  • The imports that still do so are named in a shrink-only allowlist: false at this head; the rule finds 14 imports against 13 entries, and AlertDialog's animator import is unlisted (Regression).
  • A maintainer-facing check with no product or API change: verified; no package source changes.
  • A new static path from a component fails strict lint in pull request CI, with a message pointing to the touch loader: verified for paths through shared modules (strict lint reports AlertDialog's import with that message); the Lint workflow runs only for pull requests into main, so not in this pull request's checks today; false for paths through another component's module.
  • The first-load savings of the earlier pull requests cannot creep back: false while the cross-component gap stands.
  • Before, the boundary test checked a fixed list of component entries: verified (eleven entries).
  • The rule is part of the existing lint step, with no new CI job: verified.
  • It walks every component entry and follows static imports inside component folders: verified.
  • It reports the import where a component file reaches a shared module, such as Calendar's hooks barrel import: verified.
  • Import and export-from are covered and relative paths resolved; type-only imports and import() are not edges: verified in the rule and its test cases.
  • The opt-in SnapPaging folder is a shared module, not an entry: verified; Swipe is configured the same way.
  • The allowlist lists 13 imports, each with a reason and the follow-up that removes it: verified for those 13; incomplete at this head (AlertDialog).
  • The test fails on a new import without an entry and on a stale entry: verified; at this head it fails on AlertDialog's import.
  • INV13's gap line names the same importers, including the two touch date fields, and its verification row and verified_by add the rule's test: verified; its statements that the rule reports any other static path and that the allowlist names exactly these imports are false at this head, and it leaves out TimeInput and AlertDialog.
  • The miniature-tree cases report the shared-module and re-export paths and pass the type-only, import(), opt-in and allowlisted ones: verified.
  • The allowlist equals the rule's findings on the repository's own Core: false at this head (Regression).
  • ESLint over the component folders with allowlisted imports and the touched config passes: verified for those folders; strict lint over Core fails on AlertDialog.
  • The knowledge check passes: verified.
  • Each allowlisted import moves in its own follow-up: verified; every entry names one.
  • Public text contains no internal context: verified.

Files:

  • docs/architecture/react-component-runtime.md: the gap line misstates the rule's coverage and leaves out TimeInput and AlertDialog (Regression, Miss); "these modules" wording (note).
  • eslint.config.js: clear; the opt-in list is repeated in the test (note).
  • internal/eslint-plugin-astryx/README.md: over-claims the rule's coverage (Miss).
  • internal/eslint-plugin-astryx/index.js: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: no entry for AlertDialog's import at this head (Regression).
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js: the Miss and the duplicated list and scanner.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjs: fails at this head (Regression); the 'image/*' case does not discriminate (note).

Automated review (maintainer link)

# Conflicts:
#	docs/architecture/react-component-runtime.md

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on an engineering owner: the new rule enforces INV13 as this stack proposes it ("Components do not import them statically"), which main does not yet say, and no /approve-spec names this head, so an engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner). Three blocking findings also need fixes:

  • Regression: packages/core/src/AlertDialog/useAlertMotion.ts imports the animator statically (line 27), and this head names AlertDialog in INV13's gap line but adds no AlertDialog/useAlertMotion.ts -> motion/animator.ts entry to no-static-touch-runtime.allowlist.json, so the rule's allowlist test (no-static-touch-runtime.test.mjs line 180) and strict lint still fail; please add that entry with its reason and removing change, or move AlertDialog's motion behind the touch loader in the base branch.
  • Miss: internal/eslint-plugin-astryx/no-static-touch-runtime.js (lines 247-257) walks a component's import of another component's module without reporting it, so DateRangeInput, PowerSearch, Table and TimeInput carry the touch runtime with no finding of their own and a new component importing ../Calendar/Calendar passes, against the description, the README and INV13's gap line; please report an import that leaves its component folder for a module that reaches the runtime and allowlist the existing ones, or narrow those texts and add TimeInput to INV13's list of carriers.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js keeps its own touch-module list (line 52) and import scanner (lines 65-169) beside the ones in packages/core/src/utils/touchRuntime.boundary.test.ts (lines 22, 25-51 and 83-99), and the two already disagree on inline type-only imports and .js specifiers, so please have the boundary test import TOUCH_MODULES and staticImports from the rule module and delete its copies.

Non-blocking: INV13's verification row now says "fails" twice (line 718), the 'image/*' test case also passes against a comment-stripping scanner, INV13's gap line says "these modules" though the rule checks only the animator and the gesture host, and the opt-in folder list is written in both eslint.config.js and the test.

Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • The rule stops a Core component from putting the touch runtime back in its first load: partly; imports of shared modules are reported, imports of another carrier component's module are not (Miss).
  • The imports that still do so are named in a shrink-only allowlist: false at this head; the rule finds 14 imports against 13 entries, and AlertDialog's animator import is unlisted (Regression).
  • A maintainer-facing check with no product or API change: verified; no package source changes, and the built API surfaces of base and head are identical.
  • A new static path from a component fails strict lint in pull request CI, with a message pointing to the touch loader: verified for paths through shared modules (strict lint reports AlertDialog's import with that message); the Lint workflow runs only for pull requests into main, so not in this pull request's checks today; false for paths through another component's module.
  • The first-load savings of the earlier pull requests cannot creep back: false while the cross-component gap stands.
  • Before, the boundary test checked a fixed list of component entries: verified (eleven entries).
  • The rule is part of the existing lint step, with no new CI job: verified.
  • It walks every component entry and follows static imports inside component folders: verified.
  • It reports the import where a component file reaches a shared module, such as Calendar's hooks barrel import: verified.
  • Import and export-from are covered and relative paths resolved; type-only imports and import() are not edges: verified in the rule and its test cases.
  • The opt-in SnapPaging folder, which INV13 names, is a shared module, not an entry: verified; Swipe is configured the same way.
  • The allowlist lists 13 imports, each with a reason and the follow-up that removes it: verified for those 13; incomplete at this head (AlertDialog).
  • The test fails on a new import without an entry and on a stale entry: verified; at this head it fails on AlertDialog's import.
  • INV13's gap line names the same importers, including the two touch date fields, and its verification row and verified_by add the rule's test: partly; the gap line also names AlertDialog, which the allowlist lacks, its statements that the rule reports any other static path and that the allowlist names exactly these imports are false at this head, and it leaves out TimeInput.
  • The miniature-tree cases report the shared-module and re-export paths and pass the type-only, import(), opt-in and allowlisted ones: verified.
  • The allowlist equals the rule's findings on the repository's own Core: false at this head (Regression).
  • ESLint over the component folders with allowlisted imports and the touched config passes: verified for those folders; strict lint fails on AlertDialog.
  • The knowledge check passes: verified.
  • Each allowlisted import moves in its own follow-up: verified; every entry names one.
  • Public text contains no internal context: verified.
  • The record states what holds now: verified for tense; two gap-line statements are false at this head (above).

Files:

  • docs/architecture/react-component-runtime.md: the gap line misstates the rule's coverage and the allowlist, and leaves out TimeInput (Regression, Miss); the verification row says "fails" twice and the gap line says "these modules" (notes).
  • eslint.config.js: clear; the opt-in list is repeated in the test (note).
  • internal/eslint-plugin-astryx/README.md: over-claims the rule's coverage (Miss).
  • internal/eslint-plugin-astryx/index.js: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: no entry for AlertDialog's import (Regression).
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js: the Miss and the duplicated list and scanner.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjs: fails at this head (Regression); the 'image/*' case does not discriminate (note).

Automated review (maintainer link)

| INV10 | Shared test over every adopter of the announcement module | An adopter holding its own Effect, observer, timer, or listener for its own-content announcement |
| INV11 | Source boundary check plus hook tests across StrictMode replay and unmount | A second keyboard listener or measurement in Core; a consumer reading a CSS custom property on the root or a shared ancestor for the height; an export of the hook; a component outside Core measuring by a rule other than AST-099 FR2, or riding the keyboard; a listener left after unmount; a translate left on an app element after the keyboard hides once focus has left the field, or after the field unmounts; any other write on an app element; a translate on a container whose layout box is not at the bottom edge, that fills the viewport, or whose own `translate` is not `none`; a translate on a container whose position the app is animating with CSS when the module measures; on a docked container too tall to fit above the keyboard once moved (a full-height side drawer, a pane below a fixed header), a translate when a scroller holds the field or one larger than the focused field needs to clear the keyboard; a translate measured before the page's own keyboard listeners run; a covered field deciding its keyboard behavior in an Effect that reacts to focus; a Core rider driven by JavaScript per frame or by its own transition; or more than one layout read per keyboard change beyond the docked bar's one read INV11 names |
| INV12 | Source boundary check plus real-browser tests on a throttled phone profile over a 10-level by 50-sibling tree and two changes in one frame | A per-frame height or layout, a walk past the area or into a subtree other than `display: contents`, an element moved twice for one frame, an added element other than a swap's one transient copy, that copy left after the swap ends, an exported reporting function, a slide that moves a child outside the band, or a moving clip on an element whose parts slide fails |
| INV13 | Source boundary check plus bundle analysis of a page with several touch components, and real-browser tests on a throttled phone profile, under a fine pointer, and on a hybrid device; a desktop render's static graph holds no animator or gesture-host module; the loader runs once after first paint at idle; a touch before the load takes the fine-pointer path; after the load, touch motion works; `@astryx/no-static-touch-runtime` lint over Core, with its shrink-only allowlist test | A second copy of a touch module on one page, a component bundling its own copy of a module's primitive, an `import()` whose target is one of these modules, other than `Item`'s released loader for its deprecated swipe props, a swipe module (the gesture core, the animator, the panels' rendering, the row's gesture code) imported by `Item` or `ListItem`, swipe code in `Item` other than its deprecated path (that loader, the released row style, the role gate, the `commit` warning, the bridge, the click guard, the event forwarders, and the coexistence diagnostic), or any of it outside the deprecated path, a public export or doc entry for the modules, an install call or installed check in the public API, a gesture listener in a component that uses no gesture, or an idle document listener outside a press other than the one shared press controller and the one stray-click swallower, an import of `@astryxdesign/core/internal/*` outside Core and Lab, a class outside the recognizer family, an `instanceof` check on a recognizer, an internal factory with a public factory's name, or a direct module import for a job the public layer covers fails, a component that imports a touch module statically, a load started by an input, or a touch before the load that throws or half-animates fails |

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 failure signal now says "fails" twice ("…the public layer covers fails, a component that imports a touch module statically, … half-animates fails"), so the last three signals read as a fragment. Please drop the first "fails".

…he loader

Main's AlertDialog touch motion (useAlertMotion) imports the animator's motion engine statically. INV13's gap list names it; the allowlist entry goes when the follow-up takes the engine from the touch loader.

@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: the new rule enforces INV13 as this stack proposes it ("Components do not import them statically"), which main does not yet say, and no /approve-spec names this head, so an engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner). The new AlertDialog allowlist entry fixes the failing allowlist test and strict lint. Three blocking findings still need fixes:

  • Miss: internal/eslint-plugin-astryx/no-static-touch-runtime.js (lines 247-259) walks a component's import of another component's module without reporting it, so DateRangeInput, PowerSearch, Table and TimeInput carry the touch runtime with no finding of their own and a new component importing ../Calendar/Calendar passes, against the description, the README and INV13's gap line; please report an import that leaves its component folder for a module that reaches the runtime and allowlist the existing ones, or narrow those texts and add TimeInput to INV13's list of carriers.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js keeps its own touch-module list (line 52) and import scanner (lines 65-169) beside the ones in packages/core/src/utils/touchRuntime.boundary.test.ts (lines 22, 25-51 and 83-99), and the two already disagree on inline type-only imports and .js specifiers, so please have the boundary test import TOUCH_MODULES and staticImports from the rule module and delete its copies.
  • The description still says the allowlist lists 13 imports with follow-ups 6 to 9, but it now has 14 entries, the last being AlertDialog's animator import with an unnumbered follow-up (no-static-touch-runtime.allowlist.json lines 56-59), so please update the count and name AlertDialog's entry and the change that removes it.

Non-blocking: INV13's verification row says "fails" twice (line 718), the 'image/*' test case also passes against a comment-stripping scanner, INV13's gap line says "these modules" though the rule checks only the animator and the gesture host, and the opt-in folder list is written in both eslint.config.js and the test.

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • The rule stops a Core component from putting the touch runtime back in its first load: partly; imports of shared modules are reported, imports of another carrier component's module are not (Miss).
  • The imports that still do so are named in a shrink-only allowlist: verified; the rule's 14 findings equal the 14 entries.
  • A maintainer-facing check with no product or API change: verified; no package source changes, and the built API surfaces of base and head are identical.
  • A new static path from a component fails strict lint in pull request CI, with a message pointing to the touch loader: verified for paths through shared modules; the Lint workflow runs only for pull requests into main, so not in this pull request's checks today; false for paths through another component's module.
  • The first-load savings of the earlier pull requests cannot creep back: false while the cross-component gap stands.
  • Before, the boundary test checked a fixed list of component entries: verified (ten entries).
  • The rule is part of the existing lint step, with no new CI job: verified.
  • It walks every component entry and follows static imports inside component folders: verified.
  • It reports the import where a component file reaches a shared module, such as Calendar's hooks barrel import: verified.
  • Import and export-from are covered and relative paths resolved; type-only imports and import() are not edges: verified in the rule and its test cases.
  • The opt-in SnapPaging folder, which INV13 names, is a shared module, not an entry: verified; Swipe is configured the same way.
  • The allowlist lists 13 imports, each with a reason and the follow-up that removes it (follow-ups 6 to 9): false at this head; it lists 14, and AlertDialog's entry names an unnumbered follow-up.
  • The test fails on a new import without an entry and on a stale entry: verified.
  • INV13's gap line names the same importers, including the two touch date fields, and its verification row and verified_by add the rule's test: verified for the importers and the row; its statement that the rule reports any other static path is false (Miss), and it leaves out TimeInput.
  • The miniature-tree cases report the shared-module and re-export paths and pass the type-only, import(), opt-in and allowlisted ones, and fail without the rule: verified.
  • The allowlist equals the rule's findings on the repository's own Core, and every entry has a reason and a removing change: verified.
  • ESLint over the component folders with allowlisted imports and the touched config passes: verified.
  • The knowledge check passes: verified.
  • Each allowlisted import moves in its own follow-up: verified; every entry names one.
  • Public text contains no internal context: verified.
  • The record states what holds now: verified for tense; the gap line's coverage statement is false (above).

Files:

  • docs/architecture/react-component-runtime.md: the gap line misstates the rule's coverage and leaves out TimeInput (Miss); the verification row says "fails" twice and the gap line says "these modules" (notes).
  • eslint.config.js: clear; the opt-in list is repeated in the test (note).
  • internal/eslint-plugin-astryx/README.md: over-claims the rule's coverage (Miss).
  • internal/eslint-plugin-astryx/index.js: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear; it matches the rule's findings (the description's count is stale).
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js: the Miss and the duplicated list and scanner.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjs: passes; the 'image/*' case does not discriminate (note).

Automated review (maintainer link)

Comment on lines +378 to +379
exactly these imports and shrinks as they move behind the loader. Through
them DateRangeInput, PowerSearch and Table carry it too. A surface revealed

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.

Blocking (part of the Miss): TimeInput carries the touch runtime too. TimeInput/TouchTimeField.tsx:56 imports DateInput/Wheel, which reaches the animator through motion/reducedMotion, and the rule reports nothing for TimeInput. Please add TimeInput to this list, or have the rule report that import and allowlist it.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 711e616

@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 in the new rule and its description need fixes. INV13 as this stack proposes it ("Components do not import them statically") has an engineering owner's approval for this head, so the spec question is settled and only these findings remain:

  • Miss: internal/eslint-plugin-astryx/no-static-touch-runtime.js (lines 247-259) walks a component's import of another component's module without reporting it, so DateRangeInput, PowerSearch, Table and TimeInput carry the touch runtime with no finding of their own and a new component importing ../Calendar/Calendar passes, against the description, the README and INV13's gap line; please report an import that leaves its component folder for a module that reaches the runtime and allowlist the existing ones, or narrow those texts and add TimeInput to INV13's list of carriers.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js keeps its own touch-module list (line 52) and import scanner (lines 65-169) beside the ones in packages/core/src/utils/touchRuntime.boundary.test.ts (lines 22, 25-51 and 83-99), and the two already disagree on inline type-only imports and .js specifiers, so please have the boundary test import TOUCH_MODULES and staticImports from the rule module and delete its copies.
  • The description still says the allowlist lists 13 imports with follow-ups 6 to 9, but it has 14 entries, the last being AlertDialog's animator import with an unnumbered follow-up (no-static-touch-runtime.allowlist.json lines 56-59), so please update the count and name AlertDialog's entry and the change that removes it.

Non-blocking: INV13's verification row says "fails" twice (line 718), the 'image/*' test case also passes against a comment-stripping scanner, INV13's gap line says "these modules" though the rule checks only the animator and the gesture host, and the opt-in folder list is written in both eslint.config.js and the test.

Claims and files checked

Review mode: same-head; reason: none

Claims:

  • One primary intent, a lint guard with no product or API change: verified; no package source changes, and no package build reads the rule.
  • The rule stops a Core component from putting the touch runtime back in its first load: partly; imports of shared modules are reported, imports of another carrier component's module are not (Miss).
  • The imports that still do so are named in a shrink-only allowlist: verified; the rule's 14 findings equal the 14 entries.
  • A new static path from a component fails strict lint in pull request CI, with a message pointing to the touch loader: verified for paths through shared modules; the Lint workflow runs only for pull requests into main, so not in this pull request's checks today; false for paths through another component's module.
  • The first-load savings of the earlier pull requests cannot creep back: false while the cross-component gap stands.
  • Before, the boundary test checked a fixed list of component entries: verified (ten entries).
  • The rule is part of the existing lint step, with no new CI job: verified.
  • It walks every component entry and follows static imports inside component folders: verified.
  • It reports the import where a component file reaches a shared module, such as Calendar's hooks barrel import: verified.
  • Import and export-from are covered and relative paths resolved; type-only imports and import() are not edges: verified in the rule and its test cases.
  • The opt-in SnapPaging folder, which INV13 names, is a shared module, not an entry: verified; Swipe is configured the same way.
  • The allowlist lists 13 imports, each with a reason and the follow-up that removes it (follow-ups 6 to 9): false; it lists 14, and AlertDialog's entry names an unnumbered follow-up.
  • The test fails on a new import without an entry and on a stale entry: verified.
  • INV13's gap line names the same importers, including the two touch date fields, and its verification row and verified_by add the rule's test: verified for the importers and the row; its statement that the rule reports any other static path is false (Miss), and it leaves out TimeInput.
  • The miniature-tree cases report the shared-module and re-export paths, pass the type-only, import(), opt-in and allowlisted ones, and fail without the rule: verified; the three invalid cases expect errors.
  • The allowlist equals the rule's findings on the repository's own Core, and every entry has a reason and a removing change: verified.
  • ESLint over the component folders with allowlisted imports and the touched config passes: verified (no errors in strict mode).
  • The knowledge check passes: verified.
  • Each allowlisted import moves in its own follow-up: verified; every entry names one.
  • Public text contains no internal context: verified.
  • The record states what holds now: verified for tense; the gap line's coverage statement is false (above).

Files:

  • docs/architecture/react-component-runtime.md: the gap line misstates the rule's coverage and leaves out TimeInput (Miss); the verification row says "fails" twice and the gap line says "these modules" (notes).
  • eslint.config.js: clear; the opt-in list is repeated in the test (note).
  • internal/eslint-plugin-astryx/README.md: over-claims the rule's coverage (Miss).
  • internal/eslint-plugin-astryx/index.js: clear.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear; it matches the rule's findings (the description's count is stale).
  • internal/eslint-plugin-astryx/no-static-touch-runtime.js: the Miss and the duplicated list and scanner.
  • internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjs: passes; the 'image/*' case does not discriminate (note).

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — 711e616f 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