Validate the account tab and the My games filter with zod schemas #413

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

Parent

#407

What to build

The account page's tab and My games' result filter are validated by zod 4 schemas the router reads directly, with an unknown value falling back to the default. The URL behaves exactly as today. Under today's lint rule the schemas are exported from the views that own the choices.

Seam: S2 — the account page with the auth harness, My games with the games harness.

Acceptance criteria

  • Both routes pass a zod schema to validateSearch, with no adapter; an unknown or malformed value falls back via .catch().
  • The hand-written validators and, if unused, tryChoiceOf are gone.
  • The auth harness uses the same schema as the route, not its own copy.
  • Existing search-parameter tests pass unchanged; each page gains an unknown-value case.
## Parent #407 ## What to build The account page's tab and My games' result filter are validated by zod 4 schemas the router reads directly, with an unknown value falling back to the default. The URL behaves exactly as today. Under today's lint rule the schemas are exported from the views that own the choices. Seam: S2 — the account page with the auth harness, My games with the games harness. ## Acceptance criteria - [ ] Both routes pass a zod schema to `validateSearch`, with no adapter; an unknown or malformed value falls back via `.catch()`. - [ ] The hand-written validators and, if unused, `tryChoiceOf` are gone. - [ ] The auth harness uses the same schema as the route, not its own copy. - [ ] Existing search-parameter tests pass unchanged; each page gains an unknown-value case.
root commented 2026-10-15 12:33:33 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #407

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

marked this issue as related to #411

marked this issue as related to #411
root (Migrated from gitlab.core-project.space) closed this issue 2026-10-16 06:34:36 +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#413
No description provided.