Repository navigation
[Component Audit] DateTimeInput: keep cleared calendars empty - #7298
Conversation
|
AI review status for this pull request.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report
|
There was a problem hiding this comment.
Thanks for the focused fix and the clear audit trail. Keeping the calendar explicitly controlled-empty after a clear resolves the contradictory state where the field was empty but the previous day still appeared selected, and it does so without changing the public API or the clear callback contract.
I verified the select → clear → reopen sequence leaves no selected day, alongside the related DateTimeInput test suites and knowledge checks. The new component record stays a draft observation for owner review and does not change any governing requirement. No changes are requested.
[Automated review]
User impact
People who select a date from DateTimeInput’s calendar, clear the field, and reopen the calendar no longer see the previous date still highlighted. The visible empty field and Calendar selection now describe the same state.
Audit result
core/DateTimeInput0d8dadb0d815cbd3091a5e93a8e98095651b840b5e000a582a7b33e0643c974df8ec3147015b41ccFindings fixed
undefinedto Calendar after clear, which released Calendar into uncontrolled mode and revived its prior internal selection. The component now passes explicit controlled-emptynull, using Calendar’s current controlled-empty contract without changing DateTimeInput’s public API.The clear-state diagnosis and original regression shape came from @korkt-kim’s focused fix. The changeset preserves that attribution alongside
@cixzhang.Authority and compatibility
spec:AST-043remains the current owner of picker presentation, precedence, compatibility mapping, and native fallback behavior; none changes here.family:input-fieldscontinues to own controlled optimistic changes, busy state, field geometry, status, and disabled reasons.DateTimeInput.spec.mdis a draft observational record. It adds no current product authority and introduces no new prop, default, role, interaction, or migration.onChange(undefined); only its internal Calendar boundary remains explicitly controlled-empty.Evidence
shows no selected calendar days after clearingreceived one selected gridcell on the base source.ClearedCalendarSelectionselects March 20, clears, reopens, asserts zero selected gridcells, and leaves the reopened empty Calendar as an opted-in stable visual frame.5e000a582a7b33e0643c974df8ec3147015b41cc.Needs Review
No owner decision blocks this audit. Three pre-existing code-health FIX groups remain recorded rather than expanded into this behavior repair: Effect-based touch-draft synchronization, Effect-based prop-driven layer closure, and Effect-based trigger registration. They are separately refactorable and do not invalidate the restored clear path.
Writing rubric results
Testing
pnpm exec vitest run packages/core/src/DateTimeInput/DateTimeInput.test.tsx packages/core/src/DateTimeInput/DateTimeInputTouch.test.tsx packages/core/src/DateTimeInput/NativePickerSegments.test.tsx packages/core/src/DateTimeInput/Presentation.test.tsx --maxWorkers=4— 212 passed.pnpm -F @astryxdesign/core typecheck— passed.pnpm -F @astryxdesign/storybook typecheck— passed after package build.pnpm build— passed.pnpm storybook:build— passed.pnpm lint:strict— passed with 0 errors; repository-existing warnings only.pnpm check:knowledgeand commit hooks — passed.