Skip to content

fix(TimeInput, DateTimeInput): keep rejected time entries and show why - #11413

Merged
nynexman4464 merged 10 commits into
mainfrom
nynexman4464/fix/time-input-rejected-entry
Nov 13, 2026
Merged

nynexman4464 merged 10 commits into
mainfrom
nynexman4464/fix/time-input-rejected-entry

Conversation

@nynexman4464

@nynexman4464 nynexman4464 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

User impact

People who type a time in TimeInput, or in DateTimeInput's time field, in a standalone field. Before this change, every draft that was not an accepted time was marked invalid and announced on each keystroke, including an unfinished 1 when 01:00 was out of range; the only visible sign was secondary-color text; and blur reverted the draft with no message. A native time edit outside min/max showed no message, and its rejection vanished at blur. A sighted person never saw why the entry failed (WCAG 2.2 1.4.1, 3.3.1), and a screen-reader user heard false alarms while typing.

Now an unfinished time is never flagged. A rejected time shows the "Invalid time" message as the field's error status, with aria-invalid and one announcement, and the typed text stays so it can be corrected. Apps change no code: the committed value, onChange, and what a form posts behave as before.

Problem and solution fit

  1. Why does it occur? The typed field validated every keystroke against "parses to an in-range time" and had no notion of a finished entry. It reported the result only through a visually hidden alert, and blur dropped the draft.
  2. Why does it harm the task? A person sees text change color and then silently revert, with no reason; an assistive-technology user hears "Invalid time" after the first digit of a valid time.
  3. Why does that matter? A field marked invalid without a visible reason fails WCAG 2.2 1.4.1 and 3.3.1 (Level A), and a silent revert discards the person's entry.

The fix gives a typed time a point of completion, reveals rejections at that point or at Enter or blur, keeps the rejected text, and routes the message through the field's existing error status, so all signals move together.

Expected behavior and authority

  • spec:AST-118 FR1–FR10, AR1–AR4, DEC-6, DEC-7, DEC-9, DEC-11, DEC-13, DEC-14 (docs/specs/AST-118-rejected-entry-feedback/spec.md).
  • component:TimeInput FR3, FR6, FR11, FR14, FR15, AR2, and its ownership boundary, which names useTypedTime.
  • component:DateTimeInput FR8, FR16 (time segment and the both-segments rule).
  • family:input-fields FR15 and its Shared owner section (useEntryErrorReport, useValueReplacesEntry).
  • Compatibility: one accessibility behavior fix under spec:AST-017 FR53, shipped as a patch [fix]; onEntryErrorChange and TimeInputEntryError are optional additions that the same record admits under spec:AST-017 FR5 ([feat] changeset).

Smallest restoration

  • Status, alert, and report: TimeInput and DateTimeInput's time segment use the family hook Field/useEntryErrorReport with callerErrorPrecedence: 'always', as NumberInput does. It decides the status a shown rejection takes over a caller status, the alert that announces a message no shown status announces (including an unchanged caller error once when a rejection starts), and the onEntryErrorChange report (from the causing handler, after render for a prop change, never twice, null at unmount). A grouped TimeInput still shows no status of its own; the group's status channel announces a caller status message, and the alert carries the rejection.
  • A value passed at the commit (DEC-14): useTypedTime asks the family hook Field/useValueReplacesEntry whether a new value replaces the kept draft, with the count of commits that keep a rejected draft as the keep signal. A value that the caller passes in the same update as an Enter or blur that keeps a rejected draft, as a caller that restores its own value at that commit does, keeps the draft, its rejection, and its message, and reports nothing; a later new value replaces the draft. The echo of a time that typing committed also keeps the draft. This applies to TimeInput and DateTimeInput's time segment.
  • useTypedTime (internal, TimeInput/useTypedTime.ts) keeps only the time rules: the typed draft, its point of completion, its commit at Enter and blur, the kept draft and the form value it posts, and the native control's rejection. component:TimeInput's ownership boundary names it: DateTimeInput's time segment shares it because component:DateTimeInput FR16 gives the segment component:TimeInput FR14's rules, the same way DateTimeInput already imports DateInput/useTypedDate and TimeInput imports DateTimeInput/NativeTimeSegment. The family hooks own only the status, alert, report, and value replacement, and useTypedDate reads dates, so none of them holds the time rules. AST-118's path list already covers packages/core/src/TimeInput/**; its behavior is verified through the TimeInput and DateTimeInput suites already in each record's verified_by.
  • Completion (spec:AST-118 FR1.2): isLocaleTimeComplete in utils/timeFormat.ts reuses the locale reading of parseLocaleTime (now split into one shared helper) and requires the hours, both minute digits, both second digits when the field shows seconds, and, in a 12-hour field, a day period unless the hour reads 0 or 13–23.
  • Commit: Enter and blur commit the draft. Enter is not prevented, so a surrounding form submits; in the open preset-time list, Enter still picks a time (existing path). Blur normalizes an accepted draft; Enter keeps its text, so the posted text does not change.
  • Form value (FR4, TimeInput FR11, DEC-13): while blur keeps a rejected TimeInput draft, a hidden input carries name (and the caller's form attribute) with the committed time as the field shows it, and the typed input carries none, until an edit or a new value. The time segment still carries no name.
  • Native time control (DEC-9): NativeTimeSegment reports its rejection to the owner, which shows it like a typed rejection; blur restores the committed time (existing unfocused sync) and no longer clears the rejection. An accepted or emptied edit, a new value, or a switch to the typed field (a pointer change on adaptive-native, or hasSeconds or a non-1 increment) ends it.
  • Disabled and busy (FR10): while the field is disabled or busy (isLoading, or a pending changeAction; in DateTimeInput's native segments too, as the native date rejection does), the field marks, shows, and announces no rejection, reports null, and its handlers report nothing, so the caller does not receive a rejection, then null, then the same rejection again. Once the field is editable, a rejection it kept is shown and reported once. A TimeInput that becomes disabled drops its draft and its native rejection (component:TimeInput FR9), so neither returns once enabled; a busy TimeInput, and a locked DateTimeInput time segment, which keeps its draft through a lock, show and report the rejection again once editable.
  • DateTimeInput: the field status shows the date segment's message whenever that message shows, typed or from the native date control; a time rejection under it sets aria-invalid on the time input and is announced through the time alert. Unreadable date text that is still being typed shows no message, so the time message shows meanwhile. Date-segment code paths are unchanged apart from passing the combined status to Field, the status icon, and aria-describedby.
  • Records: the TimeInput, DateTimeInput, family, and AST-118 gap lines for these members are removed, and the "TBD (gap)" verification rows name the tests. The family Shared owner section lists TimeInput among the members of useEntryErrorReport, which useValueReplacesEntry's bullet refers to as "the same members"; the TimeInput record names useTypedTime, and TimeInput FR11 states DEC-14 for the kept draft.
  • Catalog: no new message. The @astryx.timeInput.invalidTime translator description now says the message is visible and the text stays.

API delta (internal and public):

// public, optional
interface TimeInputEntryError {
  kind: 'unreadable' | 'outOfRange';
  text: string;
  value?: ISOTimeString;
}
<TimeInput onEntryErrorChange={(error: TimeInputEntryError | null) => void} />

Internal only: useTypedTime (named in component:TimeInput; imported by TimeInput and DateTimeInput), isLocaleTimeComplete, and three required props on the internal NativeTimeSegment (isRejected, onRejectedChange, alertMessage). No change to useEntryErrorReport or useValueReplacesEntry beyond their header comments.

Evidence

  • Reproduction before the change: on the base, typing 25:99 in a TimeInput set aria-invalid and filled the hidden alert on the first keystroke that did not parse; blur restored 2:30 PM with no message (the replaced tests "sets aria-invalid="true" when typed input is out of range", "announces an alert message when typed input is invalid", and "reverts to previous value on blur when input is invalid" asserted that behavior).
  • Result after the change (jsdom): the suites listed in the records' verification rows: TimeInput.test.tsx "TimeInput rejected entries" (with "in a form", "with a caller status", and "onEntryErrorChange", including the restoring-caller and the isLoading and pending-changeAction report cases), NativeTimeInput.test.tsx "TimeInput native rejected entries" (including the surface-switch and the busy and disabled cases), DateTimeInput.test.tsx "time segment rejected entries" (including the restoring-caller, native disabled, busy, and pending-changeAction cases), and timeFormat.test.ts "isLocaleTimeComplete".
  • Result after the change (real browser, Chromium 149 headless, built package in a scratch Vite page, Playwright, on 8bfff9f; the DEC-14, locked-report, and shared value-replacement changes since then are covered by the jsdom suites only):
    • TimeInput (min 08:00, max 17:00): 18:3 → no aria-invalid, no status; 18:30 → aria-invalid="true", status "Invalid time"; 25:99 while typing → nothing; Enter → text 25:99 kept, status "Invalid time", form submitted with start=25:99; blur → text kept, typed input has no name, form posts 9:00 AM.
    • TimeInput presentation="native": typing 6,30,P → value 18:30, aria-invalid="true", status "Invalid time"; Enter → value still 18:30; blur → value restored to 09:00, aria-invalid="true" and status "Invalid time" stay.
    • TimeInput presentation="adaptive-native" under a coarse pointer (isMobile, hasTouch): native edit to 18:30 → status "Invalid time"; then hasSeconds turns on → typed field shows 9:00:00 AM with no aria-invalid and no status.
    • DateTimeInput with timeOptionInterval: x + Enter in the closed time field → text kept, aria-invalid="true", status "Invalid time", form submitted; Alt+ArrowDown, ArrowDown, Enter → picks 10:30 AM, no submission.
    • DateTimeInput with a same-day min of 09:00: 8:30 AM → status "Invalid time"; tomorrowish typed in the focused date field → status still "Invalid time", date input not aria-invalid; blur → status "Invalid date", time input aria-invalid="true", time alert "Invalid time".
    • DateTimeInput presentation="native" with a changeAction that stays pending: native time 8:00 AM before a 9:00 minimum → blur restores 10:00, status "Invalid time", aria-invalid="true"; native date changed to 2026-03-16 → aria-busy="true" on the time control, no aria-invalid, no status.
    • No page errors.
  • Representative unchanged path: valid typing still commits through onChange while typed (calls onChange immediately when input becomes valid, calls onChange on blur when input is valid), arrow-key stepping, the preset-time list, the sheet surface, every date-segment suite, and every NumberInput suite from main pass unchanged.
  • Regression test or other mutation-sensitive proof: 47 mutations, each applied alone against the relevant test files; 47 killed, 0 survived (table under Testing).

Scope

Components: TimeInput, DateTimeInput (time segment and the both-segments rule), NativeTimeSegment (internal), utils/timeFormat

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label. The optional onEntryErrorChange prop and TimeInputEntryError type are new public API. They are not hidden: spec:AST-118 FR8 and component:TimeInput FR15 decide them as part of the same fix, and they ship with their own [feat] changeset.
  • Public text and artifacts contain no internal Meta context.

Not in this change: entryErrorBehavior (spec:AST-117; component:TimeInput FR13 and component:DateTimeInput FR15 keep that gap).

Known limits, recorded rather than changed:

  • component:TimeInput FR3 and component:DateTimeInput FR7 keep their gap: the typed field still commits a parsed prefix (2 commits 02:00). After such a commit, a later rejected draft posts that committed time from the hidden input. The gap line stays in both records.
  • A native time control that reports an empty value while a person retypes its hour still clears the value, as before; DEC-9's restore then restores that empty value.
  • DateTimeInput's time segment keeps its typed draft and its native rejection while the field is disabled or busy and shows the rejection again once editable; spec:AST-118 FR10 names a dropped draft only for TimeInput.
  • TimeInput hides its rejection while busy (isLoading or a pending changeAction) and keeps the draft, per spec:AST-118 FR10.
  • useTypedTime has no unit test of its own; the TimeInput and DateTimeInput suites drive it end to end.
  • Size: 1,995 authored lines, just under the 2,000 guideline.

Testing

All runs on the branch head 971db25, Node 24.22.1, pnpm 11.10.0.

$ pnpm exec vitest run packages/core/src/TimeInput packages/core/src/DateTimeInput \
    packages/core/src/DateInput packages/core/src/DateRangeInput packages/core/src/PowerSearch \
    packages/core/src/FormLayout packages/core/src/InputGroup packages/core/src/Field \
    packages/core/src/NumberInput packages/core/src/utils/timeFormat.test.ts \
    packages/core/src/utils/timeParser.test.ts
 Test Files  75 passed (75)
      Tests  2763 passed (2763)

$ pnpm exec vitest run packages/core --maxWorkers=8
 Test Files  853 passed (853)
      Tests  23059 passed (23059)

$ pnpm exec tsc --noEmit -p packages/core
(no output, exit 0)

$ ASTRYX_STRICT_LINT=1 pnpm exec eslint <changed .ts/.tsx/.mjs files>
0 errors (2 "file ignored" warnings for the two .doc.mjs files)

$ pnpm exec prettier --check <changed files>
All matched files use Prettier code style!

$ node internal/eslint-plugin-astryx/no-comment-provenance.baseline.mjs --check
no-comment-provenance baseline is up to date.

$ pnpm check:knowledge
Knowledge templates and records are aligned.

$ pnpm check:changesets
✓ check:changesets — 144 changeset(s) valid; main declares 0.7.16 (patch plan)

$ node scripts/release/changeset-coverage.mjs pr --base origin/main
✓ Changeset coverage — ships to @astryxdesign/core, each named

$ node scripts/pre-review.mjs --base origin/main --head HEAD
Authored lines: 1995 (guideline 2000)
Merge into origin/main: clean
Findings in this change (0): none

pre-commit hook (check:repo + lint-staged): passed on both commits

Mutation checks (each mutation applied alone, then restored). M1–M28 ran on the first commit, M29–M31 on e3ef72d, M32–M33 on a7bf5c07c0, M34–M39 on 8bfff9f, M40–M43 on db6affb, and M44–M47 on 971db25 against the glue around useValueReplacesEntry.

# Mutation Result
M1 12-hour day-period rule ignored in isLocaleTimeComplete killed (4 failed)
M2 both second digits not required killed (1)
M3 unreadable text revealed while typing killed (8)
M4 blur drops a rejected draft killed (27)
M5 Enter is no commit in TimeInput killed (2)
M6 Enter prevented in TimeInput killed (2)
M7 an unfinished edit hides a shown rejection killed (3)
M8 a caller error with a message does not win killed (4)
M9 a warning or success status hides a rejection killed (5)
M10 no hidden input after blur killed (2)
M11 an edit leaves name on the hidden input killed (2)
M12 an unchanged rejection reports again killed (1)
M13 no null report at unmount killed (1)
M14 disabling keeps the draft killed (1)
M15 native blur drops its rejection killed (2)
M16 time message shown over the date message killed (3)
M17 time alert silent when the date message wins killed (2)
M18 Enter is no commit in the time segment killed (1)
M19 a new value keeps the draft killed (3)
M20 the echo of a typed commit drops the draft killed (1)
M21 a caller error silences the rejection's own announcement killed (2)
M22 an unchanged caller error is not announced with the callback killed (1)
M23 a locked field shows its rejection killed (1)
M24 a grouped field shows its own message killed (1)
M25 a native rejection shows no message killed (4)
M26 a fixed draft keeps its rejection killed (1)
M27 a complete out-of-range time waits for commit killed (5)
M28 Enter prevented in the time segment killed (1)
M29 a switch to the typed field keeps the native rejection killed (3)
M30 the native date message does not win over the time message killed (2)
M31 unreadable date text still being typed hides the time message killed (1)
M32 the native control marks its rejection while the field is locked (both components) killed (3)
M33 disabling TimeInput keeps the native rejection killed (1)
M34 a grouped TimeInput treats its own message as announced killed (2)
M35 a grouped TimeInput shows its own status killed (1)
M36 a caller error wins only with the callback ('withCallback' precedence) killed (2)
M37 a native rejection carries no message to the family hook killed (12)
M38 the time segment ignores a pending changeAction killed (1)
M39 typing stops reporting from the handler (the report waits for the Effect) killed (1)
M40 a value passed at the commit that keeps a rejected draft drops it killed (4)
M41 a commit that keeps a rejected draft is not counted killed (4)
M42 a locked field reports from its handlers (typing and commit) killed (2)
M43 a commit alone reports while the field is locked killed (2)
M44 the keep signal passed to useValueReplacesEntry never changes killed (4)
M45 the echo of a typed commit drops the draft (after the switch) killed (1)
M46 a new value keeps the native rejection killed (1)
M47 a new value keeps the draft killed (5)

Real-browser check: Chromium 149 headless through Playwright on 8bfff9f, results under Evidence. Not run: Firefox, WebKit, and screen-reader passes (spec:AST-009).

Writing rubric results

Records touched: docs/specs/components/TimeInput/TimeInput.spec.md, docs/specs/components/DateTimeInput/DateTimeInput.spec.md, docs/families/input-fields.md, docs/specs/AST-118-rejected-entry-feedback/spec.md.

  • R1 narration: none. The edits delete gap lines, add a present-tense ownership bullet for useTypedTime and a DEC-14 clause to FR11 in the TimeInput record, and extend the family Shared owner bullet's member list.
  • R2 research: none in the records; the browser and mutation results live in this description.
  • R3 evidence: the new verification cells name test files and test titles, not changes.
  • R4 rejected alternatives: none added or changed. The ownership bullet says why the existing modules do not hold the time rules, as a fact about what each owns.
  • R5 change references: none; searched for # followed by digits, /pull/, and /issues/ in the touched lines.
  • R6 open questions: none; each record keeps "None".
  • R7 project status: none. The remaining gaps keep the <id> gap: and "Implementation gap:" forms; the AST-118 list keeps only the AR3 gap outside this fix.

…it, and report it

A typed time is complete once it has its hours, both minute digits, both
second digits when the field shows seconds, and, in 12-hour text, its day
period unless the hour reads 0 or 13-23. Until then nothing is marked or
announced. A complete time outside min or max shows at once; text that is
not a time shows at Enter or blur. The rejected text stays in the field, and
a standalone field shows the invalid-time message as its error status, with
aria-invalid and one announcement. Inside an InputGroup the rejection sets
aria-invalid and is announced through the field's alert. An edit that leaves
the draft wrong keeps the shown rejection without a new announcement.

Enter in TimeInput and in DateTimeInput's time field commits the draft and
is not prevented, so a surrounding form still submits. In the open
preset-time list, Enter still picks a time.

A native time control restores the committed time at blur and keeps the
rejection shown. A caller error status with a message still shows over the
field's message and the rejection is announced once; a warning or success
status never hides a rejection. In DateTimeInput the date segment's message
comes first, and a time rejection under it sets aria-invalid on the time
input and is announced.

What a form posts does not change: while blur keeps a rejected TimeInput
draft, a hidden input carries the field's name with the committed time as
the field shows it, until the draft is edited or a new value replaces it.

TimeInput takes an optional onEntryErrorChange that receives a
TimeInputEntryError (kind, the typed text, and the ISO time for
outOfRange) each time the shown rejection changes, and null when it ends.
@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 13, 2026 5:48am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 12, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 2026
@astracat-bot

astracat-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 13, 2026, 5:56 AM UTC

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · ef16e6e

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The behavior matches the current TimeInput and DateTimeInput records, and the tests cover each rule. Three implementation problems need fixing first:

  • TimeInput/useTypedTime.ts (lines 208-330) copies useTypedDateField's entry-error reporting from DateInput/useTypedDate.ts (lines 439-557), including the caller-status precedence, the one-time announcement, the report and its two Effects, so move that logic into the existing owner and call it from both fields, so that a later fix reaches date and time fields alike.
  • TimeInput/useTypedTime.ts is a new internal module shared by TimeInput and DateTimeInput, and no current record names it, so it needs an owner decision that says why the existing modules are not enough, or it needs to shrink into the existing owner.
  • A native time rejection outlives the native control: when adaptive-native switches to the typed field (pointer change) or hasSeconds/increment changes, the field still shows "Invalid time" over a valid committed time until the value changes, so clear that state when the typed surface returns (useTypedTime.ts line 183).

Two smaller notes are inline: DateTimeInput hides the time message while unreadable date text is still being typed, and one comment restates the code.

Claims and files checked
  • Claim: the new callback reports a locale-independent kind, the typed text and, for an out-of-range time, its ISO value. Verified in the hook's draft reader and the callback tests.
  • Claim: the callback runs on a new min, max or value and on disabling, never twice for one rejection, and with null at the end or at unmount. Verified in the report helper, both Effects and the tests.
  • Claim: the native and bottom-sheet surfaces never report. Verified: the sheet branch strips the prop, and the native surface drops the typed draft.
  • Claim: before, unfinished drafts were flagged on each keystroke, shown only by text colour, and reverted at blur with no message, and a native edit outside min/max showed no visible message and cleared at blur. Verified against the base TimeInput and NativeTimeSegment. A lone 1 was flagged only when 01:00 was out of range.
  • Claim: an unfinished time is never flagged, a complete out-of-range time shows at once, and unreadable text shows at Enter or blur. Verified in the completeness helper and the hook's reveal rule.
  • Claim: rejected text stays, with a visible error status, aria-invalid and one announcement; inside an InputGroup it is announced. Verified.
  • Claim: Enter commits and still submits a form, and Enter in the open preset list still picks a time. Verified in both key handlers.
  • Claim: a native control restores the committed time at blur and keeps the rejection. Verified; it also keeps it too long (finding 3).
  • Claim: a caller error with a message still wins and the rejection is announced once, and a warning or success no longer hides a rejection. Verified.
  • Claim: in DateTimeInput the date message comes first and a time rejection under it is announced. Verified, with the inline edge case.
  • Claim: what a form posts does not change, because a hidden input carries the name after blur keeps a rejected draft. Verified.
  • Claim: apps need no code change, and the new hook is not exported. Verified.
  • Claim: the completeness helper reuses the locale reading of the time parser. Verified.
  • Claim: the test, typecheck, lint and mutation results. Not reproduced, because CI has not run on this draft head; the changeset check passes.
  • Files: both changesets, docs/families/input-fields.md, the AST-118 record, the DateTimeInput and TimeInput records, en.json, both .doc.mjs files, DateTimeInput.test.tsx, NativeTimeSegment.tsx, NativeTimeInput.test.tsx, TimeInput.test.tsx, TimeInput/index.ts, timeFormat.ts and timeFormat.test.ts: clear.
  • Files: useTypedTime.ts has findings 1-3; TimeInput.tsx has finding 3's surface switch and a comment note; DateTimeInput.tsx has a non-blocking precedence note.

Automated review (maintainer link)

Resolve DateTimeInput against the date segment's rejected-entry work: the
time segment's status and alert sit after the date segment's field status,
and the date message, typed or from the native date control, comes first
when both segments hold a rejection. Take main's date-segment wording in the
docs and records, and keep only the gaps neither change closes.
…ontrol

A native time rejection now ends when the field switches to the typed
field, as when an adaptive-native field moves to a fine pointer or gains
seconds or a non-1 increment, so the typed field never shows "Invalid time"
over a valid committed time.

DateTimeInput's time message gives way only while the date segment shows
its own message, typed or from the native date control. Unreadable date
text that is still being typed shows no message, so the time message shows.

Remove a comment that restated the change handler.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The rejected-time behavior now matches the current TimeInput and DateTimeInput records, the relevant suites pass, and the surface-switch problem from the last review is fixed. Three problems still block approval:

  • TimeInput/useTypedTime.ts (lines 217-339) still copies the entry-error reporting of useTypedDateField in DateInput/useTypedDate.ts (lines 466-583), so extend that owner and call it from both fields, or land the shared-hook extraction first and build on it, so that a later fix reaches date and time fields alike.
  • TimeInput/useTypedTime.ts is a new internal module shared by TimeInput and DateTimeInput that no current record names, so it needs an owner decision that says why the existing modules are not enough, or it should shrink into the existing owner.
  • Miss: after a native out-of-range time edit, a field that becomes disabled or busy keeps aria-invalid and the invalid text colour with no message, and TimeInput shows "Invalid time" again once enabled, so pass the lock-aware rejection to NativeTimeSegment (TimeInput.tsx line 852, DateTimeInput.tsx line 1975), clear the native rejection when the field becomes disabled, and add a native disabled and busy test.

One non-blocking comment-wording note is inline.

Claims and files checked
  • Claim: the new callback reports a locale-independent kind, the typed text and, for an out-of-range time, its ISO value. Verified in the hook's draft reader and the callback tests.
  • Claim: the callback runs on each change of the shown rejection, including a new min, max or value and disabling, never twice for one rejection, and with null at the end or at unmount. Verified in the report helper, both Effects and the tests.
  • Claim: the native and bottom-sheet surfaces never report. Verified: the hook drops the draft without a typed field, and the sheet branch strips the prop.
  • Claim: before, unfinished drafts were flagged on each keystroke, shown only by text colour and reverted at blur, and a native edit outside min/max showed no message and cleared at blur. Verified against the base source and base browser frames; a lone 1 was flagged only when 01:00 was outside the bounds, as the description says.
  • Claim: an unfinished time is never flagged, a complete out-of-range time shows at once, and unreadable text shows at Enter or blur. Verified in the completeness helper, the hook and browser frames.
  • Claim: rejected text stays, with a visible error status, aria-invalid and one announcement; inside an InputGroup it sets aria-invalid and is announced. Verified.
  • Claim: Enter commits and still submits a form, and Enter in the open preset list still picks a time. Verified in both key handlers and tests.
  • Claim: a native control restores the committed time at blur and keeps its rejection shown. Verified; it also keeps aria-invalid while the field is locked (finding 3).
  • Claim: a caller error with a message still wins and the rejection is announced once, and a warning or success no longer hides a rejection. Verified in tests and browser frames.
  • Claim: in DateTimeInput the date message comes first, a time rejection under it is announced, and unreadable date text still being typed lets the time message show. Verified.
  • Claim: what a form posts does not change, because a hidden input carries the name after blur keeps a rejected draft. Verified.
  • Claim: apps need no code change, the new hook is not exported, and the API change is one optional prop and one type. Verified by comparing the built API surface of base and head.
  • Claim: the completeness helper reuses the time parser's locale reading. Verified.
  • Claim: the records drop the closed gaps and name the tests, and the NumberInput gaps stay. Verified.
  • Claim: the catalog gains no message and only the translator note changes. Verified.
  • Claim: the test, typecheck, lint, format, knowledge and changeset results. Verified for the time, date-time and date suites (32 files, 1,439 tests) and every listed check; the full-package run and the mutation table were not reproduced.
  • Claim: the shared entry-error hook is being extracted in another pull request. That pull request is an open draft, so the copy remains at this head (finding 1).
  • Files: useTypedTime.ts has findings 1-3; TimeInput.tsx has finding 3 and the comment note; DateTimeInput.tsx has findings 2 and 3; NativeTimeSegment.tsx has finding 3.
  • Files: both changesets, docs/families/input-fields.md, the AST-118, DateTimeInput and TimeInput records, en.json, both .doc.mjs files, DateTimeInput.test.tsx, NativeTimeInput.test.tsx, TimeInput.test.tsx, TimeInput/index.ts, timeFormat.ts and timeFormat.test.ts: clear.

Automated review (maintainer link)

… field is locked

A native time control now marks its rejection only while the field is
editable. While the field is disabled or busy it sets no aria-invalid and
no invalid text color, as the message and the alert already hide. A
TimeInput that becomes disabled drops the rejection with its draft, so it
does not return once the field is enabled again; a busy TimeInput, and a
locked DateTimeInput time segment, show it again once editable.

Reword the comment on untyped form attributes.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The native time control now hides its rejection while TimeInput is disabled or busy, and the comment wording from the last review is fixed. Three problems still block approval:

  • TimeInput/useTypedTime.ts (lines 221-343) still copies the entry-error reporting of useTypedDateField in DateInput/useTypedDate.ts (lines 466-583), so extend that owner and call it from both fields, or land the shared-hook extraction first and build on it, so that a later fix reaches date and time fields alike.
  • TimeInput/useTypedTime.ts is a new internal module shared by TimeInput and DateTimeInput that no current record names, so it needs an owner decision that says why the existing modules are not enough, or it should shrink into the existing owner.
  • DateTimeInput.tsx line 868 locks the time segment only on isEffectivelyDisabled, which leaves out a pending changeAction on native segments, so a busy field still shows "Invalid time" and aria-invalid on the native time control; pass isEffectivelyDisabled || isBusy, as the native date rejection does, and add a pending-changeAction test.

The third point is the part of the last review's locked-state finding that this head leaves open.

Claims and files checked
  • Claim: the new callback reports a locale-independent kind, the typed text and, for an out-of-range time, its ISO value. Verified in the hook's draft reader and the callback tests.
  • Claim: the callback runs on each change of the shown rejection, including a new min, max or value and disabling, never twice for one rejection, and with null at the end or at unmount. Verified in the report helper, both Effects and the tests.
  • Claim: the native and bottom-sheet surfaces never report. Verified: the hook drops the draft without a typed field, and the sheet branch strips the prop.
  • Claim: before, unfinished drafts were flagged on each keystroke, shown only by text colour and reverted at blur, and a native edit outside min/max showed no message and cleared at blur. Verified against the base source and base browser frames.
  • Claim: an unfinished time is never flagged, a complete out-of-range time shows at once, and unreadable text shows at Enter or blur. Verified in the completeness helper, the hook, tests and browser frames.
  • Claim: rejected text stays, with a visible error status, aria-invalid and one announcement; inside an InputGroup it sets aria-invalid and is announced. Verified.
  • Claim: Enter commits and still submits a form, and Enter in the open preset list still picks a time. Verified in both key handlers and tests.
  • Claim: a native control restores the committed time at blur and keeps its rejection shown. Verified.
  • Claim: while the field is disabled or busy, the native control marks no rejection, and a TimeInput that becomes disabled drops it. Verified for TimeInput and for a disabled or loading DateTimeInput; false for a DateTimeInput busy with a pending changeAction on native segments (third point).
  • Claim: a caller error with a message still wins and the rejection is announced once, and a warning or success no longer hides a rejection. Verified in tests and browser frames.
  • Claim: in DateTimeInput the date message comes first, a time rejection under it is announced, and unreadable date text still being typed lets the time message show. Verified.
  • Claim: what a form posts does not change, because a hidden input carries the name after blur keeps a rejected draft. Verified.
  • Claim: apps need no code change, the new hook is not exported, and the API change is one optional prop and one type. Verified by comparing the built API surface of base and head.
  • Claim: the completeness helper reuses the time parser's locale reading. Verified.
  • Claim: the records drop the closed gaps and name the tests, and the NumberInput gaps stay. Verified.
  • Claim: the catalog gains no message and only the translator note changes. Verified.
  • Claim: the shared entry-error hook is being extracted in another pull request. That pull request is still an open draft, so the copy remains at this head (first point).
  • Claim: the test, typecheck, lint and format results. Verified for the time, date-time and date suites (32 files, 1,442 tests), the core typecheck, lint and format; the full-package run and the mutation table were not reproduced, and the commit the description names for its runs is not in this pull request's history.
  • Files: useTypedTime.ts has the first and second points; DateTimeInput.tsx has the second and third points.
  • Files: both changesets, docs/families/input-fields.md, the AST-118, DateTimeInput and TimeInput records, en.json, both .doc.mjs files, DateTimeInput.test.tsx, NativeTimeSegment.tsx, NativeTimeInput.test.tsx, TimeInput.test.tsx, TimeInput.tsx, TimeInput/index.ts, timeFormat.ts and timeFormat.test.ts: clear.

Automated review (maintainer link)

Resolve the AST-118 and family gap lines against NumberInput's rejected-entry
work: keep only the DateInput gap that main still records, and list every
member's rejected-entry suites in the family verification row.
…e family hook

useTypedTime now keeps only the time rules: the typed draft, its point of
completion, its commit at Enter and blur, the kept draft and its form value,
and the native control's rejection. The status a rejection takes over a
caller status, the alert, and the onEntryErrorChange report come from
Field/useEntryErrorReport, with a caller error status always winning, as in
NumberInput. A grouped TimeInput still shows no status of its own.

The TimeInput record names useTypedTime and why DateTimeInput's time segment
shares it, and the family record lists TimeInput among the hook's users.

DateTimeInput's time segment now also hides its native rejection while a
changeAction is pending, as the native date rejection does.
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec 8bfff9f

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 13, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The reporting now goes through the shared entry-error hook, the TimeInput record names useTypedTime, and the time segment hides its rejection while a changeAction is pending, so the three problems from the last review are fixed. Two problems block approval:

  • Newly live check: TimeInput/useTypedTime.ts (lines 153-165) drops the kept rejected text whenever a new value arrives, so a caller that restores its value from the onBlur or Enter that reveals the rejection erases the person's entry and its message in TimeInput and DateTimeInput, which spec:AST-118 FR4, FR6, FR8 and DEC-14 forbid; keep the draft when the same update revealed the rejection, as NumberInput does, and add restoring-caller tests for both components.
  • Miss: TimeInput/useTypedTime.ts (lines 230-234 and 258) calls reportEntryError while the field is busy, so with isLoading or a pending changeAction the onEntryErrorChange callback receives a rejection, then null, then the same rejection again once idle, against spec:AST-118 FR10 and FR8; report only while the field is not locked and add busy callback tests.
Claims and files checked
  • Claim: the new callback reports a locale-independent kind, the typed text and, for an out-of-range time, its ISO value. Verified in the hook's draft reader and the callback tests.
  • Claim: the callback runs on each change of the shown rejection, including a new min, max or value and disabling, never twice for one rejection, and with null at the end or at unmount. Verified while the field is editable; false while it is busy, where it reports a rejection, null, then the same rejection again (second point).
  • Claim: the native and bottom-sheet surfaces never report. Verified: the hook drops the draft without a typed field, and the sheet branch strips the prop.
  • Claim: before, unfinished drafts were flagged on each keystroke, shown only by text colour and reverted at blur, and a native edit outside min/max showed no message and cleared at blur. Verified against the base source and base browser frames.
  • Claim: an unfinished time is never flagged, a complete out-of-range time shows at once, and unreadable text shows at Enter or blur. Verified in the completeness helper, the hook, tests and browser frames.
  • Claim: rejected text stays, with a visible error status, aria-invalid and one announcement; inside an InputGroup it sets aria-invalid and is announced. Verified, except when the caller passes a new value at the revealing Enter or blur, where the text is dropped (first point).
  • Claim: Enter commits and still submits a form, and Enter in the open preset list still picks a time. Verified in both key handlers and tests.
  • Claim: a native control restores the committed time at blur and keeps its rejection shown, and hides it while the field is disabled or busy, including a pending change action. Verified in tests.
  • Claim: a caller error with a message still wins and the rejection is announced once, and a warning or success no longer hides a rejection. Verified in tests and browser frames.
  • Claim: in DateTimeInput the date message comes first, a time rejection under it is announced, and unreadable date text still being typed lets the time message show. Verified in tests.
  • Claim: what a form posts does not change, because a hidden input carries the name after blur keeps a rejected draft. Verified in tests.
  • Claim: status, alert and report go through the shared entry-error hook with caller errors always winning, and a grouped field shows no status of its own. Verified in the hook call and the grouped tests.
  • Claim: apps need no code change, the new hook is not exported, and the API change is one optional prop and one type. Verified by comparing the built API surface of base and head.
  • Claim: the completeness helper reuses the time parser's locale reading. Verified.
  • Claim: the records drop the closed gaps, name the tests and name the new hook. Verified; the dropped first-point gap lines overstate conformance until the first point is fixed.
  • Claim: the catalog gains no message and only the translator note changes. Verified.
  • Claim: the test, typecheck, lint and browser results. Verified for the time, date-time, date, number, field and input-group suites (53 files, 2,038 tests), the core typecheck, lint and three Chromium scenarios; the full-package run and the mutation table were not reproduced.
  • Files: useTypedTime.ts has both points; DateTimeInput.tsx shares the first point through the hook.
  • Files: the AST-118, TimeInput and DateTimeInput records and both changesets carry promises the two points break.
  • Files: docs/families/input-fields.md, en.json, both .doc.mjs files, DateTimeInput.test.tsx, NativeTimeSegment.tsx, useEntryErrorReport.ts, NativeTimeInput.test.tsx, TimeInput.test.tsx, TimeInput.tsx, TimeInput/index.ts, timeFormat.ts and timeFormat.test.ts: clear.

Automated review (maintainer link)

…estores its value

A value that the caller passes in the same update as an Enter or blur that
keeps a rejected time, as a caller that restores its own value at that
commit does, no longer replaces the kept text. The text, its message, and
its rejection stay, and a later new value replaces them.

A disabled or busy TimeInput no longer reports a rejection that typing,
Enter, or blur causes. It reports null while locked, and the rejection once
the field is editable, so the caller does not receive the same rejection
twice.
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec db6affb

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI. Required CI is still running on this head, so the pull request merges only once those checks pass. The two problems from the last review are fixed: a caller value passed at the Enter or blur that keeps a rejected time now keeps the text and its message, and a disabled or busy TimeInput no longer reports rejections from its handlers, both with tests that fail on the previous head. One optional comment suggestion is inline.

Claims and files checked
  • Claim: the new callback reports a locale-independent kind, the typed text and, for an out-of-range time, its ISO value. Verified in the hook's draft reader and the callback tests.
  • Claim: the callback runs on each change of the shown rejection, including a new min, max or value and disabling, never twice for one rejection, and with null at the end or at unmount. Verified in the callback tests, including the busy and pending-action cases.
  • Claim: the native and bottom-sheet surfaces never report. Verified: the hook drops the draft without a typed field, and the sheet branch strips the prop.
  • Claim: before, unfinished drafts were flagged on each keystroke, shown only by text colour and reverted at blur, and a native edit outside min/max showed no message and cleared at blur. Verified against the base source and base browser frames.
  • Claim: an unfinished time is never flagged, a complete out-of-range time shows at once, and unreadable text shows at Enter or blur. Verified in the completeness helper, the hook, tests and browser frames.
  • Claim: rejected text stays, with a visible error status, aria-invalid and one announcement; inside an InputGroup it sets aria-invalid and is announced. Verified in tests and browser frames.
  • Claim: a value the caller passes at the Enter or blur that keeps a rejected time keeps the text, its rejection and its message, and a later value replaces it. Verified in both components' restoring-caller tests.
  • Claim: a disabled or busy field marks, shows, announces and reports nothing, then shows and reports a kept rejection once editable, and a disabled TimeInput drops its draft. Verified in tests.
  • Claim: Enter commits and still submits a form, and Enter in the open preset list still picks a time. Verified in both key handlers and tests.
  • Claim: a native control restores the committed time at blur and keeps its rejection shown, and a switch to the typed field ends it. Verified in tests.
  • Claim: a caller error with a message still wins and the rejection is announced once, and a warning or success no longer hides a rejection. Verified in tests and browser frames.
  • Claim: in DateTimeInput the date message comes first, a time rejection under it is announced, and unreadable date text still being typed lets the time message show. Verified in tests.
  • Claim: what a form posts does not change, because a hidden input carries the name and form after blur keeps a rejected draft. Verified in tests.
  • Claim: apps need no code change, the new hook is not exported, and the API change is one optional prop and one type. Verified by comparing the built API surface of base and head.
  • Claim: the completeness helper reuses the time parser's locale reading, and the shared entry-error hook changes only in its header. Verified.
  • Claim: the records drop the closed gaps, name the tests and name the new hook, and the catalog only updates its translator note. Verified.
  • Claim: the test, typecheck, lint, formatting, knowledge and changeset results. Verified on this head for the time, date-time, date, number, field and input-group suites (54 files, 2,084 tests) and every listed check; the full-package run, the mutation table and the native browser scenarios were not reproduced, and the transcript names commits that are not in the branch history.
  • Claim: 1,998 authored lines. Verified.
  • Files: useTypedTime.ts has one optional comment suggestion.
  • Files: both changesets, docs/families/input-fields.md, the three spec records, en.json, both .doc.mjs files, DateTimeInput.test.tsx, DateTimeInput.tsx, NativeTimeSegment.tsx, useEntryErrorReport.ts, NativeTimeInput.test.tsx, TimeInput.test.tsx, TimeInput.tsx, TimeInput/index.ts, timeFormat.ts and timeFormat.test.ts: clear.

Automated review (maintainer link)

// How the draft was last committed. After blur, a hidden input carries the
// field's name until the next edit.
const [committedBy, setCommittedBy] = useState<'enter' | 'blur' | null>(null);
// Counts the commits that kept a rejected draft.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (comment style): this repeats keptCommits and its count + 1 update; the reason is in the comment at line 153. Suggest keeping only the reason: "A value passed in the same update as one of these commits keeps the draft."

@nynexman4464
nynexman4464 marked this pull request as ready for review November 13, 2026 04:04
github-actions Bot added a commit that referenced this pull request Nov 13, 2026
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec ef16e6e

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI. The rejected-time behavior matches the current TimeInput, DateTimeInput and rejected-entry records, the record edits carry an engineering owner's approval for this head, and the one new commit correctly drops the four lint-baseline entries for the comments this pull request removed, so the lint check passes now.

  • Next: the main CI run on this head was refused for capacity ("CI is full") and cancelled, so CI needs a re-run before this merges.
  • Non-blocking: the comment at useTypedTime.ts:104 still restates keptCommits; keeping only the reason would read better.
Claims and files checked
  • Claim, feature changeset: onEntryErrorChange reports each change of a typed-text rejection with kind, text and, out of range, value, never twice, and null at its end or at unmount; the native and sheet surfaces never report. Verified (useTypedTime.ts:33-44, :222-235; TimeInput.tsx:1046; the onEntryErrorChange and native "never reports" tests).
  • Claim, fix changeset: unfinished times are never flagged, a complete out-of-range time shows at once, unreadable text shows at Enter or blur, the text stays, and a standalone field shows "Invalid time" as its error status with aria-invalid and one announcement. Verified (rejected-entry suites; Chromium frames).
  • Claim, fix changeset: Enter commits and still submits a form, the open preset list still picks, a native edit is restored at blur with its rejection kept, a caller error with a message wins, a warning or success no longer hides a rejection, the date message comes first, and a hidden input posts the committed time. Verified (Enter-in-a-form, preset-list, native, caller-status, both-segments and hidden-input tests).
  • Claim, description: apps change no code and accepted times still reach onChange as before. Verified (existing onChange tests pass).
  • Claim, description: status, alert and report go through the shared entry-error hook, which changes only in its header. Verified (useTypedTime.ts:222-229; the hook's diff).
  • Claim, description: the new internal hook holds the time rules and the TimeInput record names it. Verified (TimeInput.spec.md:96-103).
  • Claim, description: completion reuses the locale reading of the time parser. Verified (timeFormat.ts:252, :330; isLocaleTimeComplete tests).
  • Claim, description: a value passed at the Enter or blur that keeps a rejected draft keeps it. Verified (useTypedTime.ts:157-174; restoring-caller tests).
  • Claim, description: disabled and busy fields show and report nothing and report once editable; TimeInput drops its draft when disabled. Verified (useTypedTime.ts:175-184, :213-235; disabled and busy tests).
  • Claim, description: the record gap lines are removed and the verification rows name tests; the catalog adds no message. Verified (record diffs; knowledge check; en.json).
  • Claim, description: the public API adds only the optional prop and its error type; the native segment gains three internal props. Verified (built API surface; NativeTimeSegment.tsx).
  • Claim, description: the listed known limits (prefix commit, no unit test of the hook, DateTimeInput keeps its draft through a lock). Verified as stated.
  • Claim, description: 1,998 authored lines. Verified, counting the regenerated lint baseline as generated (2,002 changed lines).
  • Claim, description: the test, typecheck, lint, knowledge, changeset and formatting runs pass. Verified by re-running them on this head, plus real-browser checks of Enter submission, the hidden-input post and the native restore; the full-package run and the mutation table were not re-run.
  • Files: .changeset/time-input-entry-error-change.md, .changeset/time-input-rejected-entry.md, docs/families/input-fields.md, docs/specs/AST-118-rejected-entry-feedback/spec.md, docs/specs/components/DateTimeInput/DateTimeInput.spec.md, docs/specs/components/TimeInput/TimeInput.spec.md, internal/eslint-plugin-astryx/no-comment-provenance.baseline.json, packages/core/locales/en.json, packages/core/src/DateTimeInput/DateTimeInput.doc.mjs, packages/core/src/DateTimeInput/DateTimeInput.test.tsx, packages/core/src/DateTimeInput/DateTimeInput.tsx, packages/core/src/DateTimeInput/NativeTimeSegment.tsx, packages/core/src/Field/useEntryErrorReport.ts, packages/core/src/TimeInput/NativeTimeInput.test.tsx, packages/core/src/TimeInput/TimeInput.doc.mjs, packages/core/src/TimeInput/TimeInput.test.tsx, packages/core/src/TimeInput/TimeInput.tsx, packages/core/src/TimeInput/index.ts, packages/core/src/utils/timeFormat.test.ts, packages/core/src/utils/timeFormat.ts: clear.
  • File: packages/core/src/TimeInput/useTypedTime.ts: one non-blocking comment suggestion at line 104.

Automated review (maintainer link)

Resolve the AST-118 gap list and the DateTimeInput FR16 verification row
against the date segment's commit-value work: no time-segment gap remains,
and the row names both segments' suites.
…the family hook

useTypedTime asks Field/useValueReplacesEntry whether a new value replaces
the kept draft, with the count of commits that keep a rejected draft as the
keep signal, in place of its own record. The echo of a time that typing
committed still keeps the draft.

The family record lists TimeInput among the members that share
useEntryErrorReport and useValueReplacesEntry.
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec 971db25

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI. The rejected-time behavior matches the current TimeInput, DateTimeInput and rejected-entry records, the record edits carry an engineering owner's approval for this head, and moving the restored-value rule onto the shared value-replacement hook keeps the behavior its tests guard.

  • Next: CI's test legs are still running on this head, so this merges only once they pass.
  • Non-blocking: the comment at useTypedTime.ts:106 still restates keptCommits; naming its role as the keep signal for useValueReplacesEntry would read better.
Claims and files checked
  • Feature changeset: the new callback reports why typed text is rejected, with a locale-independent kind, the typed text and, out of range, the ISO time; it runs on each change of the shown rejection (including a new min, max or value, or disabling), never twice, and with null at its end or at unmount; the native and bottom-sheet surfaces never report. Verified (useTypedTime.ts:35-46, :119-147, :216-229; TimeInput.tsx sheet case; the onEntryErrorChange and native/sheet "never reports" tests).
  • Fix changeset: unfinished times are never flagged, a complete out-of-range time shows at once, unreadable text shows at Enter or blur, the text stays, and a standalone field shows "Invalid time" as its error status with aria-invalid and one announcement; in an InputGroup it sets aria-invalid and is announced. Verified (rejected-entry suites; Chromium frames).
  • Fix changeset: Enter commits and still submits a form, the open preset list still picks, a native edit is restored at blur with its rejection kept, a caller error with a message wins and the rejection is announced once, a warning or success no longer hides a rejection, the date message comes first, and a hidden input posts the committed time after blur. Verified (Enter-in-a-form, preset-list, native, caller-status, both-segments and hidden-input tests).
  • Description: apps change no code; the committed value, onChange and what a form posts behave as before. Verified (existing onChange tests pass; hidden-input tests).
  • Description: status, alert and report go through the shared entry-error hook with caller errors always winning, as NumberInput does. Verified (useTypedTime.ts:216; NumberInput.tsx:807).
  • Description: a value passed at the Enter or blur that keeps a rejected draft keeps it, decided by the shared value-replacement hook with the count of keeping commits as its signal; the echo of a typed commit also keeps it. Verified (useTypedTime.ts:158-168; restoring-caller tests, which fail when the signal is removed).
  • Description: the new internal hook holds only the time rules and the TimeInput record names it. Verified (TimeInput.spec.md:96-103).
  • Description: completion reuses the time parser's locale reading. Verified (timeFormat.ts:252, :330; completion tests).
  • Description: disabled and busy fields show and report nothing and report once editable; TimeInput drops its draft and native rejection when disabled; DateTimeInput's native segments lock while busy too. Verified (useTypedTime.ts:169-178, :207-229; disabled and busy tests).
  • Description: in DateTimeInput, the date message shows whenever it shows, and unreadable date text still being typed leaves the time message showing. Verified (DateTimeInput.tsx:1106-1114; both-segments tests).
  • Description: the record gap lines are removed, the verification rows name tests, and the catalog adds no message. Verified (record diffs; knowledge check; en.json).
  • Description: the public API adds only the optional prop and its error type; the native segment gains three internal props; the two family hooks change only in their header comments. Verified (built API surface; diffs).
  • Description: the listed known limits (prefix commit, empty native value while retyping, DateTimeInput keeps its draft through a lock, TimeInput hides its rejection while busy, no unit test of the hook). Verified as stated.
  • Description: 1,995 authored lines. Verified as the repository's count; 1,991 with the regenerated lint baseline excluded.
  • Description: the test, typecheck, lint, formatting, baseline, knowledge and changeset runs pass, and the branch merges cleanly into main. Verified by re-running them and the merge on this head, plus one of the listed mutations; the full-package run and the earlier real-browser checks were not re-run.
  • Files: .changeset/time-input-entry-error-change.md, .changeset/time-input-rejected-entry.md, docs/families/input-fields.md, docs/specs/AST-118-rejected-entry-feedback/spec.md, docs/specs/components/DateTimeInput/DateTimeInput.spec.md, docs/specs/components/TimeInput/TimeInput.spec.md, internal/eslint-plugin-astryx/no-comment-provenance.baseline.json, packages/core/locales/en.json, packages/core/src/DateTimeInput/DateTimeInput.doc.mjs, packages/core/src/DateTimeInput/DateTimeInput.test.tsx, packages/core/src/DateTimeInput/DateTimeInput.tsx, packages/core/src/DateTimeInput/NativeTimeSegment.tsx, packages/core/src/Field/useEntryErrorReport.ts, packages/core/src/Field/useValueReplacesEntry.ts, packages/core/src/TimeInput/NativeTimeInput.test.tsx, packages/core/src/TimeInput/TimeInput.doc.mjs, packages/core/src/TimeInput/TimeInput.test.tsx, packages/core/src/TimeInput/TimeInput.tsx, packages/core/src/TimeInput/index.ts, packages/core/src/utils/timeFormat.test.ts, packages/core/src/utils/timeFormat.ts: clear.
  • File: packages/core/src/TimeInput/useTypedTime.ts: one non-blocking comment suggestion at line 106.

Automated review (maintainer link)

github-actions Bot added a commit that referenced this pull request Nov 13, 2026
@nynexman4464
nynexman4464 merged commit a32287b into main Nov 13, 2026
79 checks passed
@github-actions
github-actions Bot deleted the nynexman4464/fix/time-input-rejected-entry branch November 14, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 971db254 Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant