Repository navigation
Conversation
…ch runtime PickerWheel's pan, catch and tap are a runtime part it renders once the runtime has loaded, and wheelStrip takes its motion engine from the runtime at its first call after the load; before that the strip is placed directly and every move lands at once. So DateInput, TimeInput, DateTimeInput, PowerSearch and Table reach no touch module statically. Before the load a wheel turns by its keys, a mouse wheel's notches and a click on a row, at once, with no drag, no coast and no snap. INV13, DateInput FR15 and TimeInput FR7 state it; the gap line drops the wheels.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 2d4afce |
|
Decision: D-20261113-300 Records the owner's answer that the touch runtime loads once per page after first paint, never on demand, for the date and time wheels at 2d4afce. Until it loads, a wheel turns by its keys, a mouse wheel's notches and a click on a row, at once, with no drag, coast or snap; this pre-load behavior is also on the owner's queued pre-load card. It waives nothing. |
There was a problem hiding this comment.
Changes requested: one fix in the wheel strip's handover to the touch runtime.
Blocking
- After the touch runtime loads,
attachinpackages/core/src/DateInput/wheelStrip.ts:168-171still writes the placed strip's frozen pre-loadtranslate, so a wheel shown before the load that later rests on its first row draws its old row after a Suspense or<Activity>hide and reveal; write the placed translate only while no engine exists and add a re-attach test.
The spec changes are approved at this head, the new boundary and before-load tests fail on the base branch and pass here, and no public API changes. Non-blocking notes are inline.
Claims and files checked
- Claim: the date, time and date-time fields, PowerSearch and Table reach no touch module statically. Verified: the five new boundary entries pass here and fail on the base branch.
- Claim: the wheel's drag, catch and tap become a runtime part that mounts after the load and calls the same handlers. Verified:
PickerWheel.tsx:705-801,touchRuntimeModules.tsx:714-761. - Claim: the strip is placed by its translate until the load, then takes the runtime's motion engine on the same element and offset. Verified:
wheelStrip.ts:135-175; a probe shows the handover keeps the offset. - Claim: no behavior changes after the load. False on one path: a re-attach after the handover (
wheelStrip.ts:168-171), the blocking finding. - Claim: no API change. Verified: the API generator lists no rows for any published package.
- Claim: before the load a sheet wheel turns by keys, mouse-wheel notches and a row click, at once, with no drag, coast or snap. Verified: the new
PickerWheeltest (keys, drag);PickerWheel.tsx:913-934anduseWheelListbox.ts:109(notch, click). - Claim: a drag in flight at the load does nothing and the next one turns the wheel. Consistent with the loader's contract (
touchRuntime.ts:24-25); not separately tested. - Claim: rows were already listbox options with their own click. Verified:
useWheelListbox.ts:109. - Claim: three allowlist entries are left and the runtime record's gap line names only Slider and Chat. Verified.
- Claim: the date and time records carry the same before-load line. Verified: DateInput FR15, TimeInput FR7.
- Claim: the new tests fail first on the parent branch. Verified: 6 fail there.
- Claim: the date, time and runtime suites pass (1,330), and typecheck, lint and the knowledge check pass. Verified; the bundle script tests were not re-run.
- Files:
wheelStrip.tsblocking finding;PickerWheel.tsxtwo non-blocking notes;DateInput.spec.mdandTimeInput.spec.mdone non-blocking note;touchRuntimeModules.tsx,react-component-runtime.md, the allowlist,PickerWheel.test.tsx,wheelStrip.test.ts,DateInputTouch.test.tsxandtouchRuntime.boundary.test.tsclear.
| attach: (element: HTMLElement | null): void => { | ||
| placed.attach(element); | ||
| motionEngine()?.attach(element); | ||
| }, |
There was a problem hiding this comment.
Blocking. Once the engine exists, placed.y no longer follows the strip, but this still calls placed.attach(element), which writes the old pre-load translate onto the node. When the engine is at rest on offset 0 after a direct set (a park as the wheel is shown again), its own attach writes nothing for that default channel, so the stale value stays. Through PickerWheel: a minute wheel at 05 before the load, then after it hidden, set to 00 and shown, then hidden and revealed by a Suspense boundary or <Activity>, shows 05 under the band while aria-selected is 00.
attach: (element: HTMLElement | null): void => {
if (engine == null) {
placed.attach(element);
}
motionEngine()?.attach(element);
},A wheelStrip.test.ts case would pin it: place, load, setOffset(0), attach(null), attach(element), expect no translate.
| <touchRuntime.WheelGestures | ||
| columnRef={columnRef} | ||
| isActive={isActive} | ||
| onTouchDown={time => onTouchDownRef.current(time)} |
There was a problem hiding this comment.
Non-blocking: WheelGestures already keeps its handlers through useCommittedRefInto, so this can be onTouchDown={onTouchDown}, and the layout-effect copy into onTouchDownRef (lines 676-679) can go.
| // The wheel's drag, its catch and its tap come with the shared touch | ||
| // runtime, which loads after first paint. Until then a wheel turns by its | ||
| // keys and by a click on a row, with no drag and no spin. |
There was a problem hiding this comment.
Non-blocking: the list leaves out the mouse wheel. Suggest: "The wheel's drag, catch and tap come with the shared touch runtime, which loads after first paint. Until then a wheel turns by its keys, a mouse wheel's notches and a click on a row, at once."
# Conflicts: # docs/specs/components/TimeInput/TimeInput.spec.md
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the record changes, and two fixes are needed.
The before-load wheel lines in the React component runtime, DateInput and TimeInput records are not on main, and the earlier spec approval names the previous head, so an engineering owner records the decision for this head by commenting /approve-spec with the current head's full SHA (the author may, as an engineering owner). That decision should also settle DateInput FR14, which still says a wheel turns onto a value changed from outside "rather than jump to it", while before the load such a change lands at once.
Blocking
- After the touch runtime loads,
attachinpackages/core/src/DateInput/wheelStrip.ts:168-171still writes the placed strip's frozen pre-loadtranslate, so a wheel shown before the load that later rests on its first row shows its old row after a Suspense or<Activity>hide and reveal; write the placed translate only while no engine exists, and add a re-attach test. - Regression: the Testing section says the rule tests pass, but at this head the touch-runtime rule's real-tree test fails on three
Swipe/useSwipeAction.tsimports that came in with the base-branch merge (it fails the same way on the base); correct that line, and fix the allowlist on the base branch before this lands.
The new boundary and before-load tests fail on the base branch and pass here, no public API changes, and the earlier non-blocking inline notes still apply.
Claims and files checked
- Claim: the date, time and date-time fields, PowerSearch and Table reach no touch module statically. Verified: the five new boundary entries fail on the base branch and pass here (
touchRuntime.boundary.test.ts:116-120). - Claim: the wheel's drag, catch and tap become a runtime part that mounts after the load and calls the same handlers. Verified:
PickerWheel.tsx:702-802,touchRuntimeModules.tsx:249-296. - Claim: the strip is placed by its translate until the load, then takes the runtime's motion engine on the same element and offset. Verified:
wheelStrip.ts:135-175. - Claim: no behavior changes after the load. False on one path: a re-attach after the load (
wheelStrip.ts:168-171), the first blocking finding. - Claim: no API change. Verified: the API surface generator lists no changed rows for any published package.
- Claim: before the load a sheet wheel turns by keys, mouse-wheel notches and a row click, at once, with no drag, coast or snap. Verified: the new
PickerWheel.test.tsxcase;PickerWheel.tsx:908-934anduseWheelListbox.ts:109. - Claim: a drag already moving at the load does nothing and the next one turns the wheel. Consistent with the gesture part mounting only after the load; not separately tested.
- Claim: rows were already listbox options with their own click. Verified:
useWheelListbox.ts:109. - Claim: three allowlist entries are left and the runtime record's gap line names only Slider and Chat. Verified.
- Claim: the DateInput and TimeInput records carry the same before-load line. Verified: DateInput FR15, TimeInput FR7.
- Claim: the governing records are the runtime record's INV13, DateInput FR15, TimeInput FR7 and the stylesheet spec's amended DEC-5. They are proposed here or on the base branch, not on
main, and the spec approval does not cover this head. - Claim: the new tests fail first on the parent branch. Verified: six fail on the base branch.
- Claim: the date, time and runtime suites pass, and typecheck, lint and the knowledge check pass. Verified here.
- Claim: the rule and bundle script tests pass. The bundle script test passes; the rule's real-tree test fails, the second blocking finding.
- Files:
wheelStrip.tsblocking finding;PickerWheel.tsxtwo non-blocking notes;react-component-runtime.md,DateInput.spec.mdandTimeInput.spec.mdwait on the owner decision;touchRuntimeModules.tsx, the allowlist,PickerWheel.test.tsx,wheelStrip.test.ts,DateInputTouch.test.tsxandtouchRuntime.boundary.test.tsclear.
|
/approve-spec 6a6a75c |
|
/approve-spec 7667b1a |
There was a problem hiding this comment.
Changes requested. The spec half is settled at this head, so what is left is two behavior fixes and one sentence in the description.
- Before the shared touch runtime loads, a sheet wheel whose value changes from outside jumps instead of turning, which
component:DateInputFR14 forbids and no record states: with the runtime reset, a change from hour 10 to 14 lands in zero animation frames (packages/core/src/DateInput/wheelStrip.ts:341-345), and in 12-hourTimeInputone arrow key on the hour wheel makes the AM/PM wheel jump a half-day; either state the before-load exception in FR14 or keep the turn before the load. - After the load,
attachstill writes the frozen pre-loadtranslate(packages/core/src/DateInput/wheelStrip.ts:168-171), so a wheel shown before the load and later parked on its first row shows the old row under the band after a Suspense or<Activity>reveal whilearia-selectednames the new one; guard the placed write withif (engine == null)and pin it with awheelStrip.test.tscase (place, load,setOffset(0),attach(null),attach(element), expect no translate). - "No behavior changes after the load" is not true while that re-attach path stands; correct the claim or fix the path.
Two smaller, non-blocking points: onTouchDownRef and its layout effect (PickerWheel.tsx:675-679) are redundant now that WheelGestures holds its handlers in a committed ref, and the comment at PickerWheel.tsx:702-704 leaves out the mouse wheel.
Everything else checks out: no public API change, the five new boundary entries and the before-load case fail on the base and pass here, and the component suites, typecheck, lint, knowledge check and bundle script tests pass.
Claims and files checked
- Claim: the wheels reach no touch module statically, so DateInput, TimeInput, DateTimeInput, PowerSearch and Table carry none in a first load — verified (the five boundary entries fail on the base, pass here; the allowlist keeps only Slider and Chat).
- Claim: before the load a wheel turns by keys, notches and a row click, at once, with no drag, coast or snap — verified (new
PickerWheel.test.tsxcase, plus the notch listener and the rows' own click). - Claim: a drag in flight at the load does nothing and the next one turns the wheel — verified (the gesture part mounts only after the load).
- Claim: no behavior changes after the load — false (the re-attach path above).
- Claim: no API change — verified (the surface generator reports no row in either tree).
- Claim: red-first tests fail on the stacked base — verified (6 failures there, all passing here).
- Claim: the component and touch-runtime suites pass (about 1,330) — verified (33 files, 1,426 tests pass at this head).
- Claim: typecheck, lint and the knowledge check pass — verified.
- Claim: the rule and bundle script tests pass — verified at this head.
- Files:
docs/architecture/react-component-runtime.md(INV13 before-load clause and gap line, approved here);docs/specs/components/DateInput/DateInput.spec.md(FR15 sentence, approved; FR14 left unamended — finding);docs/specs/components/TimeInput/TimeInput.spec.md(FR7 sentence plus table re-padding, approved);internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json(two wheel entries removed, consistent with the gap line);packages/core/src/DateInput/PickerWheel.tsx(gesture wiring moved out, type-only imports, fragment with the gesture part — clear apart from the two non-blocking notes);packages/core/src/DateInput/wheelStrip.ts(animator facade and placed strip — both findings);packages/core/src/utils/touchRuntimeModules.tsx(WheelGestures,createMotionEngine— clear);packages/core/src/DateInput/PickerWheel.test.tsx,wheelStrip.test.ts,DateInputTouch.test.tsx,packages/core/src/utils/touchRuntime.boundary.test.ts(runtime loaded inbeforeAll, new before-load and boundary cases — clear, though no case pins the re-attach path).
| attach: (element: HTMLElement | null): void => { | ||
| placed.attach(element); | ||
| motionEngine()?.attach(element); | ||
| }, |
There was a problem hiding this comment.
Blocking. placed.y stops following the strip once the engine exists, but this still calls placed.attach(element), which writes the old pre-load translate onto the node. With the engine at rest on offset 0 after a park, its own attach writes nothing for that default channel, so the stale value stays. Reproduced at this head on the same node and on a replacement node: 0px -140px with the strip at offset 0 (a non-zero park re-attaches correctly). Through PickerWheel: a minute wheel at 05 before the load, then hidden, set to 00 and shown, then hidden and revealed by a Suspense boundary or <Activity>, shows 05 under the band while aria-selected is 00.
attach: (element: HTMLElement | null): void => {
if (engine == null) {
placed.attach(element);
}
motionEngine()?.attach(element);
},A wheelStrip.test.ts case would pin it: place, load, setOffset(0), attach(null), attach(element), expect no translate.
| const motionNow = motionEngine(); | ||
| // What Reduce Motion makes of a transition: null while motion plays. | ||
| // Momentum is never substituted. | ||
| const fade = momentum ? null : reducedMotionFade(element, {touchRelease}); | ||
| const endMs = fade == null ? curve.duration * 1000 : fade.duration; | ||
| if (!(endMs > 0)) { | ||
| if (!(endMs > 0) || motionNow == null) { |
There was a problem hiding this comment.
Blocking. While no engine exists every move lands at once, including a value changed from outside, which component:DateInput FR14 forbids: "MUST turn onto the new row rather than jump to it, on springs.settle from rest". With the runtime reset, a shown hour wheel going from 10 to 14 produces no animation frames and translate: 0px -392px immediately, where the committed FR14 case requires at least four intermediate frames; in 12-hour TimeInput an arrow key on the hour wheel reaches it before the load, so AM/PM jumps a half-day (FR7 routes that through FR14). The approved before-load sentences cover keys, notches and row clicks only. Either name the exception in FR14, or keep the turn before the load by placing the strip over the curve's frames.
| <touchRuntime.WheelGestures | ||
| columnRef={columnRef} | ||
| isActive={isActive} | ||
| onTouchDown={time => onTouchDownRef.current(time)} |
There was a problem hiding this comment.
Non-blocking: WheelGestures already keeps its handlers through useCommittedRefInto, so this can be onTouchDown={onTouchDown}, and the layout-effect copy into onTouchDownRef (lines 675-679) can go.
| // The wheel's drag, its catch and its tap come with the shared touch | ||
| // runtime, which loads after first paint. Until then a wheel turns by its | ||
| // keys and by a click on a row, with no drag and no spin. |
There was a problem hiding this comment.
Non-blocking: the list leaves out the mouse wheel. Suggest: "The wheel's drag, catch and tap come with the shared touch runtime, which loads after first paint. Until then a wheel turns by its keys, a mouse wheel's notches and a click on a row, at once."
# Conflicts: # docs/architecture/react-component-runtime.md
|
/approve-spec 6e3d174 |
There was a problem hiding this comment.
Changes requested. The record edits are approved at this head, so what remains is two behavior fixes and three corrections to the description.
- Before the shared touch runtime loads, a sheet wheel whose value changes from outside jumps instead of turning, which
component:DateInputFR14 forbids and no record states: in a phone-profile browser with the runtime not yet loaded, ArrowDown on the hour wheel at 11:58 AM moves AM/PM to PM with no turn (packages/core/src/DateInput/wheelStrip.ts:341-345), so either state the before-load exception in FR14 or keep the turn before the load. - After the load,
attachstill writes the frozen pre-loadtranslate(packages/core/src/DateInput/wheelStrip.ts:168-171), so a wheel shown before the load and later parked on its first row shows its old row after a Suspense or<Activity>reveal whilearia-selectednames the new one; guard the placed write withif (engine == null)and pin it with awheelStrip.test.tscase (place, load,setOffset(0),attach(null),attach(element), expect no translate). - "No behavior changes after the load" is not true while that re-attach path stands; fix the path or narrow the claim.
- Regression: after the base merge the description's "the gap line now names only Slider and Chat" and "3 entries left" no longer hold, because INV13's gap line also names AlertDialog and the allowlist keeps 4 entries, so update both sentences.
Two smaller, non-blocking points: onTouchDownRef and its layout effect (PickerWheel.tsx:675-679) are redundant now that WheelGestures holds its handlers in a committed ref, and the comment at PickerWheel.tsx:702-704 leaves out the mouse wheel. Everything else checks out: no public API change, the new boundary entries, the rule test and the before-load case fail on the base and pass here, and the suites, typecheck, lint, knowledge check and bundle script tests pass.
Claims and files checked
Review mode: same-head; reason: none
- Claim: the date and time wheels stop importing the touch runtime statically, so DateInput, TimeInput, DateTimeInput, PowerSearch and Table reach no touch module in a first load — verified (the five new boundary entries fail on the base and pass here).
- Claim: the wheel's pan, catch and tap become a runtime part that calls the same handlers — verified (
WheelGesturesintouchRuntimeModules.tsx, rendered byPickerWheel.tsxafter the load). - Claim: the strip places itself by
translateuntil the load, then takes the runtime's motion engine at its first call, on the same element and offset — verified (wheelStrip.ts:141-153). - Claim: before the load a sheet wheel turns by keys, a mouse wheel's notches and a row click, at once, with no drag, coast or snap — verified (the new
PickerWheel.test.tsxcase, plus a phone-profile browser run with the runtime held back). - Claim: a drag in flight at the load does nothing and the next one turns the wheel — verified (the gesture part mounts only after the load).
- Claim: rows were already listbox options with their own click — verified (
useWheelListbox.ts:104-110). - Claim: no behavior changes after the load — false (the re-attach path above).
- Claim: no API change — verified (the surface generator reports no changed row for any published package).
- Claim: the gap line now names only Slider and Chat — false at this head (it also names AlertDialog).
- Claim: the allowlist has 3 entries left — false at this head (4 entries).
- Claim: the runtime record and the DateInput and TimeInput records carry the same before-load line — verified (INV13, FR15, FR7).
- Claim: the red-first tests fail on the stacked base — verified (7 failures there, all passing here).
- Claim: three wheel test files load the runtime in
beforeAll— verified. - Claim: the component and touch-runtime suites pass (about 1,330) — verified (34 files, 1,435 tests at this head).
- Claim: the rule and bundle script tests pass — verified.
- Claim: Core typecheck, eslint and the knowledge check pass — verified.
- Claim: pages with a date or time field download less before first paint — not measured here; the description defers the numbers to the end of the stack.
- Claim: one primary intent, with the helper moves split out, and no internal context in public text — verified.
- Files:
docs/architecture/react-component-runtime.md(INV13 wheel clause and gap line, approved);docs/specs/components/DateInput/DateInput.spec.md(FR15 sentence, approved; FR14 left unamended — finding);docs/specs/components/TimeInput/TimeInput.spec.md(FR7 sentence plus table re-padding, approved);internal/eslint-plugin-astryx/no-static-touch-runtime.allowlist.json(two wheel entries removed, consistent with the gap line — clear);packages/core/src/DateInput/PickerWheel.tsx(gesture wiring moved out, type-only imports — clear apart from the two non-blocking notes);packages/core/src/DateInput/wheelStrip.ts(placed strip and animator facade — both blocking findings);packages/core/src/utils/touchRuntimeModules.tsx(WheelGestures,createMotionEngine— clear);packages/core/src/DateInput/PickerWheel.test.tsx,packages/core/src/DateInput/wheelStrip.test.ts,packages/core/src/DateInput/DateInputTouch.test.tsx,packages/core/src/utils/touchRuntime.boundary.test.ts(runtime loaded inbeforeAll, new before-load and boundary cases — clear, though no case pins the re-attach path).
Primary intent
Performance, stacked on #11530: the date and time wheels stop importing the touch runtime statically.
PickerWheel's pan, catch and tap become a touch-runtime part, andwheelStriptakes its motion engine from the runtime at its first call after the load. With this, DateInput, TimeInput, DateTimeInput, and through them PowerSearch and Table, reach no touch module statically. No behavior changes after the load, and there's no API change.User or maintainer impact
Before-load behavior for the pre-load decision card: "a date or time wheel turns by its keys, a mouse wheel's notches and a click on a row, at once, with no drag, no coast and no snap" (recommended: keep).
Problem and solution fit
PickerWheelattached its pan (drag and trackpad scroll), its catch (a finger stopping a moving wheel) and its row tap throughuseGestureRecognizer. These are now the runtime partWheelGestures. PickerWheel renders it after the column once the runtime has loaded, and it calls back into the same handlers PickerWheel used before.wheelStripcreated a motion engine at construction. It now places the strip by itstranslate(as the animator writes it) until the runtime loads, and every move lands at once. At its first call after the load, it takes the runtime'screateMotionEngine, attaches it to the same element at the same offset, and plays as before.Authority
architecture:react-component-runtimeINV13: its before-load sentence adds the wheel clause, and the gap line now names only Slider and Chat.component:DateInputFR15 andcomponent:TimeInputFR7 carry the same line.spec:AST-080DEC-5 (amended).Change and evidence
DateInput/PickerWheel.tsx,DateInput/wheelStrip.ts,utils/touchRuntimeModules.tsx(WheelGestures,createMotionEngine), the allowlist (3 entries left), the boundary test, INV13, DateInput FR15 and TimeInput FR7.Scope
Components: DateInput (PickerWheel, wheelStrip), TimeInput and DateTimeInput (through the wheels)
Testing
Red first, each failing on #11530's head:
utils/touchRuntime.boundary.test.ts: the DateInput, TimeInput, DateTimeInput, PowerSearch and Table entries reach no touch module statically.PickerWheel.test.tsx: "turns by a key at once and tracks no drag before the touch runtime loads".Also:
PickerWheel.test.tsx,wheelStrip.test.tsandDateInputTouch.test.tsxload the runtime inbeforeAll.check:knowledgepass.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.