Bind the design-system input to TanStack Form v2 and move sign-up onto it #418

Closed
opened 2026-10-15 12:34:19 +00:00 by root · 15 comments
root commented 2026-10-15 12:34:19 +00:00 (Migrated from gitlab.core-project.space)

Parent

#410

What to build

A shared form module binds the design-system input, the form's refusal line and its submit button to TanStack Form v2 once, and the sign-up page runs on it. A Player signing up sees the same fields, live Username check, refusals and Guest-Games choice as today; after a refused submit, focus goes to the first invalid field.

Seam: S1 — the sign-up page with the auth harness and MSW; S2 — accounts.spec in apps/e2e, unchanged.

Acceptance criteria

  • @tanstack/react-form is pinned to an exact 2.0.0 alpha, chosen after reading its release notes and TanStack/form#2341, #2306, #2296, #2299, #2360.
  • The shared module in lib/ holds every read of a field's state; pages pass rules and fields only.
  • The Username check is an async validator debounced at 300 ms, reading availability through Query's existing query options.
  • Server refusals are mapped from the refusal code and the rate limit and returned from onSubmit with createValidationError, never thrown.
  • A refused Username stays marked until the Player types in that field again, even after typing in another field (new test).
  • Focus moves to the first invalid field after a refused submit (new test).
  • Errors carry our refusal unions and are translated at render (ADR 0025).
  • The existing sign-up tests and accounts.spec pass unchanged in what they assert.
## Parent #410 ## What to build A shared form module binds the design-system input, the form's refusal line and its submit button to TanStack Form v2 once, and the sign-up page runs on it. A Player signing up sees the same fields, live Username check, refusals and Guest-Games choice as today; after a refused submit, focus goes to the first invalid field. Seam: S1 — the sign-up page with the auth harness and MSW; S2 — `accounts.spec` in `apps/e2e`, unchanged. ## Acceptance criteria - [ ] `@tanstack/react-form` is pinned to an exact 2.0.0 alpha, chosen after reading its release notes and TanStack/form#2341, #2306, #2296, #2299, #2360. - [ ] The shared module in `lib/` holds every read of a field's state; pages pass rules and fields only. - [ ] The Username check is an async validator debounced at 300 ms, reading availability through Query's existing query options. - [ ] Server refusals are mapped from the refusal code and the rate limit and returned from `onSubmit` with `createValidationError`, never thrown. - [ ] A refused Username stays marked until the Player types in that field again, even after typing in another field (new test). - [ ] Focus moves to the first invalid field after a refused submit (new test). - [ ] Errors carry our refusal unions and are translated at render (ADR 0025). - [ ] The existing sign-up tests and `accounts.spec` pass unchanged in what they assert.
root commented 2026-10-15 12:34:20 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #410

marked this issue as related to #410
root commented 2026-10-15 12:34:20 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #408

marked this issue as related to #408
root commented 2026-10-15 12:34:35 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #419

mentioned in issue #419
root commented 2026-10-15 12:34:36 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #419

marked this issue as related to #419
root commented 2026-10-15 12:34:37 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #420

mentioned in issue #420
root commented 2026-10-15 12:34:37 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #420

marked this issue as related to #420
root commented 2026-10-15 22:17:25 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 61429e67c1eaa048334ee70d525e8cb762aa8e3c

mentioned in commit 61429e67c1eaa048334ee70d525e8cb762aa8e3c
root commented 2026-10-15 22:17:25 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit eced1b566b978404cdf2c82fbdcc66bcff1b6fec

mentioned in commit eced1b566b978404cdf2c82fbdcc66bcff1b6fec
root commented 2026-10-15 22:17:35 +00:00 (Migrated from gitlab.core-project.space)

mentioned in merge request !543

mentioned in merge request !543
root commented 2026-10-15 22:18:21 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 9b6c909505

mentioned in commit 9b6c90950596f34c4af892055cd6878ba3a140e1
root commented 2026-10-15 22:18:21 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 6b5cc0082e

mentioned in commit 6b5cc0082e89b541a9e99743cb5883a96cdd596f
root commented 2026-10-15 22:52:48 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 4430a3c74179570bdf4ed962d0f48da6d8f1a373

mentioned in commit 4430a3c74179570bdf4ed962d0f48da6d8f1a373
root commented 2026-10-15 22:52:48 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 1343f8d255048a971b3b7a202dc72cd2ed067da2

mentioned in commit 1343f8d255048a971b3b7a202dc72cd2ed067da2
root commented 2026-10-15 22:54:57 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit fc2fd8b171

mentioned in commit fc2fd8b171b5d59ef8b61852ed1751f7f3ba5129
root commented 2026-10-15 22:54:57 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 4fab420032

mentioned in commit 4fab4200325f6a6bb7ea3af49a38cf8c029dfd65
root (Migrated from gitlab.core-project.space) closed this issue 2026-10-15 23:25:53 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
amaurycoudr/chess-project#418
No description provided.