2026-10-20 16:03:29 -05:00
|
|
|
import { isElectron } from "@/lib/electron";
|
|
|
|
|
import { ServerStatusProvider } from "@/lib/ServerStatusContext";
|
|
|
|
|
import { ComponentSlot } from "@/shell/ActionSlot";
|
|
|
|
|
import { OnboardingHost } from "@/onboarding/OnboardingHost";
|
|
|
|
|
import { DesktopUpdateToasts } from "@/shell/DesktopUpdateToasts";
|
2026-10-22 13:30:48 -05:00
|
|
|
import { SafeModeNotice } from "@/shell/SafeModeNotice";
|
2026-10-20 16:03:29 -05:00
|
|
|
import { TabPortals } from "@/shell/stage/TabPortals";
|
|
|
|
|
import { LayoutHost } from "@/shell/layout/LayoutHost";
|
|
|
|
|
import { ShellControllerProvider } from "@/shell/controller/ShellControllerProvider";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The signed-in app: the shell's state, the chosen layout, every tab's
|
|
|
|
|
* content and the pieces core always owns (overlays, onboarding).
|
|
|
|
|
*/
|
|
|
|
|
export function ShellRoot({
|
|
|
|
|
username,
|
|
|
|
|
onLogout,
|
|
|
|
|
}: {
|
|
|
|
|
username: string;
|
|
|
|
|
onLogout: (options?: { manual?: boolean }) => void;
|
|
|
|
|
}) {
|
|
|
|
|
return (
|
|
|
|
|
<ServerStatusProvider isAuthenticated={!!username}>
|
|
|
|
|
<ShellControllerProvider username={username} onLogout={onLogout}>
|
|
|
|
|
<LayoutHost />
|
|
|
|
|
<TabPortals />
|
|
|
|
|
<ComponentSlot slotId="shell.overlay" />
|
|
|
|
|
<OnboardingHost />
|
2026-10-22 13:30:48 -05:00
|
|
|
<SafeModeNotice />
|
2026-10-20 16:03:29 -05:00
|
|
|
{isElectron() && <DesktopUpdateToasts />}
|
|
|
|
|
</ShellControllerProvider>
|
|
|
|
|
</ServerStatusProvider>
|
|
|
|
|
);
|
|
|
|
|
}
|