fix(GRO-2011): /login renders blank #36

Merged
The Dogfather merged 1 commits from flea/gro-2011-login-blank into dev 2026-06-01 16:36:45 +00:00

1 Commits

Author SHA1 Message Date
Flea Flicker 7526cb1d67 fix(GRO-2011): always fetch /api/setup/status, even for unauth users
CI / Test (pull_request) Successful in 17s
CI / Lint & Typecheck (pull_request) Successful in 24s
CI / Build & Push Docker Image (pull_request) Successful in 13s
The second useEffect in App skipped the setup/status fetch when
`!authDisabled && !session` was true. In the deployed bundle the
`needsSetup` state therefore stayed `null` for unauth users, and a
later render short-circuit rendered nothing — producing the blank
white viewport at https://uat.groombook.dev/login.

Drop the unauth skip clause so `/api/setup/status` is always fetched
as soon as the auth state is known. The unauth branch in the render
is handled before `needsSetup` is consulted, so this is safe and
removes the stuck-`null` state.

Adds:
- New unit test in src/__tests__/App.test.tsx asserting the
  unauthenticated path calls /api/setup/status.
- UAT playbook entry TC-WEB-5.1.5 covering the blank-viewport
  regression scenario.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-01 16:16:29 +00:00