Skip to content

fix(NumberInput): keep a rejected number entry and show why - #11415

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

nynexman4464 merged 9 commits into
mainfrom
nynexman4464/fix/number-input-rejected-entry

Conversation

@nynexman4464

@nynexman4464 nynexman4464 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

User impact

People who type into a NumberInput, including screen-reader users and people who do not perceive color. Before this change, every draft that was not an accepted number, an unfinished one such as - included, set aria-invalid and was announced on each keystroke, while the only visible sign was secondary text color. Blur then reverted a draft that did not parse, with no message, so the entry was discarded silently. After it, nothing is flagged while a person types, and at Enter or blur a rejected entry stays in the field with a visible message, the invalid state, and one announcement, so the person learns once why it was not accepted and can correct what they typed. Apps change no code.

Problem and solution fit

  • Why does the defect occur? A typed number has no fixed length, yet NumberInput judged every keystroke as if the draft were finished, and its only rejection message lived in a visually hidden alert. At blur it threw the draft away.
  • Why does it harm the task? A lone - or 1 under min={10} reads as an error while the person is still typing, and a sighted person gets only a color change, never the reason. A blurred mistake disappears, so the person may not notice the value they meant was never committed.
  • Why does that matter? It fails WCAG 2.2 1.4.1 (Use of Color) and 3.3.1 (Error Identification), both Level A.

The fix moves the point of judgment to commit (Enter or blur), keeps the rejected text, and shows its message as the field's error status with aria-invalid and one announcement, all signals together.

Expected behavior and authority

  • component:NumberInput FR2, FR3, FR6, FR15, FR16, AR2, and the Range and Entry error rows.
  • spec:AST-118 FR1–FR10, DEC-7 (a shown rejection stays until the entry is valid), DEC-12 (a typed number is complete only at commit), DEC-13 (what a form posts does not change), DEC-14 (a value passed at the revealing commit keeps the rejected entry).
  • family:input-fields FR15, and its Shared owner section for the shared hook.
  • component:Pagination FR10 (the input variant delegates its page box to NumberInput) and FR15 (the row keeps every control on screen).
  • spec:AST-017 FR53: one accessibility behavior fix, shipped as a patch.

Smallest restoration

  • numberInputCommit.ts gains getNumberInputRejection, which names why a draft cannot commit: unreadable, fractional (integer-only), or outOfRange (any number while min is above max). A number outside an ordinary range still clamps.
  • NumberInput keeps the rejection that the latest Enter or blur revealed. Typing reveals nothing. An edit that makes the draft valid or empty clears it at once; an edit that leaves it wrong keeps it without a new announcement. A new value replaces a rejected draft, or a draft that blur kept (including one whose rejection a new min, max, or isIntegerOnly ended). When one update brings a new value and new rules, the new value replaces the draft and the rules do not judge it again. An arrow, wheel, or stepper step, the clear button, or disabling the field also ends the draft.
  • A value that the caller passes in the same update as the Enter or blur that reveals the rejection (Table's inline number filter restores its pre-edit value there) keeps the draft, its rejection, and its message, and reports nothing; a later new value replaces it. The owner ruled this; component:NumberInput FR3 and spec:AST-118 FR4, FR6, FR8, and DEC-14 state it for every member.
  • Standalone, the rejection shows "Invalid number" as the field's error status in the field's status placement, described by aria-describedby, with aria-invalid and the secondary text color. Field announces the status; the field's own alert carries only a message that no shown status announces. Inside an InputGroup the alert announces it.
  • Caller status (FR7): an error status with a message shows in place of the field's message; aria-invalid stays; without onEntryErrorChange the alert announces the rejection's message once, and with it the caller's message is the one announced (once through the alert when the message does not change). A warning or success status, or an error status without a message, never hides a rejection.
  • Form value (FR6, DEC-13): while blur keeps a rejected draft, a hidden input carries htmlName with the committed number as the release showed it (plain at rest, locale-formatted while focused), and the visible input carries no name until the draft is edited or a new value replaces it. With formatValue, the existing hidden input is unchanged. After Enter, the visible input keeps name and posts the typed text, as before.
  • onEntryErrorChange and the exported NumberInputEntryError (kind, text, value?) follow the DateInput firing rules: changes only, null when the rejection ends or the field unmounts during one, and a one-render hold before the field shows its own message for a rejection a prop change starts.
  • Pagination's input variant: its 32 px page box shows the rejection on its status icon (statusVariant="tooltip"), where hover and keyboard focus reveal "Invalid number" and Field announces it, and the box widens by --spacing-10 (32 px to 72 px at md) while the rejection stands, so the typed text stays visible beside the icon. The bar keeps its height, and the box returns to its width when the rejection ends. Pagination learns of the rejection through onEntryErrorChange. component:Pagination FR10 now states this presentation.
  • @astryx.numberInput.invalidNumber keeps its text; its catalog description now says the message is shown and announced at commit and the text stays.
  • The .doc.mjs (English, Chinese, dense) and JSDoc describe status precedence, onEntryErrorChange, and the htmlName form value.

The optional onEntryErrorChange prop is new public API inside a bug fix. spec:AST-118 Compatibility admits it under spec:AST-017 FR5 as part of the same FR53 fix, so it is listed here rather than split.

One shared entry-error hook

DateInput (and DateTimeInput's date segment, through useTypedDateField) and NumberInput kept two copies of the same logic. It is now one internal hook, packages/core/src/Field/useEntryErrorReport.ts, and both call it; neither keeps its own copy. It owns the caller-status precedence, the alert and its one-time announcement of an unchanged caller error, the onEntryErrorChange report and its two Effects, the one-render hold, and isSameEntryError (a field-by-field comparison over a generic error type). It starts from the NumberInput version: the latest callback goes through useCommittedRef, and the status record is render-phase state, not a ref written during render.

Each member passes its rejection, its message (or null when it shows none), whether the shown status announces itself (false inside an InputGroup), and callerErrorPrecedence: 'always' for NumberInput, 'withCallback' for DateInput. When an entry is rejected and what its message says stay with the member. TimeInput adopts it in its own pull request.

  • Location. Field/ already holds the internal pieces that several input-field members import: InputClearButton, fieldParts, inputDisabledFocus, textEntryTraits, and the types the hook uses. The family record names Field as the collaborator that provides shared field chrome. hooks/ was the other candidate, but its index is the public ./hooks entry, and an internal hook there reads as public. DateInput/ would make NumberInput and TimeInput import from a sibling member's folder.
  • Record. family:input-fields Shared owner names the hook and what it owns, and its verified_by lists the hook's test. spec:AST-118's path list includes the file, so pnpm specs:for routes it to AST-118, the family, and component:Field.
  • No behavior change for DateInput or DateTimeInput: their suites pass unchanged.

Merge

origin/main is merged in (a merge commit, after the DateInput change landed). Conflicts were in the spec:AST-118 gap list and the family:input-fields FR15 gap line; the resolution keeps main's DateInput fixes and drops NumberInput from both, as this pull request closes those gaps.

Evidence

  • Reproduction before the change: the new NumberInput.rejectedEntry.test.tsx run against the base's source fails 42 of 54 tests (typing marks and announces -, 1a, 1.5, 150 past max; blur reverts; no visible message; no onEntryErrorChange).

  • Result after the change: the NumberInput and Pagination suites pass (512 tests), and the full core suite passes.

  • Representative unchanged path: the tests that pass on both sides cover clamping at commit, the form value posted after blur (the release reverts and posts the committed number; this change keeps the text and posts the same value from a hidden input), Enter posting the typed text, formatValue's hidden input, and an arrow step from the committed value. Every DateInput and DateTimeInput test passes on the shared hook unchanged.

  • Layout: a rejection now adds a status icon and, in the attached or detached placement, a message box under every standalone NumberInput that shows one; the field is otherwise laid out as before, and a NumberInput with no rejection is unchanged. Pagination's page box changes as described above.

  • Real browser (Chromium 149, Storybook "Core/Pagination / Variant: Input", type abc into the page box, then press outside it):

    On the base (main), the same steps revert the page box to page 3 in a 32 px bar with no message.

Previous head of this PR (b8f8c80) After
Bar height 68 px 32 px
Page box / input width 32 px / 0 px 72 px / 26 px
Typed text hidden abc visible, fits the box
Message a 32 × 52 px box spilling under / 10 and the next-page button on the status icon; hover shows "Invalid number"; Tab reaches the icon button ("Error details") and its tooltip opens
Announced "Invalid number" "Invalid number"
aria-invalid, described by true, "Invalid number" true, "Invalid number"
  • Regression test or other mutation-sensitive proof: 25 NumberInput mutations, 2 Pagination mutations, and 11 shared-hook mutations, each of one behavior, each fails at least one test (tables under Testing).

Scope

Components: NumberInput, Pagination (page box presentation), DateInput (internal refactor only), Field (new internal hook)

  • 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. (onEntryErrorChange and the Pagination page box are named above.)
  • Public text and artifacts contain no internal Meta context.

Not in this change: entryErrorBehavior (spec:AST-117; NumberInput FR14 keeps its gap), a visible message for a member inside an InputGroup (spec:AST-118 AR3, owned by the InputGroup records), the TimeInput parts of spec:AST-118, and DateInput keeping kept text when the caller passes a value at the revealing commit (spec:AST-118 lists it as an FR4, FR6 gap; DateInput drops the text today).

Other observable deltas that follow from the record: Table's inline number filter keeps a rejected draft at Enter with its message, as its test already expected.

Two changesets for @astryxdesign/core: a [fix] for the FR53 behavior (names the old and new behavior, both success criteria, and the Pagination page box) and a [feat] for onEntryErrorChange. The repository's changeset check takes one category per file. The hook extraction is internal and needs none.

Testing

$ pnpm exec vitest run --maxWorkers=10 packages/core
 Test Files  852 passed (852)
      Tests  22909 passed (22909)

$ pnpm exec vitest run packages/core/src/NumberInput packages/core/src/Pagination
 Test Files  8 passed (8)
      Tests  512 passed (512)

# NumberInput.rejectedEntry.test.tsx against the base's source
      Tests  42 failed | 12 passed (54)

# Real browser: Storybook dev server, Playwright Chromium, story core-pagination--input-variant
previous head (b8f8c800d2): barHeight 68, controlWidth 32, inputWidth 0,  value "abc", textFits false, message box 32x52
after:  barHeight 32, controlWidth 72, inputWidth 26, value "abc", textFits true,  no message box,
        hover tooltip "Invalid number", focus on "Error details" opens "Invalid number",
        assertive live region "Invalid number"

$ pnpm exec tsc --noEmit -p packages/core                      # 0 errors
$ ASTRYX_STRICT_LINT=1 pnpm exec eslint <changed .ts/.tsx/.mjs> # 0 errors (1 existing warning: unused BaseProps import)
$ pnpm exec prettier --check <changed files>                    # All matched files use Prettier code style!
$ pnpm check:knowledge                                          # Knowledge templates and records are aligned.
$ pnpm check:changesets                                         # 92 changeset(s) valid
$ pnpm check:sync                                               # All SYNC comments are clean.
$ pnpm review:pre
Authored lines: 1997 (guideline 2000; lockfiles, snapshots, and generated files excluded)
Merge into origin/main: clean
Findings in this change (0): none

NumberInput mutation checks. Each row breaks one behavior once; the NumberInput, Pagination, and Table-filter suites run; at least one test fails each time.

Mutation Failing tests
Typing reveals a rejection 18
Blur reverts a rejected draft 30
No visible message (error status without text) 17
Message left out of aria-describedby 8
No aria-invalid for a rejection 26
A number past an ordinary bound is rejected instead of clamped 11
Visible input keeps name after blur keeps a draft 3
Hidden value ignores the focused locale format 1
A warning status hides a rejection 1
No alert under a caller error status without the callback 2
Unchanged caller error not announced through the alert 1
Grouped rejection not announced 1
An unchanged rejection reports again 2
No null at unmount 1
Disabling keeps the draft 2
An edit to a valid draft keeps the rejection 9
Any edit clears the rejection 2
A new value keeps a rejected draft 3
A new value keeps a blur-kept draft that new rules accepted 1
New rules judge a draft that a new value replaced in the same update 1
A value changed at the revealing commit drops the draft 3
New rules do not judge the draft again 2
A held stepper value keeps showing the rejection 1
Range checked before the integer rule 1
Report omits value 3

Pagination mutation checks, against the Pagination suite.

Mutation Failing tests
Page box without statusVariant="tooltip" (message box under the bar) 1
Page box does not widen while a rejection stands 1

Shared-hook mutation checks, on Field/useEntryErrorReport.ts, against its own test and the DateInput, DateTimeInput, and NumberInput suites (1,510 tests).

Mutation Failing tests
'always' precedence ignored 2
'withCallback' precedence treated as 'always' 4
A warning status hides a rejection 7
Unchanged caller error never repeated through the alert 3
Caller error repeated even after it changed 7
Alert ignores whether the status announces itself 3
Handler report not deduplicated 9
Prop-change report never sent 11
No one-render hold 1
No null at unmount 4
isSameEntryError compares kind and text only 1

Writing rubric results

Records touched: component:NumberInput, family:input-fields, spec:AST-118, and component:Pagination (FR10 and its verification row).

R1 narration: none. The FR4, FR6, and FR8 amendments, DEC-14, the NumberInput FR3 sentence, the family Shared owner bullet, and the Pagination FR10 sentence (a rejected entry stays in the page box with the tooltip status, and the box widens by --spacing-10 while it stands) state what the system does, in the present tense.
R2 research: none.
R3 evidence: verification cells name test files and suites, including the Pagination FR10 row's rejected-entry case; NumberInput FR15 and FR16 bases read "current tests" in place of "proposal".
R4 rejected alternatives: none added; DEC-14 carries no Rejected line.
R5 change references: none (searched for # followed by digits, /pull/, /issues/).
R6 open questions: none.
R7 project status: the NumberInput FR15, FR16, and AR2 implementation gaps, the NumberInput current-state bullet, and the NumberInput mentions in the family:input-fields FR15 gap and spec:AST-118 gap list are removed. One gap is added in the <id> gap: form: "FR4, FR6 gap: DateInput drops kept date text and its rejection when the caller passes a new value in the same update as the Enter or blur that reveals the rejection." NumberInput FR14 (entryErrorBehavior) keeps its gap.

…w its message

A typed number has no fixed length, so it is complete only at Enter or
blur. While a person types, NumberInput no longer marks, shows, or
announces anything, whatever the draft.

At Enter or blur, text that is not a number, a fraction in an
integer-only field, or any number while min is above max stays in the
field. The field shows "Invalid number" as its error status, tied to the
input by aria-describedby, sets aria-invalid, and announces it once.
Inside an InputGroup the rejection sets aria-invalid and the field's
alert announces it. An edit that leaves the draft wrong keeps the
rejection without a new announcement; an edit that makes it valid or
empty clears it at once. A new value, or disabling the field, drops the
draft. A number outside an ordinary range still clamps and commits.

A caller error status with a message still shows in place of the
field's message; a warning or success status, or an error status with
no message, no longer hides a rejection.

What a form posts does not change: while blur keeps a rejected draft, a
hidden input posts the committed number as the field showed it, and the
visible input carries no name until the draft is edited or replaced.

NumberInput takes an optional onEntryErrorChange, which receives a
NumberInputEntryError (kind, the typed text, and the number for
fractional and outOfRange) each time the rejection changes, and null
when it ends or the field unmounts during one.
@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 1:09am UTC

Request Review

@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, 1:57 AM UTC

@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
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. 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.

Approval waits on one engineering-owner decision, and two fixes are needed whatever it is.

Decision needed: this PR keeps a rejected draft and its message when the caller changes value during the same Enter or blur that reveals it (as Table's inline number filter does), a case that component:NumberInput FR3 and AR2 versus FR6 and FR16 leave open; any engineering owner, the author included, rules by commenting /approve-spec <full head SHA> or by amending FR6 and FR16.

Blocking:

  • NumberInput/useEntryErrorReport.ts repeats DateInput's entry-error report, alert and status logic from DateInput/useTypedDate.ts (lines 439-557) instead of sharing it, and the two copies already differ, so a later fix will reach one field and miss the other; move it into one internal hook that both call, and name that module in a record.
  • Once a new min, max or isIntegerOnly ends a blur-kept draft's rejection, a new value no longer replaces the draft (NumberInput.tsx lines 753-775), so the field keeps showing the old text and the next blur commits it over the caller's value; treat any kept draft as replaceable and add that sequence to the form-value tests.

CI has not run on this draft, so no run confirms the new tests pass.

Claims and files checked
  • Claim: typing no longer marks or announces any draft — verified (aria-invalid and the alert follow only the commit-time rejection; "while typing" tests).
  • Claim: before, unfinished drafts were flagged per keystroke and blur reverted unparsable text silently — verified against the base source (range-checking parser, per-render validity, blur always cleared the draft).
  • Claim: Enter or blur keeps unreadable text, a fraction in an integer-only field, or any number while min exceeds max, with a visible message, aria-describedby, aria-invalid and one announcement — verified in the commit handler and the "at commit" tests.
  • Claim: inside an InputGroup the rejection sets aria-invalid and is announced — verified (alert path; grouped tests).
  • Claim: an edit to a valid or empty draft clears it at once, and a still-wrong edit keeps it silently — verified (input-change handler; "after a shown rejection" tests).
  • Claim: a number past an ordinary bound still clamps — verified (the rejection helper returns none; clamp test).
  • Claim: a caller error with a message still wins and warning or success no longer hides a rejection — verified (status precedence; caller-status tests).
  • Claim: what a form posts does not change — verified for the hidden input's value, plain at rest and locale-formatted while focused.
  • Claim: a new value, an arrow, wheel or stepper step, the clear button or disabling ends the draft — false in one case: a new value after new rules end a kept draft's rejection (blocking finding above).
  • Claim: the callback reports each change, never twice, and null at unmount — verified (de-duplication and unmount handling; callback tests).
  • Claim: the catalog message keeps its text and the docs (English, Chinese, dense) describe the new behavior — verified.
  • Claim: the Pagination page box keeps invalid text with the message — verified in its updated test.
  • Claim: the author's test, typecheck, lint and mutation results — not rerun here.
  • Files: both changesets, the family record, both spec records, en.json, NumberInput.doc.mjs, index.ts, numberInputCommit.ts, the four test files — clear; NumberInput.tsx — blocking finding (kept-draft replacement) plus a comment nit; useEntryErrorReport.ts — blocking finding (copied logic).

Automated review (maintainer link)

…ew rules accept it

Once a new min, max, or isIntegerOnly ended the rejection of a draft that
blur kept, a new value no longer replaced the draft: the field kept
showing the old text over the new value, and the next blur committed it.
A new value now replaces any draft that blur kept.

@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.

Approval waits on one engineering-owner decision, and two fixes are needed whatever it is. The earlier kept-draft replacement issue is fixed at this head.

Decision needed: this PR keeps a rejected draft and its message when the caller changes value during the same Enter or blur that reveals it (as Table's live number filter does), a case that component:NumberInput FR3 and AR2 versus FR6 and FR16 leave open; any engineering owner, the author included, rules by commenting /approve-spec <full head SHA> with a one-line ruling or by amending FR6 and FR16.

Blocking:

  • NumberInput/useEntryErrorReport.ts (lines 100-210) repeats DateInput's entry-error report, alert and status logic from DateInput/useTypedDate.ts (lines 439-557) instead of sharing it, so a later fix will reach one field and miss the other; move it into one internal hook that both call, and name that module in a record.
  • Miss: when one update changes value together with min, max or isIntegerOnly while a rejection stands and the new rules reject the draft for a different reason, the rules re-check at NumberInput.tsx lines 764-776 reads the draft that the value check at lines 748-762 just ended and puts a rejection back, so the field shows the new value under "Invalid number" with aria-invalid and reports that rejection instead of null; skip the re-check when the value check ended the draft, and add that combined update to the tests.

CI has not run on this draft, so no run confirms the new tests pass.

Claims and files checked
  • Claim: typing no longer marks, shows or announces any draft — verified (aria-invalid and the alert follow only the commit-time rejection; "while typing" tests).
  • Claim: before, unfinished drafts were flagged per keystroke and blur reverted unparsable text silently — verified against the base source.
  • Claim: Enter or blur keeps unreadable text, an integer-only fraction, or any number while min exceeds max, with a visible message, aria-describedby, aria-invalid and one announcement — verified (commit handler; "at commit" tests).
  • Claim: a number past an ordinary bound still clamps — verified (the rejection helper returns none; clamp test).
  • Claim: an edit to a valid or empty draft clears the rejection at once, and a still-wrong edit keeps it silently — verified ("after a shown rejection" tests).
  • Claim: a new value replaces a rejected or blur-kept draft, including one whose rejection new rules ended — verified for a value change alone (new form-value test); false when the value arrives with a rule change (second blocking item).
  • Claim: an arrow, wheel or stepper step, the clear button, or disabling ends the draft — verified (each calls the draft-ending path; disabled tests).
  • Claim: inside an InputGroup the rejection sets aria-invalid and the field's alert announces it — verified (grouped tests).
  • Claim: a caller error status with a message wins, and warning, success or a message-less error never hide a rejection — verified (status precedence; caller-status tests).
  • Claim: the callback reports changes only, null when the rejection ends or the field unmounts during one, never twice — verified, except the combined value and rule update (second blocking item).
  • Claim: what a form posts does not change (hidden input with the committed number, plain at rest and locale-formatted while focused; formatValue and Enter unchanged) — verified ("form value" tests).
  • Claim: a value changed inside the revealing commit keeps the draft — matches the code; awaits the owner ruling above.
  • Claim: Pagination's page box and Table's number filter keep a rejected entry with its message — verified (Pagination test; the filter renders NumberInput).
  • Claim: the catalog message keeps its text and only its description changes — verified.
  • Claim: the report logic lives in a private hook only NumberInput imports — verified; its overlap with DateInput is the first blocking item.
  • Claim: one [fix] and one [feat] patch changeset — verified.
  • Claim: red-first, suite totals and mutation results — not rechecked (the author's own runs).
  • File .changeset/number-input-entry-error-change.md: the "new value ... ends it" sentence is false for a combined value and rule update.
  • File .changeset/number-input-rejected-entry.md: clear.
  • File docs/families/input-fields.md: clear.
  • File docs/specs/AST-118-rejected-entry-feedback/spec.md: clear.
  • File docs/specs/components/NumberInput/NumberInput.spec.md: clear.
  • File packages/core/locales/en.json: clear.
  • File packages/core/src/NumberInput/NumberInput.doc.mjs: clear.
  • File packages/core/src/NumberInput/NumberInput.rejectedEntry.test.tsx: misses the combined value and rule update.
  • File packages/core/src/NumberInput/NumberInput.test.tsx: clear.
  • File packages/core/src/NumberInput/NumberInput.tsx: second blocking item.
  • File packages/core/src/NumberInput/index.ts: clear.
  • File packages/core/src/NumberInput/numberInputCommit.test.ts: clear.
  • File packages/core/src/NumberInput/numberInputCommit.ts: clear.
  • File packages/core/src/NumberInput/useEntryErrorReport.ts: first blocking item; non-blocking comment at line 70 restates status.
  • File packages/core/src/Pagination/Pagination.test.tsx: clear.

Automated review (maintainer link)

@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.

Approval waits on one engineering-owner decision about a spec sentence this head adds, and two fixes are needed whatever it is.

Decision needed: this head adds a sentence to component:NumberInput FR3 saying a value the caller passes in the same update as the Enter or blur that reveals a rejection (as Table's inline number filter does when it restores its pre-edit value) keeps the rejected draft and its message. spec:AST-118 keeps rejected text at commit (FR4, AR4) but also says, with no exception, that a new value replaces the entry, clears its rejection and reports the change (FR6, FR8), so the new sentence needs an owner's approval. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), with spec:AST-118 FR4, FR6 and FR8 amended here to carry the exception; if it is rejected instead, a value change at the revealing commit should replace the draft and clear the rejection.

Blocking:

  • NumberInput/useEntryErrorReport.ts (lines 51-63 and 100-210) repeats DateInput's entry-error report, alert and status logic from DateInput/useTypedDate.ts (lines 78-90 and 439-557) instead of sharing it, so a later fix will reach one field and miss the other; move it into one internal hook that both call, and name that module in a record.
  • Miss: when one update changes value together with min, max or isIntegerOnly while a rejection stands and the new rules reject the draft for a different reason, the rules re-check at NumberInput.tsx lines 763-776 reads the draft that the value check at lines 747-762 just ended and puts a rejection back, so the field shows the new value under "Invalid number" with aria-invalid and reports that rejection instead of null; skip the re-check when the value check ended the draft, and add that combined update to the tests.

The rest checks out: typing no longer flags drafts, commit keeps rejected text with a visible message and one announcement, and the new suite fails on the base and passes at this head. CI skipped every job on this draft.

Claims and files checked
  • Claim: typing no longer marks, shows or announces any draft — verified (the invalid state and alert follow only the commit-time rejection; "while typing" tests; a Storybook check while typing 2.5).
  • Claim: before, every draft that was not an accepted number was flagged per keystroke and blur reverted unparsable text silently — verified against the base source and a base Storybook check.
  • Claim: Enter or blur keeps unreadable text, an integer-only fraction, or any number while min exceeds max, with a visible message, aria-describedby, aria-invalid and one announcement — verified ("at commit" tests; Storybook frames).
  • Claim: a number past an ordinary bound still clamps and commits — verified (clamp test).
  • Claim: an edit to a valid or empty draft clears the rejection at once, and a still-wrong edit keeps it silently — verified ("after a shown rejection" tests).
  • Claim: a new value replaces a rejected or blur-kept draft, including one whose rejection new rules ended — verified for a value change alone; false when the value arrives with a rule change (second blocking item).
  • Claim: an arrow, wheel or stepper step, the clear button, or disabling ends the draft — verified (each path ends the draft; disabled tests).
  • Claim: inside an InputGroup the rejection sets aria-invalid and the field's alert announces it — verified (grouped tests).
  • Claim: a caller error status with a message wins, and warning, success or a message-less error never hide a rejection — verified (caller-status tests; the warning story).
  • Claim: the callback reports changes only, null when the rejection ends or the field unmounts during one, never twice, with a one-render hold for prop-caused rejections — verified, except the combined value and rule update (second blocking item).
  • Claim: what a form posts does not change (a hidden input with the committed number, plain at rest and locale-formatted while focused; formatValue and Enter unchanged) — verified ("form value" tests).
  • Claim: a value changed inside the revealing commit keeps the draft, recorded in FR3 — matches the code; the FR3 sentence has no owner approval at this head (decision above).
  • Claim: Pagination's page box and Table's number filter keep a rejected entry with its message — verified (their suites pass at this head).
  • Claim: the catalog message keeps its text and only its description changes — verified.
  • Claim: the report logic lives in a private hook that only NumberInput imports — verified; its overlap with DateInput is the first blocking item.
  • Claim: one [fix] and one [feat] patch changeset — verified; the changeset check passes. The [feat] entry's "a new value … ends it" is untrue for the combined update until the second blocking item is fixed.
  • Claim: the new suite fails 41 of 53 tests against the base source and passes after — verified.
  • Claim: the NumberInput, Pagination and Table filtering suites pass, with typecheck, lint, formatting, knowledge and changeset checks clean — verified (one existing lint warning).
  • Claim: 1568 authored lines — stale; the head has 1600 after the last commit.
  • Claim: 24 mutations each fail at least one test — not rechecked.
  • File .changeset/number-input-entry-error-change.md: see the second blocking item.
  • File .changeset/number-input-rejected-entry.md: clear.
  • File docs/families/input-fields.md: clear.
  • File docs/specs/AST-118-rejected-entry-feedback/spec.md: clear as edited; needs the FR4, FR6 and FR8 amendment if the FR3 exception is approved.
  • File docs/specs/components/NumberInput/NumberInput.spec.md: the new FR3 sentence awaits the decision above.
  • File packages/core/locales/en.json: clear.
  • File packages/core/src/NumberInput/NumberInput.doc.mjs: clear.
  • File packages/core/src/NumberInput/NumberInput.rejectedEntry.test.tsx: misses the combined value and rule update.
  • File packages/core/src/NumberInput/NumberInput.test.tsx: clear.
  • File packages/core/src/NumberInput/NumberInput.tsx: second blocking item.
  • File packages/core/src/NumberInput/index.ts: clear.
  • File packages/core/src/NumberInput/numberInputCommit.test.ts: clear.
  • File packages/core/src/NumberInput/numberInputCommit.ts: clear.
  • File packages/core/src/NumberInput/useEntryErrorReport.ts: first blocking item; non-blocking: the comment at line 70 restates status, and the lint-disable reason at line 195 could say the Effect follows a parent's prop change.
  • File packages/core/src/Pagination/Pagination.test.tsx: clear.

Automated review (maintainer link)

…rejection status, alert, and report

DateInput (and DateTimeInput's date segment, through useTypedDateField)
and NumberInput each kept a copy of the same logic: the status a shown
rejection takes over a caller status, the alert that announces a message
no shown status announces, the one-time announcement of an unchanged
caller error, the onEntryErrorChange report and its Effects, and the
one-render hold before the field shows its own message.

That logic is now one internal hook, Field/useEntryErrorReport.ts, with a
generic error type. Each member passes its rejection, its message,
whether the shown status announces itself, and whether a caller error
status wins without the callback ('always' for NumberInput,
'withCallback' for DateInput). The member keeps when an entry is
rejected and what its message says. The latest callback for the report
at unmount goes through useCommittedRef, and the status record is
render-phase state, not a ref written during render.

The input-fields family record names the hook as a shared owner.

No behavior change.
…in one update leaves no rejection

When one update changed value together with min, max, or isIntegerOnly
while a rejection stood, the new rules judged the draft that the new
value had just replaced, and put a rejection back: the field showed the
new value under the invalid-number message and reported that rejection
instead of null. New rules now judge the draft only when no new value
replaced it in the same update.
…s the rejected entry

FR4, FR6, and FR8 state, for every member, that a value the caller
passes in the same update as the Enter or blur that reveals a rejection
does not replace the kept entry: the text, its rejection, and its
message stay, and nothing is reported. A later new value replaces it.
DEC-14 records the decision, and a gap line names DateInput, which drops
the kept text in that case.

@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.

Approval waits on one engineering-owner decision about the spec changes this head makes; the two fixes asked for in the last review are in.

Decision needed: this head adds spec:AST-118 DEC-14 and amends AST-118 FR4, FR6 and FR8 and component:NumberInput FR3 so that a value the caller passes in the same update as the Enter or blur that reveals a rejection keeps the rejected text and its message (as Table's inline number filter does when it restores its pre-edit value). The current FR6 says a new caller value always replaces the entry and clears its rejection, and DateInput, which drops the text in that case, gets a new gap line. The head also adds a family:input-fields bullet naming the new shared Field/useEntryErrorReport.ts hook. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; if DEC-14 is rejected instead, a value change at the revealing commit should replace the draft and clear the rejection.

Blocking until that approval:

  • packages/core/src/Field/useEntryErrorReport.ts is a new internal module that DateInput and NumberInput both import, and only this head's unapproved family:input-fields bullet names it; the same /approve-spec settles it with no code change.

Also: the description's red-first count should read 42 of 54 failing tests on the base, since the combined value-and-rules test was added.

Typing no longer flags drafts, commit keeps rejected text with a visible message and one announcement, and the new suite fails on the base and passes here. CI skipped every job on this draft.

Claims and files checked
  • Claim: typing no longer marks, shows or announces any draft — verified (while typing tests; a Chromium check while typing 2.5 and a lone minus).
  • Claim: before, every draft that was not an accepted number was flagged per keystroke and blur reverted unparsable text silently — verified against the base source and a base Chromium check.
  • Claim: Enter or blur keeps unreadable text, an integer-only fraction, or any number while min exceeds max, with a visible message, aria-describedby, aria-invalid and one announcement — verified (at commit tests; Chromium checks after Tab and Enter).
  • Claim: a number past an ordinary bound still clamps and commits — verified (clamp test).
  • Claim: an edit to a valid or empty draft clears the rejection at once, and a still-wrong edit keeps it silently — verified (after a shown rejection tests).
  • Claim: a new value replaces a rejected or blur-kept draft, including one whose rejection new rules ended, and wins over new rules in the same update — verified (form-value and callback tests).
  • Claim: a value passed with the revealing Enter or blur keeps the draft, and the owner ruled this — the behaviour is verified (two tests); no owner approval exists at this head (decision above).
  • Claim: an arrow, wheel or stepper step, the clear button, or disabling ends the draft — verified (each path ends the draft; disabled and arrow tests).
  • Claim: inside an InputGroup the rejection sets aria-invalid and the field's alert announces it — verified (grouped tests).
  • Claim: a caller error status with a message wins, and warning, success or a message-less error never hide a rejection — verified (caller-status tests; the warning story).
  • Claim: the callback reports changes only, null when the rejection ends or the field unmounts during one, never twice, with a one-render hold for prop-caused rejections — verified (callback tests; the shared hook).
  • Claim: what a form posts does not change (a hidden input with the committed number, plain at rest and locale-formatted while focused; formatValue and Enter unchanged) — verified (form value tests).
  • Claim: the catalog message keeps its text and only its description changes — verified.
  • Claim: one shared hook under Field/ replaces both copies, and the DateInput and DateTimeInput suites pass unchanged — verified (no DateInput test changed; their suites pass).
  • Claim: Pagination's page box keeps invalid text with its message, and Table's inline filter keeps a rejected draft at Enter as its existing test expects — verified.
  • Claim: DateInput drops kept text when the caller passes a value at the revealing commit — verified with a scratch test.
  • Claim: one [fix] and one [feat] patch changeset — verified; the changeset check passes.
  • Claim: the new suite fails 41 of 53 tests on the base — stale: 42 of 54 at this head.
  • Claim: all NumberInput suites pass (407 tests) — verified; the whole-package run was not repeated, and 64 related files (2,434 tests) pass.
  • Claim: typecheck, lint (one existing warning), knowledge and changeset checks pass — verified; formatting and sync checks were not repeated.
  • Claim: 1,933 authored lines — verified.
  • Claim: the mutation tables — the author's own runs, not repeated.
  • File .changeset/number-input-entry-error-change.md — clear.
  • File .changeset/number-input-rejected-entry.md — clear.
  • File docs/families/input-fields.md — the Shared owner bullet waits on owner approval.
  • File docs/specs/AST-118-rejected-entry-feedback/spec.md — DEC-14 and the FR4, FR6 and FR8 amendments wait on owner approval; gap edits clear.
  • File docs/specs/components/NumberInput/NumberInput.spec.md — the FR3 sentence waits on owner approval; the rest clear.
  • File packages/core/locales/en.json — clear.
  • File packages/core/src/DateInput/useTypedDate.ts — clear.
  • File packages/core/src/Field/useEntryErrorReport.test.tsx — clear.
  • File packages/core/src/Field/useEntryErrorReport.ts — unnamed shared module until approval.
  • File packages/core/src/NumberInput/NumberInput.doc.mjs — clear.
  • File packages/core/src/NumberInput/NumberInput.rejectedEntry.test.tsx — clear.
  • File packages/core/src/NumberInput/NumberInput.test.tsx — clear.
  • File packages/core/src/NumberInput/NumberInput.tsx — clear, with one optional comment rewrite.
  • File packages/core/src/NumberInput/index.ts — clear.
  • File packages/core/src/NumberInput/numberInputCommit.test.ts — clear.
  • File packages/core/src/NumberInput/numberInputCommit.ts — clear.
  • File packages/core/src/Pagination/Pagination.test.tsx — clear.

Automated review (maintainer link)

@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec b8f8c80

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 12, 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: Pagination's page box cannot show the new rejection, and one description claim is wrong. The spec changes now carry an engineering owner's approval for this head, so nothing else blocks.

  • Miss: in Pagination's input variant, a kept rejection gives the 32 px page box an error icon and a message box, so the input shrinks to 0 px and the typed text cannot be seen or corrected while Invalid number spills out under / 10 and the next-page button; give the page box a presentation that keeps the text visible and the message inside the bar, and add a browser frame of that state.
  • Miss: the description says the change has no layout, pixel or hit-testing effect, but a rejection now adds an icon and a message box to every standalone NumberInput and collapses Pagination's input, so please correct that sentence.

Also, the Testing block's base-run count (41 of 53) should read 42 of 54, as the Evidence section says. CI has not run on this draft.

Claims and files checked
  • Claim: before, every draft that was not an accepted number was flagged and announced on each keystroke with only a colour change, and blur reverted unparsable text silently — verified (base source, the new suite run against the base, a base browser check).
  • Claim: typing no longer marks, shows or announces any draft — verified (typing tests; browser checks while typing 2.5 and -1a).
  • Claim: Enter or blur keeps unreadable text, an integer-only fraction, or any number while the minimum is above the maximum, with a visible message, a described-by link, the invalid state and one announcement — verified for standalone fields (commit tests; browser checks after Tab and Enter); not met in Pagination's page box (finding above).
  • Claim: a number past an ordinary bound still clamps and commits — verified (clamp test).
  • Claim: an edit to a valid or empty draft clears the rejection at once, and a still-wrong edit keeps it silently — verified.
  • Claim: a new value replaces a rejected or blur-kept draft, including one whose rejection new rules ended, and wins over new rules in the same update — verified (form-value and callback tests).
  • Claim: a value passed with the revealing Enter or blur keeps the draft, as the owner ruled — verified (two tests; an engineering owner approved the record change for this head).
  • Claim: an arrow, wheel or stepper step, the clear button, or disabling ends the draft — verified (each path ends the draft; disabled and arrow tests).
  • Claim: inside an input group the rejection sets the invalid state and the field's alert announces it — verified.
  • Claim: a caller error status with a message wins, and warning, success or a message-less error never hide a rejection — verified (caller-status tests; the warning story in a browser).
  • Claim: the callback reports changes only, null when the rejection ends or the field unmounts during one, with a one-render hold for prop-caused rejections — verified.
  • Claim: what a form posts does not change — verified (form-value tests).
  • Claim: the catalog message keeps its text and only its description changes — verified.
  • Claim: the English, Chinese and dense docs and the JSDoc describe status precedence, the callback and the form value — verified.
  • Claim: the new callback is admitted as part of the same accessibility fix — verified against the rejected-entry spec's compatibility section.
  • Claim: one shared internal hook under Field replaces both copies, and the DateInput and DateTimeInput suites pass unchanged — verified.
  • Claim: the hook's record and path list route it to the rejected-entry spec, the input-fields family and Field — verified (specs lookup).
  • Claim: Pagination's page box keeps invalid text with its message — false as rendered: the text stays in the input but has no visible width, and the message overflows (finding above).
  • Claim: Table's inline number filter keeps a rejected draft at Enter with its message — verified (browser check; existing test).
  • Claim: DateInput drops kept text when a value arrives at the revealing commit — not re-checked.
  • Claim: one fix and one feature patch changeset — verified (changeset check).
  • Claim: the new suite fails 42 of 54 tests on the base — verified; the Testing block's 41 of 53 is stale.
  • Claim: all NumberInput suites pass (407 tests) — verified; the whole-package run was not repeated, and 66 related test files (2,540 tests) pass.
  • Claim: typecheck, lint (one existing warning), formatting, knowledge, changeset and sync checks pass — verified; the pre-review script was not repeated.
  • Claim: 1,933 authored lines — verified.
  • Claim: the mutation tables — the author's own runs, not repeated.
  • Claim: no real-browser run is needed because nothing in layout, pixels or hit testing changes — false (finding above).
  • File .changeset/number-input-entry-error-change.md — clear.
  • File .changeset/number-input-rejected-entry.md — clear.
  • File docs/families/input-fields.md — clear (owner-approved).
  • File docs/specs/AST-118-rejected-entry-feedback/spec.md — clear (owner-approved).
  • File docs/specs/components/NumberInput/NumberInput.spec.md — clear (owner-approved).
  • File packages/core/locales/en.json — clear.
  • File packages/core/src/DateInput/useTypedDate.ts — clear.
  • File packages/core/src/Field/useEntryErrorReport.test.tsx — clear.
  • File packages/core/src/Field/useEntryErrorReport.ts — clear.
  • File packages/core/src/NumberInput/NumberInput.doc.mjs — clear.
  • File packages/core/src/NumberInput/NumberInput.rejectedEntry.test.tsx — clear.
  • File packages/core/src/NumberInput/NumberInput.test.tsx — clear.
  • File packages/core/src/NumberInput/NumberInput.tsx — the error status it now shows does not fit Pagination's page box; one optional comment rewrite.
  • File packages/core/src/NumberInput/index.ts — clear.
  • File packages/core/src/NumberInput/numberInputCommit.test.ts — clear.
  • File packages/core/src/NumberInput/numberInputCommit.ts — clear.
  • File packages/core/src/Pagination/Pagination.test.tsx — asserts the kept text and message in jsdom, which cannot see the 0 px input (finding above).

Automated review (maintainer link)

…he bar

In Pagination's input variant, a kept rejection gave the 32 px page box
an error icon and a message box: the input shrank to 0 px, so the typed
text could not be seen or corrected, the message spilled under the total
and the next-page button, and the bar grew to 68 px. The page box now
shows the message on its status icon (statusVariant tooltip), where
hover and focus reveal it and it is announced, and widens beside the
typed text while the rejection stands. The bar keeps its 32 px height,
and the box returns to its width when the rejection ends.
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec 6e79aa2

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review 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.

Approval waits on one engineering-owner decision and one description fix; Pagination's page box now keeps the typed text visible in a bar of normal height, and the earlier inline findings are fixed.

Decision needed: Pagination's input page box now shows a rejected entry on a status icon (statusVariant="tooltip") and widens by --spacing-10 while the rejection stands (Pagination.tsx:781-789). No current record says how the page box presents a rejection: component:Pagination FR10 only names the bounded NumberInput, and spec:AST-118 FR5 only says the message shows "in the field's status placement". An engineering owner records the decision by stating the presentation in component:Pagination FR10 and commenting /approve-spec <full head SHA>, or by ruling in a comment that FR10 with AST-118 FR5 already settles it; the author may do either as an engineering owner.

Needs a fix:

  • The description's real-browser table labels the previous head's measurements (68 px bar, 0 px input, a spilling message box) as "Before this fix", but on the base the same steps restore page 3 in a 32 px bar with no message, so replace that column and the Testing block's before: line with the base result, or label them as the earlier head.
Claims and files checked
  • Typing marks, shows and announces nothing: verified (rejected-entry "while typing" tests; Chromium probes).
  • Enter or blur keeps unreadable text, an integer-only fraction, or any number while min is above max, with a visible message, aria-describedby, aria-invalid and one announcement: verified (tests; Chromium).
  • An ordinary out-of-range number still clamps and commits: verified (test).
  • Inside an InputGroup the alert announces the rejection: verified (test).
  • An edit to a valid or empty draft clears at once; a still-wrong edit keeps it silently: verified (tests).
  • A caller error with a message wins; warning, success and message-less error never hide a rejection: verified (tests; Chromium WarningStatus).
  • What a form posts does not change, and Enter still posts typed text: verified (form-value tests).
  • A new value replaces a rejected or blur-kept draft, including with new rules in the same update, and a value passed at the revealing commit keeps it: verified (tests; mutation).
  • onEntryErrorChange kinds, value, triggers, no repeats and null at unmount: verified (tests).
  • One shared internal hook with no DateInput or DateTimeInput behavior change: verified (their unchanged suites pass).
  • Pagination's page box shows the icon, grows to 72 px with a 26 px input, and the bar stays 32 px: verified (Chromium).
  • NumberInput and Pagination suites (512 tests), type check, lint, format, knowledge, changeset and sync checks, and 1,963 authored lines: verified (re-run).
  • The new suite fails 42 of 54 on the base: verified (test file unchanged since it was last run).
  • Each Pagination mutation fails one test: verified (re-run); the other mutation rows were not re-run.
  • The real-browser "Before this fix" column describes the base: false (see above).
  • Both changesets' descriptions of old and new behavior: verified.
  • Files: all 18 changed files read; clear except Pagination.tsx (owner decision), packages/core/locales/en.json and NumberInput.tsx (optional notes).

Automated review (maintainer link)

Comment thread packages/core/locales/en.json Resolved
@nynexman4464

Copy link
Copy Markdown
Contributor Author

/approve-spec 1e2f6cb

@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 code, records and tests hold up, and every record change carries an engineering owner's approval at this head, so one description fix remains.

  • The description says component:Pagination is unchanged ("its record needs no change", and the Writing rubric results list only component:NumberInput, family:input-fields and spec:AST-118), but this head rewrites Pagination FR10 and its verification row, so please list component:Pagination FR10 among the records touched and report its rubric results.

Non-blocking: the comments at NumberInput.tsx:749 and Pagination.tsx:458 open by restating the state's name; keeping only the reason reads better.

Claims and files checked

Claims:

  • Typing no longer marks, shows or announces a rejection: verified (rejected-entry suite "while typing"; browser check of - and abc).
  • Enter or blur keeps unreadable text, an integer-only fraction, or any number while min is above max, with the message as the error status, aria-describedby, aria-invalid and one announcement: verified ("at commit" cases; browser check of 2.5 in an integer-only field).
  • A number outside an ordinary range still clamps and commits: verified (clamp test).
  • An edit clears the rejection when the draft becomes valid or empty, and keeps it silently otherwise: verified ("after a shown rejection" suite).
  • A new value replaces a rejected or blur-kept draft, and a value with new rules in one update leaves no rejection: verified (form-value and report tests).
  • A value passed at the Enter or blur that reveals the rejection keeps the draft and reports nothing: verified (two NumberInput tests; the Table inline filter's Enter test).
  • A caller error status with a message shows in place of the field's message; warning, success or a message-less error never hide it: verified (caller-status suite).
  • While blur keeps a draft, a hidden input posts the committed number, plain at rest and locale-formatted while focused: verified (form-value suite).
  • onEntryErrorChange reports changes only, with null on end, disable and unmount: verified (report suite).
  • Pagination's page box shows the message on its status icon and widens from 32 to 72 px while the bar stays 32 px: verified (Pagination test; browser check: 26 px input in a 72 px box, 32 px bar).
  • DateInput and NumberInput share one internal hook with no DateInput behavior change: verified (one call each; DateInput and DateTimeInput suites pass).
  • The record path list routes the hook to the rejected-entry spec, the input-fields family and Field: verified.
  • The new suite fails 42 of 54 tests on the base: verified.
  • The suites, typecheck, lint, formatting and knowledge checks pass: verified for the touched packages.
  • Authored lines total 1,997: verified.
  • component:Pagination needs no record change and is unchanged: false (this head changes Pagination FR10).
  • Both changesets describe the old and new behavior, the callback and the Pagination page box accurately: verified.

Files:

  • .changeset/number-input-entry-error-change.md: clear
  • .changeset/number-input-rejected-entry.md: clear
  • docs/families/input-fields.md: clear
  • docs/specs/AST-118-rejected-entry-feedback/spec.md: clear
  • docs/specs/components/NumberInput/NumberInput.spec.md: clear
  • docs/specs/components/Pagination/Pagination.spec.md: clear; the description leaves it out
  • packages/core/locales/en.json: clear
  • packages/core/src/DateInput/useTypedDate.ts: clear
  • packages/core/src/Field/useEntryErrorReport.ts: clear
  • packages/core/src/Field/useEntryErrorReport.test.tsx: clear
  • packages/core/src/NumberInput/NumberInput.doc.mjs: clear
  • packages/core/src/NumberInput/NumberInput.rejectedEntry.test.tsx: clear
  • packages/core/src/NumberInput/NumberInput.test.tsx: clear
  • packages/core/src/NumberInput/NumberInput.tsx: clear; one non-blocking comment note
  • packages/core/src/NumberInput/index.ts: clear
  • packages/core/src/NumberInput/numberInputCommit.ts: clear
  • packages/core/src/NumberInput/numberInputCommit.test.ts: clear
  • packages/core/src/Pagination/Pagination.test.tsx: clear
  • packages/core/src/Pagination/Pagination.tsx: clear; one non-blocking comment note

Automated review (maintainer link)

}
const [isFocused, setIsFocused] = useState(false);

// The rejection that the field shows. A number has no fixed length, so a

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.

Miss, non-blocking (INV29): the first sentence restates shownRejection. Suggested: A number has no fixed length, so only Enter or blur shows a rejection.

@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: CI has not run on this head yet, because a draft runs no CI until it is marked ready for review.

The description now names the component:Pagination FR10 change and its rubric results, the one fix the last review asked for. The code, records and tests hold up, and every record change carries an engineering owner's approval at this head.

Non-blocking: the comments at NumberInput.tsx:749 and Pagination.tsx:458 open by restating the state's name; keeping only the reason reads better.

Claims and files checked

Claims:

  • Before the change, every draft that was not an accepted number, a lone minus included, set the invalid state and was announced on each keystroke with only a color change, and blur reverted unreadable text silently: verified (base browser capture of abc and 2.5; the new suite fails 42 of 54 tests on the base source).
  • Nothing is flagged while typing; Enter or blur keeps a rejected entry with a visible message, the invalid state and one announcement: verified (rejected-entry suite "while typing" and "at commit"; browser capture).
  • A new helper names why a draft cannot commit (unreadable, a fraction in an integer-only field, any number while the minimum is above the maximum), and an ordinary out-of-range number still clamps: verified (numberInputCommit.ts:100-121 and its tests; the clamp test).
  • An edit that makes the draft valid or empty clears the rejection, a wrong edit keeps it silently, a new value replaces a rejected or blur-kept draft (one whose rules ended its rejection included), a value with new rules in one update leaves no rejection, and steps, clear and disabling end the draft: verified ("after a shown rejection", "while disabled", form and report tests; a probe of an arrow step at a bound).
  • A value the caller passes in the same update as the revealing Enter or blur keeps the draft, its message and reports nothing, and a later value replaces it: verified (two suite tests and the table filter test; probes; removing the condition fails 3 tests).
  • Standalone, the message is the error status in the field's placement and in aria-describedby, with the invalid state; the field status announces it and the field's alert carries only a message no status announces; inside an input group the alert announces it: verified (suites; browser live-region read).
  • A caller error status with a message shows in place of the field's message, and a warning, success or message-less error never hides the rejection: verified (caller-status suite; shared-hook tests).
  • While blur keeps a draft, a hidden input posts the committed number, plain at rest and locale-formatted while focused, and the visible input has no name until an edit or a new value; formatValue is unchanged and Enter still posts the typed text: verified (form-value suite; probe).
  • The new callback and its exported type follow the date field's firing rules: changes only, null at the end and at unmount, and a one-render hold: verified (report suite; shared hook).
  • Pagination's page box shows the message on its status icon, widens from 32 to 72 px while the rejection stands, keeps a 32 px bar, learns of the rejection through the callback, and its record now states this: verified (Pagination test; browser: 72 px box, 26 px input, 32 px bar, tooltip "Invalid number"; removing the tooltip placement fails 1 test).
  • The message text is unchanged and its translator note now says it is shown and announced at commit: verified (en.json:1742-1745).
  • The component docs (English, Chinese, dense) and JSDoc describe status precedence, the callback and the form name: verified (NumberInput.doc.mjs; NumberInput.tsx:367-410).
  • The new callback is public API the fix's compatibility rules admit: verified (the rejected-entry record's Compatibility section).
  • One shared internal hook replaces the date and number copies, starting from the number version (a committed-ref callback and render-phase state): verified (useEntryErrorReport.ts; useTypedDate.ts:452-459).
  • The family record names the hook and lists its test, and the rejected-entry record's path list routes it to that record, the family and Field: verified (input-fields.md:127-134; the routing lookup).
  • Date fields behave as before: verified (their unchanged suites pass).
  • The number and pagination suites and the full core suite pass: verified (852 files, 22,909 tests).
  • Typecheck, strict lint (no errors; the unused import warning exists on the base too), formatting, knowledge, changeset and sync checks pass: verified.
  • Authored lines total 1,997: verified.
  • Each listed mutation fails at least one test: verified by spot check (the value-at-commit row fails 3 tests and the Pagination tooltip row fails 1, as listed).
  • The real-browser table (32 px bar, 72 px box, 26 px input, abc visible, tooltip and announcement "Invalid number", invalid state): verified (this review's Chromium capture; keyboard focus on the icon not probed).
  • The table's inline number filter keeps a rejected draft at Enter with its message, as its existing test expects: verified (unchanged filter suite passes).
  • Records touched include the number input, the input-fields family, the rejected-entry record and Pagination FR10, with rubric results: verified (record diffs).
  • The fix and feature changesets describe the old and new behavior, the callback and the page box accurately: verified (against the code and tests).
  • Public text carries no internal context: verified (title, body, commits and added lines).

Files:

  • .changeset/number-input-entry-error-change.md: clear
  • .changeset/number-input-rejected-entry.md: clear
  • docs/families/input-fields.md: clear
  • docs/specs/AST-118-rejected-entry-feedback/spec.md: clear
  • docs/specs/components/NumberInput/NumberInput.spec.md: clear
  • docs/specs/components/Pagination/Pagination.spec.md: clear
  • packages/core/locales/en.json: clear
  • packages/core/src/DateInput/useTypedDate.ts: clear
  • packages/core/src/Field/useEntryErrorReport.test.tsx: clear
  • packages/core/src/Field/useEntryErrorReport.ts: clear
  • packages/core/src/NumberInput/NumberInput.doc.mjs: clear
  • packages/core/src/NumberInput/NumberInput.rejectedEntry.test.tsx: clear
  • packages/core/src/NumberInput/NumberInput.test.tsx: clear
  • packages/core/src/NumberInput/NumberInput.tsx: clear; one non-blocking comment note
  • packages/core/src/NumberInput/index.ts: clear
  • packages/core/src/NumberInput/numberInputCommit.test.ts: clear
  • packages/core/src/NumberInput/numberInputCommit.ts: clear
  • packages/core/src/Pagination/Pagination.test.tsx: clear
  • packages/core/src/Pagination/Pagination.tsx: clear; one non-blocking comment note

Automated review (maintainer link)

// Track the page optimistically so rapid prev/next clicks advance from the
// in-flight target instead of stalling on the last committed page.
const [optimisticPage, setOptimisticPage] = useOptimistic(page);
// Whether the page box keeps a rejected entry, which widens it to fit the

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 (INV29): the first clause restates isPageEntryRejected. Suggested: A rejected entry widens the page box to fit the status icon beside the text.

@nynexman4464
nynexman4464 marked this pull request as ready for review November 13, 2026 01:57
@nynexman4464
nynexman4464 merged commit 30da0a5 into main Nov 13, 2026
136 checks passed
cixzhang added a commit that referenced this pull request Nov 13, 2026
Brings #11407, #11415, #9810 and #11258 so device evidence is taken at a head that includes them.
@github-actions
github-actions Bot deleted the nynexman4464/fix/number-input-rejected-entry branch November 13, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 1e2f6cb8 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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant