Files
fusion/packages/dashboard/app/main.tsx
Fusion 9e5bc7ca72 feat(FN-3407): normalize shell host bootstrap
Introduces a canonical shell host context and normalized bootstrap flow for the dashboard, extracting the host initialization logic into a dedicated `shell-host.ts` module with a `ShellHostContext` provider; updates `App.tsx` and `Header` to use the new context, stabilizes related tests, and documen

Fusion-Task-Id: FN-3407
2026-05-07 23:21:05 -07:00

28 lines
907 B
TypeScript

import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { RootErrorBoundary } from "./components/ErrorBoundary";
import { App } from "./App";
import { installAuthFetch } from "./auth";
import { installVersionCheck } from "./versionCheck";
import { installSwUpdate } from "./swUpdate";
import { bootstrapShellHostContext } from "./shell-host";
import "./styles.css";
// Install the bearer-token fetch wrapper before React mounts so every API
// call (including ones fired synchronously during the first render) picks up
// the token that was either captured from `?token=` in the launch URL or
// stored from a previous session.
installAuthFetch();
installVersionCheck();
bootstrapShellHostContext();
createRoot(document.getElementById("root")!).render(
<StrictMode>
<RootErrorBoundary>
<App />
</RootErrorBoundary>
</StrictMode>,
);
installSwUpdate();