feat(FN-1076): integrate desktop IPC bridge and lifecycle modules

- Extract main-process IPC registration into src/ipc.ts for window controls, system info, tray status, updater checks, and native dialogs
- Refactor main.ts startup into initializeApp/run and wire menu, tray, deep-link, updater, and window-state restore/quit cleanup
- Rework preload bridge to expose typed window.fusionAPI subscriptions and replace preload.d.ts with shared src/types.d.ts global declarations
- Add comprehensive tests for IPC handlers, preload contracts, and main-process integration behavior
- Document IPC channels, preload API, and lifecycle sequencing in packages/desktop/README.md
This commit is contained in:
gsxdsm
2026-04-08 00:45:23 -07:00
parent 750911a809
commit 8904fbf95d
11 changed files with 996 additions and 357 deletions

View File

@@ -1,15 +1,9 @@
export {
createMainWindow,
setupTray,
updateTrayStatus,
registerIpcHandlers,
DASHBOARD_URL,
run,
} from "./main.js";
export { DASHBOARD_URL, createMainWindow, initializeApp, run } from "./main.js";
export { registerIpcHandlers } from "./ipc.js";
export { createTrayIcon, buildTrayContextMenu, getTrayTooltip } from "./tray.js";
export { buildMenuTemplate, buildAppMenu } from "./menu.js";
export * from "./tray.js";
export * from "./menu.js";
export * from "./native.js";
export * from "./deep-link.js";
export type { EngineStatus, TrayMenuOptions } from "./tray.js";
export type { AppMenuOptions } from "./menu.js";
export type { FusionDesktopAPI } from "./preload.js";
export type { FusionAPI, SystemInfo, UpdateCheckResult } from "./types";