import "./BackendConnectionErrorPage.css"; interface BackendConnectionErrorPageProps { errorMessage: string; isRetrying: boolean; onRetry: () => void; onManageConnection?: () => void; } function isDesktopShell(): boolean { if (typeof window === "undefined") return false; return typeof window.fusionShell?.resetDesktopMode === "function"; } async function changeLaunchMode(): Promise { const shell = typeof window !== "undefined" ? window.fusionShell : undefined; try { await shell?.resetDesktopMode?.(); } catch { // Best-effort; still strip query params and reload. } const url = new URL(window.location.href); url.searchParams.delete("serverBaseUrl"); url.searchParams.delete("shellMode"); window.location.replace(url.toString()); } export function BackendConnectionErrorPage({ errorMessage, isRetrying, onRetry, onManageConnection, }: BackendConnectionErrorPageProps) { const showChangeLaunchMode = isDesktopShell(); return (

Can't reach the Fusion backend

Fusion couldn't load your projects right now. Please make sure the backend is running and try again.

Error: {errorMessage}

{showChangeLaunchMode && ( )} {onManageConnection && ( )}
); }