feat(FN-1070): restore desktop Electron scaffolding

- Reintroduce the @fusion/desktop workspace package with Electron main, preload, and renderer entrypoints
- Add desktop build/test tooling (TypeScript, Vitest, electron-builder) and update workspace build dependency settings for Electron
- Wire secure IPC bridge APIs for app version/quit flows with exported preload typings
- Add README usage docs and unit tests covering main-process window/tray behavior and preload API wiring
This commit is contained in:
gsxdsm
2026-04-07 22:33:05 -07:00
parent 57ff16704a
commit 4e41eb0e7a
13 changed files with 2230 additions and 42 deletions

View File

@@ -0,0 +1,32 @@
# @fusion/desktop
Electron desktop shell for Fusion.
This package provides a native Electron wrapper around the existing Fusion dashboard web UI. The desktop shell currently connects to a running dashboard server and displays it inside a desktop window with tray integration.
## Prerequisites
Start the Fusion dashboard server first:
```bash
fn dashboard
```
Then, in another terminal, start the desktop app:
```bash
pnpm --filter @fusion/desktop dev
```
## Scripts
- `pnpm --filter @fusion/desktop dev` — run the Electron main process in development
- `pnpm --filter @fusion/desktop build` — compile TypeScript sources
- `pnpm --filter @fusion/desktop test` — run Vitest suite
- `pnpm --filter @fusion/desktop typecheck` — run TypeScript checks without emitting files
- `pnpm --filter @fusion/desktop pack` — build distributable package via electron-builder
- `pnpm --filter @fusion/desktop dist` — build distribution artifacts without publishing
## Environment
- `FUSION_DASHBOARD_URL` — override the default dashboard URL used by the desktop shell (`http://localhost:4040`)