Repository navigation
perf(core): Calendar and the date and time fields import the defining hooks, not the hooks barrel - #11525
perf(core): Calendar and the date and time fields import the defining hooks, not the hooks barrel#11525cixzhang wants to merge 10 commits into
Conversation
… hooks, not the hooks barrel Calendar, NativeDateField, TouchDateField and TouchDateTimeField imported four small hooks through the hooks barrel, which re-exports the public useAnimator, usePanGesture and useDragToSnapPoints and with them the animator and the gesture host. They now import the defining modules. Calendar and DateRangeInput reach no touch module statically. The touch-runtime allowlist and the barrel baseline drop these imports; INV13's gap line drops the barrel clause.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec abbce22 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
Calendar, NativeDateField, TouchDateField and TouchDateTimeField now import useAnnounce, useGridFocus, useInputStatusIcon and useMergedRefs from their defining modules, so Calendar and DateRangeInput no longer reach the animator or the gesture host statically. The two new boundary cases fail on the base and pass on this head, the touch-runtime allowlist test passes with the four entries removed, and the built public API of every published package is unchanged. The INV13 gap-line edit carries an engineering owner's approval for this head.
Claims and files checked
- Claim: the four hooks no longer come through the
hooksbarrel. Verified:Calendar.tsx:33-34,NativeDateField.tsx:52-53,TouchDateField.tsx:77-78,TouchDateTimeField.tsx:49-50. - Claim: the barrel re-exports
useAnimator,usePanGestureanduseDragToSnapPoints, and with them the animator and the gesture host. Verified: on the base, the new boundary cases report chains throughhooks/index.tstomotion/animator.tsandgestures/GestureHost.ts. - Claim: each file imports the module that defines the hook. Verified:
hooks/useAnnounce.ts,hooks/useGridFocus.ts,hooks/useInputStatusIcon.tsx,hooks/useMergedRefs.ts. - Claim: import paths only, no behaviour change. Verified:
hooks/index.tsre-exports these same bindings. - Claim: Calendar and DateRangeInput reach no touch module statically. Verified:
touchRuntime.boundary.test.ts:114-115pass. - Claim: DateInput, TimeInput, DateTimeInput, PowerSearch and Table still carry it through the wheels. Verified: a static-graph walk of every component entry at this head.
- Claim: the four allowlist entries and the four barrel-baseline entries leave, and the allowlist only shrinks. Verified:
no-static-touch-runtime.test.mjspasses 10/10; a regenerated baseline drops exactly these four. - Claim: the INV13 gap line names Slider, Chat and the wheels, and through the wheels PowerSearch and Table. Verified:
docs/architecture/react-component-runtime.md:370-376. - Claim: the new boundary cases fail before the change. Verified: both fail on the base.
- Claim: the Calendar, DateInput, DateTimeInput, DateRangeInput and boundary suites pass. Verified: all pass.
- Claim: eslint passes on the four files and the knowledge check passes. Verified.
- Claim: the record text is present tense. Verified.
- File
docs/architecture/react-component-runtime.md: clear. - File
internal/eslint-plugin-astryx/no-internal-barrel-import.baseline.json: clear. - File
internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear. - File
packages/core/src/Calendar/Calendar.tsx: clear. - File
packages/core/src/DateInput/NativeDateField.tsx: clear. - File
packages/core/src/DateInput/TouchDateField.tsx: clear. - File
packages/core/src/DateTimeInput/TouchDateTimeField.tsx: clear. - File
packages/core/src/utils/touchRuntime.boundary.test.ts: clear.
|
/approve-spec 8840543 |
|
Decision: D-20261113-280 Records the owner's answer that the touch runtime loads once per page after first paint, never on demand, at 8840543. Calendar and the date and time fields stop loading it up front by importing four hooks directly; nothing a person sees changes. It waives nothing. |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is a draft; it runs once the pull request is marked ready for review.
Calendar, NativeDateField, TouchDateField and TouchDateTimeField now import useAnnounce, useGridFocus, useInputStatusIcon and useMergedRefs from their defining modules, so Calendar and DateRangeInput no longer reach the animator or the gesture host statically. The two new boundary cases fail on the base and pass on this head, the allowlist test fails if the four removed entries are left in, and the built public API of every published package is unchanged. The INV13 gap-line edit carries an engineering owner's approval for this head.
Claims and files checked
- Claim: the four hooks no longer come through the
hooksbarrel. Verified:Calendar.tsx:33-34,NativeDateField.tsx:52-53,TouchDateField.tsx:77-78,TouchDateTimeField.tsx:49-50. - Claim: the barrel re-exports
useAnimator,usePanGestureanduseDragToSnapPoints, and with them the animator and the gesture host. Verified:hooks/index.ts:134,:136,:159; on the base the new boundary cases report chains throughhooks/index.tstomotion/animator.tsandgestures/GestureHost.ts. - Claim: each file imports the module that defines the hook. Verified:
hooks/useAnnounce.ts,hooks/useGridFocus.ts,hooks/useInputStatusIcon.tsx,hooks/useMergedRefs.ts. - Claim: import paths only, the same hooks run, no behaviour change. Verified: the barrel re-exports these same bindings; the Calendar, DateInput, DateTimeInput and DateRangeInput suites pass.
- Claim: a page with a Calendar or a DateRangeInput no longer loads the touch runtime before first paint. Verified as a static import graph:
touchRuntime.boundary.test.ts:114-115pass. - Claim: DateInput, TimeInput, DateTimeInput, PowerSearch and Table still carry it, through the date and time wheels. Verified: a static-graph walk of every component entry at this head.
- Claim: the barrel rule's baseline listed these imports and they leave it. Verified: the baseline drops exactly the four
../hooksentries, and regenerating it from this head drops the same four. - Claim: the touch-runtime allowlist drops its four barrel entries and only shrinks. Verified: the rule test passes 10/10 and fails on exactly those four when they are left in.
- Claim: the INV13 gap line names Slider, Chat and the wheels, and through the wheels PowerSearch and Table. Verified:
docs/architecture/react-component-runtime.md:370-378. - Claim: the import-boundaries record backs importing the defining module. Verified in substance: the record keeps a public import's eager graph to what renders, and its one barrel sentence covers lazily loaded graphs; the repository-wide rule is the contributor guide and the barrel lint.
- Claim: the new boundary cases fail before the change. Verified: both fail on the base.
- Claim: the named suites and the boundary test pass, 1,525 tests. Verified: 1,507 component tests plus 18 boundary cases.
- Claim: eslint passes on the four files and the knowledge check passes. Verified.
- Claim: the record text is present tense. Verified for the changed lines.
- File
docs/architecture/react-component-runtime.md: clear. - File
internal/eslint-plugin-astryx/no-internal-barrel-import.baseline.json: clear. - File
internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear. - File
packages/core/src/Calendar/Calendar.tsx: clear. - File
packages/core/src/DateInput/NativeDateField.tsx: clear. - File
packages/core/src/DateInput/TouchDateField.tsx: clear. - File
packages/core/src/DateTimeInput/TouchDateTimeField.tsx: clear. - File
packages/core/src/utils/touchRuntime.boundary.test.ts: clear.
There was a problem hiding this comment.
Changes requested: the touch-runtime rule test is red at this head, and the pull request's Testing section says it passes.
- Regression:
internal/eslint-plugin-astryx/no-static-touch-runtime.test.mjsfails "lists every import that reaches the runtime" on fourSwipe/useSwipeAction.tsimports that arrived with the base-branch merge and are in neither the allowlist nor the opt-in lists, so "the rule test passes … 10/10 after the guardrail merge" is not true at this head.
The smallest fix, on the branch that owns the lint, is Swipe beside SnapPaging in both opt-in lists (optInFolders in eslint.config.js and the test's own list in no-static-touch-runtime.test.mjs), which turns the test green here; then update the Testing section to this head's results. The import swaps themselves check out: they bind the same hook functions, the two new boundary cases fail on the base and pass here, and no published package's public surface changes. CI has not run at this head because the pull request is a draft.
Claims and files checked
- Claim: the four hooks no longer come through the
hooksbarrel. Verified:Calendar.tsx:33-34,NativeDateField.tsx:52-53,TouchDateField.tsx:77-78,TouchDateTimeField.tsx:49-50. - Claim: the barrel re-exports the public animator and gesture hooks, and with them the animator and the gesture host. Verified:
hooks/index.ts:134,:136,:159; on the base the new boundary cases report chains throughhooks/index.tstomotion/animator.tsandgestures/GestureHost.ts. - Claim: each file imports the module that defines the hook. Verified:
hooks/useAnnounce.ts:317,hooks/useGridFocus.ts:208,hooks/useInputStatusIcon.tsx:129,hooks/useMergedRefs.ts:24. - Claim: import paths only, the same hooks run, no behavior change. Verified: the barrel re-exports these same bindings (
hooks/index.ts:15,:25,:68,:122), and the Calendar, DateInput, DateTimeInput and DateRangeInput suites pass. - Claim: a page with a Calendar or a DateRangeInput no longer loads the touch runtime before first paint. Verified as a static import graph:
touchRuntime.boundary.test.ts:114-115pass at this head and fail on the base. - Claim: DateInput, TimeInput, DateTimeInput, PowerSearch and Table still carry it through the date and time wheels. Verified: a static-graph walk of every component entry at this head.
- Claim: the barrel rule's baseline listed these imports and they leave it. Verified: regenerating the baseline from this head's source drops exactly these four entries.
- Claim: the touch-runtime allowlist drops its four barrel entries and only shrinks. Verified: the shrink-only case fails on exactly those four when they are left in.
- Claim: the two new boundary cases fail on the guardrail branch's head. Verified: 2 of 18 fail on the base.
- Claim: the rule's real-tree test fails on the stale allowlist entries until they are removed. Verified.
- Claim: the named suites and the boundary test pass, 1,525 tests. Verified in substance, with a different count after the merge: 1,580 pass, none fail.
- Claim: the rule test passes 9/9 here and 10/10 after the guardrail merge. False at this head: 9 passed, 1 failed (the finding above).
- Claim: eslint passes on the four files, and the knowledge check passes. Verified.
- Claim: the INV13 gap sentence names Slider, Chat and the wheels, and through the wheels PowerSearch and Table. Verified against this head's import graph.
- Claim: the import-boundaries record backs importing the defining module. Partly: that record's barrel clause covers lazily loaded graphs; the repository-wide rule is the contributor guide and the barrel lint.
- Claim: the record text is present tense. Verified for the changed lines.
- File
docs/architecture/react-component-runtime.md: clear. - File
internal/eslint-plugin-astryx/no-internal-barrel-import.baseline.json: clear; nine entries are already stale on the base, outside this change. - File
internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear. - File
packages/core/src/Calendar/Calendar.tsx: clear. - File
packages/core/src/DateInput/NativeDateField.tsx: clear. - File
packages/core/src/DateInput/TouchDateField.tsx: clear. - File
packages/core/src/DateTimeInput/TouchDateTimeField.tsx: clear. - File
packages/core/src/utils/touchRuntime.boundary.test.ts: clear.
|
/approve-spec e5c59a2 |
|
/approve-spec c9f1a79 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is a draft; it runs once the pull request is marked ready for review.
Calendar and the three date and time fields now import four hooks from their defining modules, so Calendar and DateRangeInput no longer reach the animator or the gesture host statically; the two new boundary cases fail on the base and pass here, and no published package's public surface changes. The touch-runtime rule test that failed at the previous head now passes 10 of 10, with the base-branch fix for its Swipe imports merged in. Non-blocking: the Testing section's "1,525 passed" predates the base-branch merges; the same suites run 1,580 tests here, all passing.
Claims and files checked
- Claim: Calendar and the three fields stop importing four small hooks through the
hooksbarrel. Verified:Calendar.tsx:33-34,NativeDateField.tsx:52-53,TouchDateField.tsx:77-78,TouchDateTimeField.tsx:49-50. - Claim: the barrel re-exports the public animator and gesture hooks, and with them the animator and the gesture host. Verified:
hooks/index.ts:134,:136,:159; on the base the new boundary cases report chains throughhooks/index.tstomotion/animator.tsandgestures/GestureHost.ts. - Claim: each file now imports the module that defines the hook. Verified:
hooks/useAnnounce.ts:317,hooks/useGridFocus.ts:208,hooks/useInputStatusIcon.tsx:129,hooks/useMergedRefs.ts:24. - Claim: import paths only, the same hooks run, no behavior change. Verified: the barrel re-exports these same bindings (
hooks/index.ts:15,:25,:68,:122), and the Calendar, DateInput, DateTimeInput and DateRangeInput suites pass. - Claim: a page with a Calendar or a DateRangeInput no longer loads the touch runtime before first paint. Verified as a static import graph:
touchRuntime.boundary.test.ts:114-115pass here and fail on the base. - Claim: DateInput, TimeInput, DateTimeInput, PowerSearch and Table still carry it through the date and time wheels. Verified: a static-graph walk of every component entry at this head.
- Claim: the barrel rule's baseline listed these imports and they leave it. Verified: regenerating the baseline from this head's source drops exactly these four entries.
- Claim: the touch-runtime allowlist drops its four barrel entries and only shrinks. Verified: the shrink-only case fails on exactly those four when they are left in.
- Claim: the record's gap sentence now names Slider, Chat and the date and time wheels, and through the wheels PowerSearch and Table. Verified:
react-component-runtime.md:369-375and this head's allowlist and import graph. - Claim: the touch-modules invariant and the import-boundaries record govern the change. Verified for the touch-modules invariant; the import-boundaries record backs it in purpose, while its barrel clause covers lazily loaded graphs and the repository-wide rule is the contributor guide and the barrel lint.
- Claim: the two new boundary cases fail on the guardrail branch's head. Verified: 2 of 18 fail on the base.
- Claim: the rule's real-tree test fails on the stale allowlist entries until they are removed. Verified.
- Claim: the named suites and the boundary test pass, 1,525 tests. Verified in substance: 1,580 pass at this head, none fail.
- Claim: the rule test passes 10/10 after the guardrail merge. Verified at this head: 10 of 10.
- Claim: eslint passes on the changed files, and the knowledge check passes. Verified.
- Claim: the record text is present tense. Verified for the changed lines.
- File
docs/architecture/react-component-runtime.md: clear. - File
internal/eslint-plugin-astryx/no-internal-barrel-import.baseline.json: clear. - File
internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear. - File
packages/core/src/Calendar/Calendar.tsx: clear. - File
packages/core/src/DateInput/NativeDateField.tsx: clear. - File
packages/core/src/DateInput/TouchDateField.tsx: clear. - File
packages/core/src/DateTimeInput/TouchDateTimeField.tsx: clear. - File
packages/core/src/utils/touchRuntime.boundary.test.ts: clear.
There was a problem hiding this comment.
Changes requested: the touch-runtime checks are red at this head, and the Testing section says they pass.
- Regression: the base-branch merge brings in AlertDialog's
useAlertMotion.ts, whose static import of../motion/animator(line 27) makes the boundary test fail "AlertDialog/index.ts reaches no touch module statically" (17 of 18) and the touch-runtime rule test fail "lists every import that reaches the runtime" (9 of 10), so the Testing claims are false here and the INV13 gap sentence this pull request rewrites leaves AlertDialog out.
The fix belongs in the guardrail branch: move AlertDialog's motion behind the touch loader, or allowlist that import and name AlertDialog in the gap sentence, then merge it here and refresh the Testing section. This pull request's own change is otherwise sound: the two new boundary cases fail on the base and pass here, the allowlist and baseline shrink by exactly the four barrel entries, and no published package's public surface changes.
Claims and files checked
Review mode: full; reason: merge-touches-pr-files
- Claim: Calendar and the three fields stop importing four small hooks through the
hooksbarrel. Verified:Calendar.tsx:33-34,NativeDateField.tsx:52-53,TouchDateField.tsx:77-78,TouchDateTimeField.tsx:49-50. - Claim: the barrel re-exports the public animator and gesture hooks, and with them the animator and the gesture host. Verified:
hooks/index.ts:134,:136,:159; on the base the new boundary cases report chains throughhooks/index.tstomotion/animator.ts. - Claim: import paths only, the same hooks run, no behavior change. Verified: the barrel re-exports these same bindings (
hooks/index.ts:15,:25,:68,:122), the Calendar, DateInput, DateTimeInput and DateRangeInput suites pass, and the API report shows no change. - Claim: a page with a Calendar or a DateRangeInput no longer loads the touch runtime before first paint. Verified as a static import graph:
touchRuntime.boundary.test.ts:114-115pass here and fail on the base. - Claim: DateInput, TimeInput, DateTimeInput, PowerSearch and Table still carry it through the date and time wheels. Verified by a static-graph walk of every component entry; AlertDialog now carries it too, through the base branch.
- Claim: the barrel rule's baseline listed these imports and they leave it. Verified: the baseline changes by exactly these four entries.
- Claim: the touch-runtime allowlist drops its four barrel entries and only shrinks. Verified: the shrink-only case fails on exactly those four when they are left in.
- Claim: the record's gap sentence now names Slider, Chat and the date and time wheels, and through the wheels PowerSearch and Table. The text is as stated (
react-component-runtime.md:369-377); at this head it omits AlertDialog (finding above). - Claim: the touch-modules invariant and the import-boundaries record govern the change. Verified for the touch-modules invariant; the import-boundaries record's barrel clause covers lazily loaded graphs.
- Claim: the two new boundary cases fail on the guardrail branch's head. Verified.
- Claim: the rule's real-tree test fails on the stale allowlist entries until they are removed. Verified.
- Claim: the named suites and the boundary test pass. False at this head: 1,579 pass and the AlertDialog boundary case fails.
- Claim: the rule test passes 10/10 after the guardrail merge. False at this head: 9 of 10.
- Claim: eslint passes on the changed files. Verified.
- Claim: the knowledge check passes. Verified.
- Claim: the record text is present tense. Verified for the changed lines.
- File
docs/architecture/react-component-runtime.md: finding (the gap sentence omits AlertDialog). - File
internal/eslint-plugin-astryx/no-internal-barrel-import.baseline.json: clear. - File
internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear. - File
packages/core/src/Calendar/Calendar.tsx: clear. - File
packages/core/src/DateInput/NativeDateField.tsx: clear. - File
packages/core/src/DateInput/TouchDateField.tsx: clear. - File
packages/core/src/DateTimeInput/TouchDateTimeField.tsx: clear. - File
packages/core/src/utils/touchRuntime.boundary.test.ts: clear (its failing case is AlertDialog's, from the base branch).
# Conflicts: # docs/architecture/react-component-runtime.md
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the CI workflow runs only for pull requests into main that are ready for review; it runs once this pull request is retargeted and marked ready.
Calendar and the three date and time fields now import four hooks from their defining modules, so Calendar and DateRangeInput no longer reach the animator or the gesture host statically; the two new boundary cases fail on the base and pass here, and no published package's public surface changes. The touch-runtime checks that were red at the previous revision now pass, because the base-branch merge allowlists AlertDialog's import and names AlertDialog in the gap sentence.
Non-blocking: the Testing section's "1,525 passed" predates the base-branch merges; the same suites now run 1,579 tests, all passing.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: Calendar and the three fields stop importing four hooks through the
hooksbarrel and import their defining modules. Verified:Calendar.tsx:33-34,NativeDateField.tsx:52-53,TouchDateField.tsx:77-78,TouchDateTimeField.tsx:49-50. - Claim: the barrel re-exports the public animator and gesture hooks, and with them the animator and the gesture host. Verified:
hooks/index.ts:134,:136,:159; on the base the new boundary cases report chains throughhooks/index.tstomotion/animator.tsandgestures/GestureHost.ts. - Claim: import paths only, the same hooks run, no behavior change. Verified: the barrel re-exports these same bindings (
hooks/index.ts:15,:25,:68,:122), the named suites pass, and the built public surface shows no change. - Claim: a page with a Calendar or a DateRangeInput no longer loads the touch runtime before first paint. Verified as a static import graph:
touchRuntime.boundary.test.ts:113-114pass here and fail on the base. - Claim: DateInput, TimeInput, DateTimeInput, PowerSearch and Table still carry it through the date and time wheels. Verified by a static-graph walk of every component entry.
- Claim: the barrel rule's baseline listed these imports and they leave it. Verified: the baseline changes by exactly these four entries.
- Claim: the touch-runtime allowlist drops its four barrel entries and only shrinks. Verified: the shrink-only case fails on exactly those four when they are left in.
- Claim: the record's gap sentence drops the barrel clause and names Slider, Chat and the date and time wheels, and through the wheels PowerSearch and Table. Verified for this pull request's edit (
react-component-runtime.md:369-377); the AlertDialog entry before them comes from the base branch. - Claim: the touch-modules invariant and the import-boundaries record govern the change. Verified for the touch-modules invariant; the import-boundaries record governs what a public import reaches eagerly, and its literal barrel clause covers lazily loaded graphs.
- Claim: the change is four component files, the two lint data files, the boundary test and the invariant. Verified: 8 files.
- Claim: the scope is Calendar, DateInput and DateTimeInput. Verified.
- Claim: one primary intent, nothing separable, and no internal context in public text. Verified.
- Claim: the two new boundary cases fail on the guardrail branch's head. Verified.
- Claim: the rule's real-tree test fails on the stale allowlist entries until they are removed. Verified.
- Claim: the named suites and the boundary test pass. Verified: 1,579 tests pass at this head; the stated 1,525 is from an earlier revision (non-blocking).
- Claim: the rule test passes 10/10 after the guardrail merge. Verified at this head.
- Claim: eslint passes on the changed files. Verified, in strict mode.
- Claim: the knowledge check passes. Verified.
- Claim: the changed record text is in the present tense. Verified.
- Claim: the pull request lands in stack order after the pull requests below it. A process statement, not a code claim; no finding.
- File
docs/architecture/react-component-runtime.md: clear. - File
internal/eslint-plugin-astryx/no-internal-barrel-import.baseline.json: clear. - File
internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear. - File
packages/core/src/Calendar/Calendar.tsx: clear. - File
packages/core/src/DateInput/NativeDateField.tsx: clear. - File
packages/core/src/DateInput/TouchDateField.tsx: clear. - File
packages/core/src/DateTimeInput/TouchDateTimeField.tsx: clear. - File
packages/core/src/utils/touchRuntime.boundary.test.ts: clear.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the CI workflow runs only for pull requests into main that are ready for review; it runs once this pull request is retargeted and marked ready.
Calendar and the three date and time fields import four hooks from their defining modules, so Calendar and DateRangeInput no longer reach the animator or the gesture host statically. The latest push only merges the base branch, which leaves this pull request's own changes identical, and the boundary, touch-runtime and barrel checks still pass here.
Non-blocking: the Testing section's "1,525 passed" predates the base-branch merges; the same suites now run 1,579 tests, all passing.
Claims and files checked
Review mode: carry-forward; reason: none
- Claim: Calendar and the three fields stop importing four hooks through the
hooksbarrel and import their defining modules. Verified:Calendar.tsx:33-34,NativeDateField.tsx:52-53,TouchDateField.tsx:77-78,TouchDateTimeField.tsx:49-50. - Claim: the barrel re-exports the public animator and gesture hooks, and with them the animator and the gesture host. Verified:
hooks/index.ts:134,:136,:159; on the base the new boundary cases report chains throughhooks/index.tstomotion/animator.tsandgestures/GestureHost.ts. - Claim: import paths only, the same hooks run, no behavior change. Verified: the barrel re-exports these same bindings (
hooks/index.ts:15,:25,:68,:122), the named suites pass, and the built public surface shows no change. - Claim: a page with a Calendar or a DateRangeInput no longer loads the touch runtime before first paint. Verified as a static import graph:
touchRuntime.boundary.test.ts:113-114pass here and fail on the base. - Claim: DateInput, TimeInput, DateTimeInput, PowerSearch and Table still carry it through the date and time wheels. Verified by a static-graph walk of every component entry.
- Claim: the barrel rule's baseline listed these imports and they leave it. Verified: the baseline changes by exactly these four entries.
- Claim: the touch-runtime allowlist drops its four barrel entries and only shrinks. Verified: the shrink-only case fails on exactly those four when they are left in.
- Claim: the record's gap sentence drops the barrel clause and names Slider, Chat and the date and time wheels, and through the wheels PowerSearch and Table. Verified for this pull request's edit (
react-component-runtime.md:372-378); the AlertDialog entry before them comes from the base branch. - Claim: the touch-modules invariant and the import-boundaries record govern the change. Verified for the touch-modules invariant; the import-boundaries record governs what a public import reaches eagerly, and its literal barrel clause covers lazily loaded graphs.
- Claim: the change is four component files, the two lint data files, the boundary test and the invariant. Verified: 8 files.
- Claim: the scope is Calendar, DateInput and DateTimeInput. Verified.
- Claim: one primary intent, nothing separable, and no internal context in public text. Verified.
- Claim: the two new boundary cases fail on the guardrail branch's head. Verified.
- Claim: the rule's real-tree test fails on the stale allowlist entries until they are removed. Verified.
- Claim: the named suites and the boundary test pass. Verified: 1,579 tests pass; the stated 1,525 is from an earlier revision (non-blocking).
- Claim: the rule test passes 10/10 after the guardrail merge. Verified at this head.
- Claim: eslint passes on the changed files. Verified, in strict mode.
- Claim: the knowledge check passes. Verified at this head.
- Claim: the changed record text is in the present tense. Verified.
- Claim: the pull request lands in stack order after the pull requests below it. A process statement, not a code claim; no finding.
- File
docs/architecture/react-component-runtime.md: clear. - File
internal/eslint-plugin-astryx/no-internal-barrel-import.baseline.json: clear. - File
internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json: clear. - File
packages/core/src/Calendar/Calendar.tsx: clear. - File
packages/core/src/DateInput/NativeDateField.tsx: clear. - File
packages/core/src/DateInput/TouchDateField.tsx: clear. - File
packages/core/src/DateTimeInput/TouchDateTimeField.tsx: clear. - File
packages/core/src/utils/touchRuntime.boundary.test.ts: clear.
|
/approve-spec a7c33f6 |
Primary intent
Performance, stacked on #11518 (the guardrail): Calendar and the date and time fields' own fields stop importing four small hooks through the
hooksbarrel. The barrel re-exports the publicuseAnimator,usePanGestureanduseDragToSnapPoints, and with them the animator and the gesture host. They now import the defining modules. It's import paths only, with no behavior change.User or maintainer impact
Problem and solution fit
Calendar.tsximporteduseAnnounceanduseGridFocusfrom../hooks.NativeDateField.tsx,TouchDateField.tsxandTouchDateTimeField.tsximporteduseInputStatusIconanduseMergedRefsfrom it. Each now imports the module that defines the hook.-> hooks/index.tsentries (the list only shrinks).Authority
architecture:react-component-runtimeINV13 (the gap line drops the barrel clause and now reads: Slider, Chat, and the date and time fields' wheels; through the wheels, PowerSearch and Table) andarchitecture:component-import-boundaries(import the defining module).Change and evidence
no-static-touch-runtime.allowlist.json,no-internal-barrel-import.baseline.json, the boundary test, and INV13.Bundle comparison (base #11518 head 711e616 → head a7c33f6)
pnpm size:pages --base 711e616f --head a7c33f6d --page dates=Calendar,DateInput,TimeInput,DateTimeInput, first-load JavaScript, minified / gzip bytes:The minified bytes are the same on every page. The change only points imports at the defining modules, so the bundler emits the same code. On the dates page, gzip changes by 486 bytes because the modules are placed in a different order. This comparison covers first-load code; the touch runtime that loads later is not measured here.
Scope
Components: Calendar, DateInput (NativeDateField, TouchDateField), DateTimeInput (TouchDateTimeField)
Testing
utils/touchRuntime.boundary.test.tsadds the Calendar and DateRangeInput entries, which fail on lint: no-static-touch-runtime keeps the touch runtime out of Core components' first load #11518's head. The rule's real-tree test fails on the stale allowlist entries until they're removed.check:knowledgepasses.Writing rubric results
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.