feat(FN-3406): add shell context hook plumbing for dashboard

Adds a new `useShellContext` hook with tests to the dashboard, integrated into `App.tsx` and `Header.tsx` to provide shell context plumbing throughout the UI.

Fusion-Task-Id: FN-3406
This commit is contained in:
Fusion
2026-05-07 22:00:41 -07:00
committed by gsxdsm
parent 954ae1078d
commit a6c4ee2b8c
23 changed files with 785 additions and 23 deletions

View File

@@ -54,13 +54,16 @@ describe("preload", () => {
await importPreloadModule();
const api = getExposed<{
getDesktopLaunchMode: () => Promise<string>;
getDesktopLaunchContext: () => Promise<unknown>;
setDesktopLaunchMode: (mode: "choose" | "local" | "remote") => Promise<string>;
}>("electronAPI");
await api?.getDesktopLaunchMode();
await api?.getDesktopLaunchContext();
await api?.setDesktopLaunchMode("local");
expect(mocks.ipcRenderer.invoke).toHaveBeenCalledWith("desktopLaunchMode:getMode");
expect(mocks.ipcRenderer.invoke).toHaveBeenCalledWith("desktopLaunchMode:getContext");
expect(mocks.ipcRenderer.invoke).toHaveBeenCalledWith("desktopLaunchMode:setMode", "local");
});