feat(app): global backend-health banner across every scene #7

Merged
shad merged 1 commits from feat/global-backend-banner into main 2026-06-14 21:49:38 +00:00
Owner

Extends the login-screen backend-health banner (PR #5) to every authenticated scene, so a regional store manager hitting Mission Control / Hubs / Chat during a backend outage sees a one-line explanation instead of silent failure.

  • src/lib/useBackendHealth.ts polls /api/v1/auth/me every 30s. Status mapping: 200/401/403 → up, 502/504 → proxy-down, 503 → auth-down.
  • App.tsx renders .global-banner above the topbar whenever proxy or auth is down. Hidden on /login (already has its own banner) and during SSO callback.
  • Dark-theme banner colours added.

31/31 vitest pass. tsc -b + vite build green.

Extends the login-screen backend-health banner (PR #5) to every authenticated scene, so a regional store manager hitting Mission Control / Hubs / Chat during a backend outage sees a one-line explanation instead of silent failure. - `src/lib/useBackendHealth.ts` polls `/api/v1/auth/me` every 30s. Status mapping: `200/401/403 → up`, `502/504 → proxy-down`, `503 → auth-down`. - `App.tsx` renders `.global-banner` above the topbar whenever proxy or auth is down. Hidden on `/login` (already has its own banner) and during SSO callback. - Dark-theme banner colours added. 31/31 vitest pass. `tsc -b` + `vite build` green.
shad added 1 commit 2026-06-14 21:49:31 +00:00
feat(app): global backend-health banner across every scene
build-and-publish / test (pull_request) Has been cancelled
build-and-publish / image (pull_request) Has been cancelled
7771541a8d
The login screen already shows a yellow banner when /api/* is in
proxy-down (502/504) or auth-down (503) state. Extend the same signal
to every authenticated scene so a regional store manager seeing a
broken Mission Control gets a one-line explanation, not silent failure.

- New src/lib/useBackendHealth.ts polls /api/v1/auth/me every 30s
  (cheap, returns 401 when healthy + unauth'd so it doubles as auth
  probe). Status maps: 200/401/403 -> up, 502/504 -> proxy-down,
  503 -> auth-down.
- App.tsx renders .global-banner above the topbar whenever the proxy
  or auth service is down. Hidden on /login (Login.tsx already has
  its own banner) and during SSO callback.
- Dark-theme banner colours added.

31/31 vitest pass. tsc + vite build green.
shad merged commit 50b42c7110 into main 2026-06-14 21:49:38 +00:00
shad deleted branch feat/global-backend-banner 2026-06-14 21:49:38 +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#7