FN-6852: document desktop engine startup

Clarify that desktop CLI launches with the local AI engine by default.\n\n- Document fn desktop as engine-on by default, matching dashboard startup behavior.\n- Clarify --paused keeps the engine process running with automation disabled.\n- Note that desktop has no --no-engine mode and update desktop README launch steps.\n\nFiles changed:\n docs/cli-reference.md      | 12 ++++++++++--\n packages/desktop/README.md | 15 +++++++++++----\n 2 files changed, 21 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-6852

Fusion-Task-Lineage: 3ae2ea10-ede1-4cc5-a3b5-71f692b2a9ac
This commit is contained in:
gsxdsm
2026-06-21 13:10:11 -07:00
parent 2ecf78af28
commit a986a45e48
2 changed files with 21 additions and 6 deletions

View File

@@ -449,7 +449,13 @@ fn daemon [--port <port>] [--host <host>] [--token <token>] [--paused] [--intera
## `fn desktop`
Launch the Fusion desktop app (Electron).
<!--
FNXC:DesktopCLI 2026-06-21-12:00:
`fn desktop` now starts the same local AI engine lifecycle as CLI dashboard mode by default.
Document `--paused` as automation-paused startup and explicitly note that desktop does not expose a `--no-engine` mode so users do not infer dashboard-only flags exist here.
-->
Launch the Fusion desktop app (Electron) with a local AI engine running by default, mirroring `fn dashboard` engine-on startup.
```bash
fn desktop
@@ -461,9 +467,11 @@ fn desktop --interactive
| Option | Description |
|---|---|
| `--dev` | Launch with hot-reload (connects to Vite dev server). |
| `--paused` | Launch with automation paused. |
| `--paused` | Launch with the AI engine paused (automation disabled). |
| `--interactive` | Interactive port selection. |
`fn desktop` does not support `--no-engine`. Unlike `fn dashboard`, which can run in dashboard/API-only mode, desktop always starts the local AI engine; use `--paused` when you want the engine process running without automation doing work.
---
## `fn task`

View File

@@ -25,16 +25,22 @@ By default it uses `http://localhost:5173`. Override with `FUSION_DASHBOARD_URL`
### Production-style desktop launch (from CLI)
<!--
FNXC:DesktopCLI 2026-06-21-12:00:
Desktop CLI launch shares the local dashboard runtime path, so the docs must state that `fn desktop` starts the embedded dashboard server and the local AI engine by default.
`--paused` keeps the engine process running but disables automation, and desktop must not imply a dashboard-only no-engine mode exists.
-->
```bash
fn desktop
```
`fn desktop` builds desktop artifacts, starts an embedded dashboard server on an ephemeral port, and launches Electron with embedded renderer assets.
`fn desktop` builds desktop artifacts, starts an embedded dashboard server plus the local AI engine on an ephemeral port, and launches Electron with embedded renderer assets.
Useful flags:
- `fn desktop --dev` — use dev renderer URL (`FUSION_DASHBOARD_URL` or `http://localhost:5173`)
- `fn desktop --paused` — start with engine paused
- `fn desktop --paused` — start with the AI engine paused (automation disabled)
## Renderer Architecture
@@ -431,8 +437,9 @@ The Windows desktop workflow (`.github/workflows/desktop-windows.yml`) supports
### CLI Launch (`fn desktop`)
1. Build desktop artifacts (unless `--dev`)
2. Start embedded API server on ephemeral port
3. Launch Electron:
2. Start the embedded API server and local AI engine on an ephemeral port
3. If `--paused` is set, keep the AI engine in an automation-paused state during startup
4. Launch Electron:
- **Production:** Uses embedded renderer assets, `getServerPort()` for API connection
- **Development (`--dev`):** Uses `FUSION_DASHBOARD_URL` for live reload