feat(FN-2166): persist dev server script configuration across sessions

- Extend dev server store with config defaults, normalization, and JSON persistence alongside runtime state.
- Add GET/PUT /api/dev-server/config endpoints with strict request validation for nullable fields and preview URLs.
- Add dashboard API helpers plus a useDevServerConfig hook to load and update selected script, source, command, and preview override.
- Update DevServerView and styles to support saved script selection, change/clear actions, and synchronized command/preview inputs.
- Expand dev server store/routes/component tests and document the config endpoint in architecture docs.
This commit is contained in:
Fusion
2026-04-20 11:36:39 -07:00
committed by gsxdsm
parent ca6ed92dd1
commit 42476ec3da
12 changed files with 1096 additions and 229 deletions

View File

@@ -396,7 +396,7 @@ Key server capabilities:
- **Dev-server stream**: `/api/dev-server/logs/stream` (`dev-server-routes.ts`)
- SSE stream emits `history`, `log`, `stopped`, and `failed` events
- initial connection replays persisted `logHistory` and then follows live process output
- companion endpoints: `/api/dev-server/detect`, `/status`, `/start`, `/stop`, `/restart`, `/preview-url`
- companion endpoints: `/api/dev-server/detect`, `/config`, `/status`, `/start`, `/stop`, `/restart`, `/preview-url`
- **Badge WebSocket**: `/api/ws` (`server.ts`, `websocket.ts`)
- Scope-keyed channels (`badge:{scopeKey}:{taskId}`) prevent cross-project collisions
- **Terminal WebSocket**: `/api/terminal/ws` (`server.ts`, `terminal-service.ts`)