From 50b42c71109f65bd457e85e4fe44b1847051c449 Mon Sep 17 00:00:00 2001 From: Shad Date: Sun, 14 Jun 2026 21:49:37 +0000 Subject: [PATCH] feat(app): global backend-health banner across every scene (#7) --- src/App.tsx | 10 +++++++++ src/index.css | 11 ++++++++++ src/lib/useBackendHealth.ts | 43 +++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 src/lib/useBackendHealth.ts diff --git a/src/App.tsx b/src/App.tsx index 277fd19..c8cf1df 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -19,6 +19,7 @@ import CommandBar from "./components/CommandBar"; import Toaster from "./components/Toaster"; import Console from "./components/Console"; import { Cmd, Home, Layers, HistoryIcon, Pulse, Refresh, Branch, Cog, User, Sun, Moon, Bot } from "./components/icons"; +import { useBackendHealth } from "./lib/useBackendHealth"; export default function App() { @@ -120,8 +121,17 @@ export default function App() { return () => { cancelled = true; window.clearInterval(id); }; }, [isAuthed, tenantId, userEmail]); + const backendHealth = useBackendHealth(); + return (
+ {(backendHealth === "proxy-down" || backendHealth === "auth-down") && scene !== "login" && scene !== "sso-callback" && ( +
+ {backendHealth === "proxy-down" + ? "The FlowMaster backend is not reachable from this environment right now. Some actions will fail until it is restored." + : "The authentication service is temporarily down. Some actions will fail until it is restored."} +
+ )} {scene !== "landing" && scene !== "login" && scene !== "sso-callback" && (