docs(FN-3408): document shell connection chrome contracts

- Add architecture notes describing shell connection chrome contracts
- Expand dashboard README with shell chrome expectations and integration details
- Add desktop README note aligning desktop shell behavior with documented contracts

Fusion-Task-Id: FN-3408
This commit is contained in:
Fusion
2026-05-08 00:40:12 -07:00
committed by gsxdsm
parent 42b0cf0416
commit 9c484cf19c
20 changed files with 487 additions and 5 deletions

View File

@@ -131,6 +131,7 @@ describe("ipc handlers", () => {
expect(channels.has("desktopLaunchMode:getContext")).toBe(true);
expect(channels.has("desktopLaunchMode:setMode")).toBe(true);
expect(channels.has("platform:get")).toBe(true);
expect(channels.has("shell:openConnectionManager")).toBe(true);
});
it("shell:getState returns desktop shell state", async () => {
@@ -181,6 +182,13 @@ describe("ipc handlers", () => {
await expect(mocks.ipcHandlers.get("desktopRuntime:stopLocal")?.({})).resolves.toEqual({ source: "embedded-local", state: "running", port: 9999 });
});
it("shell:openConnectionManager notifies renderer", async () => {
const { window } = await registerHandlers();
const result = mocks.ipcHandlers.get("shell:openConnectionManager")?.({});
expect(result).toBeUndefined();
expect(window.webContents.send).toHaveBeenCalledWith("shell:open-connection-manager");
});
it("shell:saveProfile persists the helper-generated profile", async () => {
await registerHandlers();
const handler = mocks.ipcHandlers.get("shell:saveProfile");

View File

@@ -56,15 +56,18 @@ describe("preload", () => {
getDesktopLaunchMode: () => Promise<string>;
getDesktopLaunchContext: () => Promise<unknown>;
setDesktopLaunchMode: (mode: "choose" | "local" | "remote") => Promise<string>;
openConnectionManager: () => Promise<void>;
}>("electronAPI");
await api?.getDesktopLaunchMode();
await api?.getDesktopLaunchContext();
await api?.setDesktopLaunchMode("local");
await api?.openConnectionManager();
expect(mocks.ipcRenderer.invoke).toHaveBeenCalledWith("desktopLaunchMode:getMode");
expect(mocks.ipcRenderer.invoke).toHaveBeenCalledWith("desktopLaunchMode:getContext");
expect(mocks.ipcRenderer.invoke).toHaveBeenCalledWith("desktopLaunchMode:setMode", "local");
expect(mocks.ipcRenderer.invoke).toHaveBeenCalledWith("shell:openConnectionManager");
});
it("fusionShell subscribes and unsubscribes state listener", async () => {