Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Implementation is in A controlled Verification:
The CLI printed a GitHub permission warning while requesting reviewers, but verification shows |
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. A maintainer adds the ci:run label so CI runs; the label takes effect on the next push, or a close and reopen.
A controlled value cleared to undefined now empties kept rejected text, its invalid state and its message in DateInput and in DateTimeInput's date segment, as the rejected-entry spec requires for any later new value, while a value passed at the Enter or blur that keeps the text still keeps it. Both new regression tests fail without the fix and pass with it.
- Optional: the new comment in
useTypedDate.ts(lines 508-511) can keep only its reason: typing never reportsundefined, so a clear toundefinedalways comes from outside.
Claims and files checked
Review mode: same-head; reason: none
- changed rules (0): none
- Claim: clearing the controlled value to undefined empties rejected typed date text in both components — verified (the two new tests fail before the fix and pass after; a browser capture of the date-time field's clear button shows the same).
- Claim: a value restored at the Enter or blur that keeps rejected text still keeps it — verified (the existing restore tests pass; the shared replacement check is unchanged).
- Claim: the cause is that "no date reported" and a cleared value looked the same — verified (the hook's value-change branch before the fix).
- Claim: after the clear the input is empty with no invalid state or message — verified (the tests assert the value, the invalid attribute and the status text).
- Claim: no visual styling change — verified (no style changes).
- Claim: the full DateInput suite passes with 200 tests — verified (200 of 200).
- Claim: the new DateInput and DateTimeInput regressions and the existing caller-restore and retyped-date regressions pass — verified.
- Claim: core typecheck passes — verified.
- Claim: repository checks pass — verified for 24 of 27 checks; the three that read git history could not run in this review.
- Claim: targeted ESLint and the whitespace check pass — verified.
- Claim: pre-commit checks pass — not checked here.
- Claim: one existing Korean hour-cycle failure in the full DateTimeInput suite — not reproduced (215 of 215 passed).
- Claim: closes the linked issue — verified (its reproduction is the new test case).
- Changeset: a core patch noting that both components clear rejected text on a controlled clear — verified (matches the change; the changeset check passes).
- File
.changeset/date-input-clear-rejected-text.md— clear. - File
packages/core/src/DateInput/useTypedDate.ts— clear (one optional comment suggestion). - File
packages/core/src/DateInput/DateInput.test.tsx— clear. - File
packages/core/src/DateTimeInput/DateTimeInput.test.tsx— clear.
|
/approve-spec d3bbc17 |
|
/approve-spec d3bbc17 |
|
/approve-spec ec30a65 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The ci:run label is applied, and the CI, CI review pass, Lint and CLI Smoke Test runs on this head are waiting for a maintainer to approve them.
A controlled value changed to undefined now empties kept rejected text, its invalid state and its message in DateInput and in DateTimeInput's date segment, as the rejected-entry spec requires for any later new value, while a value passed at the Enter or blur that keeps the text still keeps it. Both new regression tests fail without the fix and pass with it.
- Optional: the new comment in
useTypedDate.ts(lines 508-511) can keep only its reason: typing never reportsundefinedwhile text is held, so a clear toundefinedalways comes from outside.
Claims and files checked
Review mode: full; reason: other:cited records changed on main
- Claim: clearing the controlled value to undefined empties rejected typed date text in both components — verified (the two new tests fail before the fix and pass after; a browser capture of the date-time field's clear button shows the same).
- Claim: a value restored at the Enter or blur that keeps rejected text still keeps it — verified (the existing restore tests pass, and a probe that clears to undefined at that blur keeps the text).
- Claim: the cause is that "no date reported" and a cleared value looked the same — verified (the hook's value-change branch before the fix).
- Claim: after the clear the input is empty with no invalid state or message — verified (the tests assert the value, the invalid attribute and the status text).
- Claim: no visual styling change — verified (no style changes).
- Claim: the full DateInput suite passes with 200 tests — verified (200 of 200).
- Claim: the new DateInput and DateTimeInput regressions and the existing caller-restore and retyped-date regressions pass — verified.
- Claim: core typecheck passes — verified.
- Claim: repository checks pass — verified for 25 of 28 checks; the three that read git history could not run in this review.
- Claim: targeted ESLint and the whitespace check pass — verified.
- Claim: pre-commit checks pass — not checked here.
- Claim: one existing Korean hour-cycle failure in the full DateTimeInput suite — not reproduced (215 of 215 passed).
- Claim: closes the linked issue — verified (its reproduction is the new test case).
- Changeset: a core patch noting that both components clear rejected text when the controlled value is set to undefined — verified (matches the change; the changeset check passes).
- File
.changeset/date-input-clear-rejected-text.md— clear. - File
packages/core/src/DateInput/useTypedDate.ts— clear (one optional comment suggestion). - File
packages/core/src/DateInput/DateInput.test.tsx— clear. - File
packages/core/src/DateTimeInput/DateTimeInput.test.tsx— clear.
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DateTimeInput · Storybook | 230.8 kB (+14 B) · 20.4 kB CSS (0) | 3,691 (0) | ✗ · ✓ · ✓ |
| DateInput · Storybook | 206.9 kB (+13 B) · 18.7 kB CSS (0) | 6,363 (+5) | ✗ · ✓ · ✓ |
| PowerSearch | 316.9 kB (+10 B) · 27.1 kB CSS (0) | — | — · — · — |
Visual changes: 8 snapshots in 2 components
A change is a question for the reviewer, not a failure.
Inheritance checked against the 9 newest reports of other pull requests.
Package size: @astryxdesign/core 7.86 MB packed (+145 B); no new dependencies.
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
|
/approve-spec 1d0c80b |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The ci:run label is applied, and the CI, CI review pass, Lint and CLI Smoke Test runs on this head are waiting for a maintainer to approve them.
A controlled value changed to undefined now empties kept rejected text, its invalid state and its message in DateInput and in DateTimeInput's date segment, as the rejected-entry spec already requires for any new value, while a value passed with the Enter or blur that keeps the text still keeps it. Both new tests fail without the fix and pass with it.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Claim (changeset and description): a controlled value changed to
undefinedclears rejected typed text in both components. Verified:DateInput.test.tsx:3050andDateTimeInput.test.tsx:3733fail without the change and pass with it, and a Chromium check of both clear-button stories shows the field empty with no error after Clear. - Claim: a value restored in the same Enter or blur update still keeps the rejected text. Verified: the existing restore tests pass, and a restore to
undefinedkeeps the text too. - Claim: the cause is that no date had been reported, so
undefinedmatched the last reported date. Verified in the base hook's value check. - Claim: after the clear,
aria-invalidand the rejection message are removed. Verified by the new tests' assertions. - Claim: not a styling change. Verified: no style or token edits.
- Claim: full DateInput suite 200 passed, both new regressions and the caller-restore regression pass, core typecheck, ESLint and the whitespace check pass. Verified by rerunning them.
- Claim: one unrelated Korean hour-cycle failure in the full DateTimeInput suite. Not reproduced: all 215 DateTimeInput tests pass here.
- Claim: closes the linked issue. Verified: its reproduction is the new DateInput test.
- File
.changeset/date-input-clear-rejected-text.md: clear. - File
packages/core/src/DateInput/useTypedDate.ts: clear. - File
packages/core/src/DateInput/DateInput.test.tsx: clear. - File
packages/core/src/DateTimeInput/DateTimeInput.test.tsx: clear.
























What changed
DateInput and DateTimeInput now clear rejected typed date text when their controlled
valueis explicitly changed toundefined.The existing value-replacement behavior is preserved: a value restored in the same Enter or blur update that keeps rejected text still leaves that text available for correction.
Why
When rejected text had never reported a date,
lastFiredDatewas alreadyundefined. A controlled clear toundefinedtherefore looked like the date typing had just reported, so the field kept the rejected text and its error state instead of becoming empty.Before / after
Before:
After:
This is a controlled-state and accessibility-state fix, not a visual styling change. A screenshot would not honestly prove the behavior, so the regression asserts the actual input value and ARIA state.
Verification
DateInput.test.tsx: 200 passed.pnpm check:repo: passed.git diff --check: passed.The full DateTimeInput suite also reports one unrelated existing Korean hour-cycle assertion failure; the focused DateTimeInput regression for this change passes.
Closes #12079