Skip to content

Fix precise signup validation feedback - #178

Merged
Anuraj-dev merged 1 commit into
mainfrom
codex/fix-signup-validation
Aug 29, 2026
Merged

Anuraj-dev merged 1 commit into
mainfrom
codex/fix-signup-validation

Conversation

@Anuraj-dev

Copy link
Copy Markdown
Owner

Problem and result

Signup validation collapsed short usernames, invalid characters, password failures, and malformed credentials into vague feedback. Duplicate usernames and suspended sign-ins could also surface in the wrong place or as generic server failures.

This change gives users precise, accessible field-level guidance while keeping the backend authoritative and the wire response bounded. Usernames are consistently trimmed and lowercased, duplicate names attach to the username field, suspension expiry is rendered truthfully, and in-flight submissions lock form state so stale responses cannot overwrite newer input.

Implementation

  • extend the shared auth failure contract with bounded field/reason validation and a single Date-safe suspension response
  • classify backend credential failures without exposing submitted values or Zod internals
  • add typed frontend auth errors and truthful messages for all supported outcomes
  • validate shared username/password rules locally and render accessible field alerts with correct focus behavior
  • lock auth controls while requests are pending
  • add shared, HTTP integration, network, and Landing regression coverage

Verification

  • npm test -w @metaverse/shared -- --run src/rest.test.ts src/auth-failure.test.ts — 35 passed
  • npm test -w frontend -- --run src/net/auth.test.ts — 12 passed
  • NODE_OPTIONS='--localstorage-file=/tmp/hyprverse-auth-vitest-storage' npm test -w frontend -- --run src/ui/Landing.test.tsx — 15 passed
  • npm run test:integration -w metaverse-backend -- --run test/integration/api.integration.test.ts — 34 passed
  • focused ESLint for all changed TypeScript/TSX files — passed
  • npm run build — passed
  • npm run size -w frontend — entry 100.2 KB gzipped, within 130 KB budget
  • independent review — approved with no findings

@vercel

vercel Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
2d-metaverse Ready Ready Preview Aug 29, 2026 10:31am

@Anuraj-dev
Anuraj-dev merged commit d8e90a2 into main Aug 29, 2026
9 checks passed

This branch was successfully deployed

1 active deployment
Preview — 72ad83eb Deployed Aug 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant