fix(login): show backend-health banner before the operator types #5

Merged
shad merged 1 commits from fix/login-backend-health into main 2026-06-14 21:31:22 +00:00
Owner

Pre-checks /api/v1/auth/me on mount and surfaces a banner when the proxy (502/504) or auth service (503) is down. Operator sees the problem before typing a password.

31/31 vitest pass.

Pre-checks `/api/v1/auth/me` on mount and surfaces a banner when the proxy (502/504) or auth service (503) is down. Operator sees the problem before typing a password. 31/31 vitest pass.
shad added 1 commit 2026-06-14 21:31:16 +00:00
fix(login): show backend-health banner before the operator types
build-and-publish / test (pull_request) Has been cancelled
build-and-publish / image (pull_request) Has been cancelled
464f9bfdad
Pre-checks /api/v1/auth/me on mount. The status code IS the signal:
  - 200/401/403 → backend up, login can succeed
  - 502/504    → proxy down (canvas nginx → demo unreachable)
  - 503        → auth service is down upstream

Surfaces a yellow banner above the form when proxy or auth is down so
a regional store manager doesn't type their password into a flow that's
guaranteed to fail. Matches the friendlyAuthError() copy from PR #3.

31/31 vitest tests pass.
shad merged commit 0f508293ea into main 2026-06-14 21:31:22 +00:00
shad deleted branch fix/login-backend-health 2026-06-14 21:31:22 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shad/canvas-frontend#5