feat(FN-3399): route desktop remote mode into shell onboarding flow

Removes the standalone `DesktopShellBootstrap` component from the desktop package, routing desktop remote mode into the shell onboarding flow instead. Updates the corresponding test file to reflect the component removal and adjusts the README.

Fusion-Task-Id: FN-3399
This commit is contained in:
Fusion
2026-05-04 22:53:57 -07:00
committed by gsxdsm
parent 576238a725
commit c0134f183e
22 changed files with 521 additions and 40 deletions

View File

@@ -36,12 +36,18 @@ describe("shell-settings", () => {
});
it("returns defaults when file missing", async () => {
const { readShellSettings } = await import("../shell-settings.ts");
const { readShellSettings, getDesktopShellModeState } = await import("../shell-settings.ts");
await expect(readShellSettings()).resolves.toEqual({
desktopMode: "remote",
desktopMode: null,
hasCompletedModeSelection: false,
activeProfileId: null,
profiles: [],
});
const settings = await readShellSettings();
expect(getDesktopShellModeState(settings)).toEqual({
isFirstRun: true,
desktopMode: null,
});
});
it("writes and reads persisted settings", async () => {
@@ -49,6 +55,7 @@ describe("shell-settings", () => {
await writeShellSettings({
desktopMode: "local",
hasCompletedModeSelection: true,
activeProfileId: "p1",
profiles: [
{
@@ -65,8 +72,33 @@ describe("shell-settings", () => {
await expect(readShellSettings()).resolves.toMatchObject({
desktopMode: "local",
hasCompletedModeSelection: true,
activeProfileId: "p1",
profiles: [{ id: "p1" }],
});
});
it("infers completed selection from legacy desktopMode payload", async () => {
mockState.content.set("/tmp/fusion/shell-connections.json", JSON.stringify({ desktopMode: "remote" }));
const { readShellSettings, getDesktopShellModeState } = await import("../shell-settings.ts");
const settings = await readShellSettings();
expect(settings.hasCompletedModeSelection).toBe(true);
expect(getDesktopShellModeState(settings)).toEqual({
isFirstRun: false,
desktopMode: "remote",
});
});
it("treats invalid persisted mode as first-run", async () => {
mockState.content.set(
"/tmp/fusion/shell-connections.json",
JSON.stringify({ desktopMode: "invalid", hasCompletedModeSelection: true }),
);
const { readShellSettings, getDesktopShellModeState } = await import("../shell-settings.ts");
const settings = await readShellSettings();
expect(getDesktopShellModeState(settings)).toEqual({
isFirstRun: true,
desktopMode: null,
});
});
});