Repository navigation
fix(DateInput, DateTimeInput): plain wording for a date the calendar does not have - #11309
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval waits on an engineering owner's decision: no current spec settles the new wording ("Enter a real date", "Enter a real date ({calendar})" and "Enter an available date") or when the message names the calendar, and the sentence added to spec:AST-111 AR3 is a new requirement in a draft record. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request; as an engineering owner, the author may do so.
One fix is needed either way:
DateTimeInput.calendar.test.tsxrenames the test "rejects a date the calendar does not have and names the calendar", which the verification table of the DateTimeInput component spec (its FR11, AR5 row) still cites, so keep the old title or update that row.
The Gregorian cases in DateInput.calendar.test.tsx match "Enter a real date" by substring, so they would also pass if the calendar name were wrongly appended; an exact-text assertion would pin that case.
Claims and files checked
- Claim: a typed date the calendar lacks shows "Enter a real date": verified (
en.json:1219,DateInput.calendar.test.tsx:387-400). - Claim: the calendar is named only when the field's calendar differs from the provider's: verified (
useTypedDate.ts:189-199,DateInput.calendar.test.tsx:121-133,:402-415). - Claim: a day ruled out by
dateConstraintsshows "Enter an available date": verified (en.json:1223,DateInput.calendar.test.tsx:417-425). - Claim: the old messages read as the description quotes: verified (base
en.json). - Claim: the min and max messages do not change: verified (
en.json:1223). - Claim: the rule reuses the comparison the field's description uses: verified (
useTypedDate.ts:189-191,:239-241). - Claim: no locale catalog translates these keys: verified (only
en.jsonof 30 catalogs). - Claim: the component specs' distinct message per rejection kind stays true: verified (
en.json:1215,:1219,:1223). - Claim: the four evidence-table cases: verified from the code; the Gregorian case's test asserts only a substring.
- Claim: the two named regression tests exist: verified (
DateInput.calendar.test.tsx:402,:417). - Claim: 97 authored lines: verified.
- Claim: changeset coverage passes: verified.
- Claim: the test run, i18n catalog and runtime checks, knowledge check and pre-review findings pass: not confirmed here; CI has not run on this head yet.
- Claim: no new public API: verified.
- Claim: no internal context in public text: verified.
- Claim: one defect is restored: not established; no current spec makes the released wording a defect, so it waits on the owner decision.
- Claim: the survey of other date inputs and the standalone-name grammar: research context, not checked.
- File
.changeset/date-error-wording.md: clear. - File
docs/specs/AST-111-calendar-systems/spec.md: needs owner approval. - File
packages/core/locales/en.json: needs owner approval. - File
packages/core/src/DateInput/useTypedDate.ts: clear. - File
packages/core/src/DateInput/DateInput.calendar.test.tsx: substring assertion (non-blocking). - File
packages/core/src/DateTimeInput/DateTimeInput.calendar.test.tsx: renamed test still cited by the component spec.
… unnamed-calendar text
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DateTimeInput · Storybook | 215.3 kB (+26 B) · 18.7 kB CSS (0) | 3,631 (0) | ✗ · ✓ · ✓ |
| DateInput · Storybook | 192.7 kB (+25 B) · 17.0 kB CSS (0) | 6,038 (+3) | ✗ · ✓ · ✓ |
| PowerSearch | 299.2 kB (+39 B) · 24.7 kB CSS (0) | — | — · — · — |
Visual changes: 14 snapshots in 2 components
A change is a question for the reviewer, not a failure.
2 more are in the run's visual report.
Package size: @astryxdesign/core 7.36 MB packed (+280 B); no new dependencies.
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Current run: CI concluded cancelled; parts of this report may be missing.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approval waits on an engineering owner's decision. No current spec settles the new wording ("Enter a real date", "Enter a real date ({calendar})" and "Enter an available date") or when the message names the calendar, and the sentence added to spec:AST-111 AR3 is a new requirement in a draft record. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request; as an engineering owner, the author may do so. The DateTimeInput test keeps the title its component spec cites and the Gregorian and provider-calendar cases now assert the exact text, so no other change is needed.
Claims and files checked
- Claim: a typed date the calendar lacks shows "Enter a real date": verified (
en.json:1219,DateInput.calendar.test.tsx:387-402). - Claim: the calendar is named, in parentheses, only when the field's calendar differs from the provider's: verified (
useTypedDate.ts:189-199,DateInput.calendar.test.tsx:118,:128,:404-415). - Claim: a day that
dateConstraintsrules out shows "Enter an available date": verified (en.json:1223,DateInput.calendar.test.tsx:417-425). - Claim: the released messages read as the description quotes: verified (base
en.json). - Claim: the min and max messages do not change: verified (
en.json:1223). - Claim: the naming rule is the one the field's description already uses, computed in the same hook: verified (
useTypedDate.ts:189-191,:239-241). - Claim: no locale catalog translates these keys: verified (only
en.jsonof the 30 shipped catalogs). - Claim: the component specs' different message per rejection kind stays true: verified (
en.json:1215,:1219,:1223). - Claim: the four evidence-table cases: verified from the code and tests.
- Claim: the two named regression tests exist, and the Gregorian and provider-calendar cases assert the exact text: verified (
DateInput.calendar.test.tsx:399,:404,:414,:417). - Claim: the changeset's three statements and its patch bump for Core: verified (
.changeset/date-error-wording.md). - Claim: no new public API: verified from the source diff.
- Claim: no internal context in public text: verified.
- Claim: one defect is restored: not established; no current spec makes the released wording a defect, so it waits on the owner decision.
- Claim: separable unsettled tagalongs were removed or split: not established; the
dateConstraintswording stays, pursued explicitly and covered by the same owner decision. - Claim: the test run, i18n catalog and runtime checks, knowledge check, changeset coverage and pre-review results: not confirmed; CI skipped those jobs for this draft head, and the pre-review count of 97 lines describes the earlier commit (95 now).
- Claim: the survey of other date inputs and the standalone-name grammar: research context, not checked.
- File
.changeset/date-error-wording.md: clear. - File
docs/specs/AST-111-calendar-systems/spec.md: needs owner approval. - File
packages/core/locales/en.json: needs owner approval. - File
packages/core/src/DateInput/useTypedDate.ts: clear. - File
packages/core/src/DateInput/DateInput.calendar.test.tsx: clear. - File
packages/core/src/DateTimeInput/DateTimeInput.calendar.test.tsx: clear.
|
/approve-spec 5205098 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
An engineering owner's /approve-spec on this head settles the naming rule added to spec:AST-111 AR3 and the new wording ("Enter a real date", "Enter a real date ({calendar})" and "Enter an available date"). The change reuses the field's existing provider-calendar comparison, keeps a different message for each kind of rejection, and the tests pin the exact text, including the DateTimeInput test title its component spec cites.
- Non-blocking: the Testing section's "97 authored lines" describes the first commit; this head has 95, so refresh that line with the other results once CI finishes.
Claims and files checked
- Claim: a typed date the calendar lacks used to show "This date does not exist in the …": verified (base
en.json:1219). - Claim: it now shows "Enter a real date": verified (
en.json:1219,DateInput.calendar.test.tsx:387-402). - Claim: the calendar is named, in parentheses, only when the field's calendar differs from the app's: verified (
useTypedDate.ts:189-199,DateInput.calendar.test.tsx:118,:128,:404-415). - Claim: a day that
dateConstraintsrules out shows "Enter an available date": verified (en.json:1223,DateInput.calendar.test.tsx:417-425). - Claim: the out-of-range messages do not change: verified (
en.json:1223, theboth,minandmaxbranches). - Claim: the naming rule is the description's rule, computed by the same hook: verified (
useTypedDate.ts:189-191,:239-241). - Claim: the calendar-systems record's AR3 gains one sentence: verified (
spec.md:319-321), approved by an engineering owner on this head. - Claim: the component records' different message per rejection kind stays true: verified (
en.json:1215,:1219,:1223). - Claim: no locale catalog translates these keys, so no translation is lost: verified (only
en.jsonof the 30 catalogs). - Claim: the four evidence-table cases: verified from the code and tests.
- Claim: the two named regression tests exist, and the Gregorian and provider-calendar cases assert the exact text: verified (
DateInput.calendar.test.tsx:399,:404,:414,:417). - Claim: one defect is restored and no unsettled tagalong remains: owner-decided; the approval on this head covers the naming rule and all three wordings.
- Claim: no new public API, default or interaction model: verified from the source diff.
- Claim: no internal context in public text: verified.
- Claim: the record edit adds no narration, status or open question: verified (
spec.md:319-321). - Claim: the test run, i18n catalog and runtime checks, knowledge check and changeset coverage pass: not yet confirmed; CI has not finished on this head.
- Claim: pre-review reports 97 authored lines and no findings: the count describes the first commit (95 at this head).
- Claim: the survey of other date inputs and the standalone calendar-name grammar: research context, not a code claim.
- Changeset: the three statements and the patch bump for Core: verified (
.changeset/date-error-wording.md,en.json:1219,:1223,useTypedDate.ts:189-199). - File
.changeset/date-error-wording.md: clear. - File
docs/specs/AST-111-calendar-systems/spec.md: clear (owner-approved). - File
packages/core/locales/en.json: clear. - File
packages/core/src/DateInput/useTypedDate.ts: clear. - File
packages/core/src/DateInput/DateInput.calendar.test.tsx: clear. - File
packages/core/src/DateTimeInput/DateTimeInput.calendar.test.tsx: clear.
|
/approve-spec 44ed712 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
This head merges main into the branch and leaves the change itself as it was. An engineering owner's /approve-spec on this head settles the naming rule added to spec:AST-111 AR3 and the new wording ("Enter a real date", "Enter a real date ({calendar})" and "Enter an available date"). The change reuses the field's existing provider-calendar comparison and keeps a different message for each kind of rejection; the tests assert the exact text where no calendar name may appear and keep the DateTimeInput test title its component spec cites.
- Non-blocking: the Testing section's "97 authored lines" describes the first commit; this head has 95, so refresh that line with the other results once CI finishes.
Claims and files checked
- Claim: a typed date the calendar lacks used to show "This date does not exist in the …": verified (base
en.json:1219). - Claim: it now shows "Enter a real date": verified (
en.json:1219,DateInput.calendar.test.tsx:387-402). - Claim: the calendar is named, in parentheses, only when the field's calendar differs from the app's: verified (
useTypedDate.ts:189-199,DateInput.calendar.test.tsx:118,:128,:404-415). - Claim: a day that
dateConstraintsrules out shows "Enter an available date": verified (en.json:1223,DateInput.calendar.test.tsx:417-425). - Claim: the out-of-range messages do not change: verified (
en.json:1223, theboth,minandmaxbranches). - Claim: the naming rule is the description's rule, computed by the same hook: verified (
useTypedDate.ts:189-191,:239-241). - Claim: the calendar name comes from the platform as a standalone name: verified for the source (
calendarDateParser.ts:1374-1385); the grammar point is research context. - Claim: the calendar-systems record's AR3 gains one sentence: verified (
spec.md:317-321), approved by an engineering owner on this head. - Claim: the component records' different message per rejection kind stays true: verified (
en.json:1215,:1219,:1223). - Claim: no locale catalog translates these keys, so no translation is lost: verified (only
en.jsonof the 30 catalogs). - Claim: the four evidence-table cases: verified from the code and tests.
- Claim: the two named regression tests exist, and the Gregorian and provider-calendar cases assert the exact text: verified (
DateInput.calendar.test.tsx:399,:404,:414,:417). - Claim: one defect is restored and no unsettled tagalong remains: owner-decided; the approval on this head covers the naming rule and all three wordings.
- Claim: no new public API, default or interaction model: verified from the source diff.
- Claim: no internal context in public text: verified.
- Claim: the record edit adds no narration, status or open question: verified (
spec.md:317-321). - Claim: the i18n catalog and runtime checks, the knowledge check and changeset coverage pass: verified by the repository checks that passed in CI on this head.
- Claim: the unit test run (56 files, 1,859 tests) passes: not yet confirmed; CI's unit tests are still running on this head.
- Claim: pre-review reports 97 authored lines and no findings: the count describes the first commit (95 at this head).
- Claim: the survey of other date inputs: research context, not a code claim.
- Changeset: the three statements and the patch bump for Core: verified (
.changeset/date-error-wording.md,en.json:1219,:1223,useTypedDate.ts:189-199). - File
.changeset/date-error-wording.md: clear. - File
docs/specs/AST-111-calendar-systems/spec.md: clear (owner-approved). - File
packages/core/locales/en.json: clear. - File
packages/core/src/DateInput/useTypedDate.ts: clear. - File
packages/core/src/DateInput/DateInput.calendar.test.tsx: clear. - File
packages/core/src/DateTimeInput/DateTimeInput.calendar.test.tsx: clear.




































User impact
A typed date that the calendar does not have, such as
02/31/2026, showed "This date does not exist in the Gregorian Calendar". The message is technical, and it names the default calendar that nobody chose. It now reads "Enter a real date". The calendar is named only when the field's calendar differs from the app's calendar, in parentheses: "Enter a real date (Persian Calendar)". A day thatdateConstraintsrules out now reads "Enter an available date" instead of "This date is not available". The out-of-range messages ("Enter a date on or after …") do not change.Problem and solution fit
spec:AST-111AR2 uses for the field's description, anduseTypedDatealready computes it.Intl.DisplayNamesreturns a standalone calendar name. In languages such as German, Russian, and Polish, that form does not fit inside a sentence after a preposition, so the name stands apart.Expected behavior and authority
spec:AST-111AR3: each rejection kind has its own message. This adds one sentence: the message for a date the calendar does not have names the calendar only when the field's calendar differs from its provider's calendar, as AR2 says for the description.component:DateInputAR3 andcomponent:DateTimeInputAR5 cite AST-111 AR3 and require a distinct catalog message per kind, which stays true.Smallest restoration
packages/core/locales/en.json:@astryx.dateInput.nonexistentDatebecomes{named, select, yes {Enter a real date ({calendar})} other {Enter a real date}}, and theotherbranch of@astryx.dateInput.outOfRangeDatebecomes "Enter an available date". No locale catalog translates these keys yet, so no translation is lost.useTypedDate.ts: passesnamedfrom the existing provider-calendar comparison.Evidence
02/31/2026in a Gregorian app12/30/1404 APin a Persian field in a Gregorian app12/30/1404 APwithcalendar="persian"on the providerdateConstraintsDateInput.calendar.test.tsx"leaves the calendar's name out when the field uses the provider's calendar" and "asks for an available date when a date constraint rules the day out", plus the updated expectations in the existing nonexistent-date tests inDateInput.calendar.test.tsxandDateTimeInput.calendar.test.tsx. The Gregorian and provider-calendar cases assert the exact text, so a calendar name appended by mistake fails them.Scope
Components: DateInput, DateTimeInput
Writing rubric results
Record touched:
spec:AST-111(AR3).Testing
vitest runoverpackages/core/src/{DateInput,DateTimeInput,DateRangeInput,PowerSearch,i18n},calendarDateParser.test.ts, andscripts/check-i18n-catalog.test.mjs: 56 files, 1,859 tests pass.pnpm check:i18n-catalogandpnpm check:i18n-runtime: pass.pnpm check:knowledge: passes. Changeset coverage: passes.node scripts/pre-review.mjs --base origin/main: 97 authored lines, no findings.