Commit Graph
1 Commits
Author SHA1 Message Date
canvas-bot 7771541a8d 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
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.
2026-06-15 01:49:17 +04:00