feat(front): run the auth forms on TanStack Form v2 #543
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
spec
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amaurycoudr/chess-project!543
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/spec-410-implementation-000473"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Every auth form runs on TanStack Form v2 (
@tanstack/react-form@2.0.0-alpha.2, pinned exactly). The design-system input, the form's refusal line and its submit button are bound once inlib/form.tsx; each page passes validators and hints only.No blur handler on the bound inputs: a blur clears server refusals (TanStack/form#2341).
Player-visible differences, accepted by the owner
The spec put changes a Player sees out of scope; the owner chose to keep the library's behaviour instead of working around it.
aria-disabledand stays focusable (wasdisabled); it follows the form'sisSubmitting, not the mutation'sisPending. A second press still sends nothing (tested on every form).Evidence
After: the same tests green, unchanged in what they assert, plus:
Gate on the rebased branch, Node 24: lint, typecheck, test (front 1400/1400), build, format:check — all green.
accounts.spec(e2e) 3/3.One sign-up assertion moved from same-tick to awaited ("refuses … by its format at once"): every v2 validator resolves through a promise. Its text is unchanged.
Merge Danger
Door: two-way
Front-only; revert restores the hand-rolled forms. No contract, API or data change.
Blast Radius: auth-forms
Sign-up, sign-in, password reset and Account deletion all go through one alpha library. A new alpha touches
lib/form.tsxplus each form's validators; read TanStack/form#2306, #2341, #2296 before bumping.Closes #410
Closes #418
Closes #419
Closes #420
added 14 commits
main6b5cc008- build(deps): pin @tanstack/react-form to 2.0.0-alpha.29b6c9095- feat(front): bind the design-system input to TanStack Form v2 and move sign-up onto it356cb02e- refactor(front): move the Account delete dialog onto TanStack Form v25d056e17- feat(front): move sign-in, forgot-password and reset-password onto TanStack Form v29db40bf3- test(front): pin the auth forms' debounce, stale answers and second press817565cb- refactor(front): share the auth forms' email check and limited-form refusalCompare with previous version
Screenshots
Before is production, after is this merge request's review app at
40b59e3.Desktop
Mobile
added 16 commits
mainCompare with previous version
added 8 commits
mainfc2fd8b1- build(deps): pin @tanstack/react-form to 2.0.0-alpha.24fab4200- feat(front): bind the design-system input to TanStack Form v2 and move sign-up onto it8a1be3fd- refactor(front): move the Account delete dialog onto TanStack Form v235f0c4be- feat(front): move sign-in, forgot-password and reset-password onto TanStack Form v2a44c246a- test(front): pin the auth forms' debounce, stale answers and second press40b59e31- refactor(front): share the auth forms' email check and limited-form refusalCompare with previous version