feat(FN-2663): add cached update-check setting, APIs, and banner
- Add global updateCheckEnabled setting to core schema/types and wire dashboard command to cache update checks in the CLI - Implement dashboard server update-check cache module plus REST routes for status and refresh behavior - Add dashboard client hook, legacy API helpers, and UpdateAvailableBanner UI to show cached CLI update notices - Cover update-check server routes, hook behavior, banner rendering, and route registration with focused tests - Document update-check configuration and API behavior in architecture and settings reference docs
This commit is contained in:
@@ -499,6 +499,21 @@ A `prefetchLazyViews()` function runs once on mount via `requestIdleCallback` to
|
||||
- Response: `{ status: "ok", version: string, uptime: number }`
|
||||
- No authentication required
|
||||
|
||||
### Node settings sync and update-check endpoints
|
||||
|
||||
| Method | Path | Description |
|
||||
|---|---|---|
|
||||
| GET | `/api/nodes/:id/settings` | Fetch settings from a remote node. |
|
||||
| POST | `/api/nodes/:id/settings/push` | Push local settings to a remote node. |
|
||||
| POST | `/api/nodes/:id/settings/pull` | Pull settings from a remote node. |
|
||||
| GET | `/api/nodes/:id/settings/sync-status` | Get sync status and diff summary. |
|
||||
| POST | `/api/nodes/:id/auth/sync` | Sync model auth credentials. |
|
||||
| POST | `/api/settings/sync-receive` | Receive pushed settings (inbound). |
|
||||
| POST | `/api/settings/auth-receive` | Receive auth credentials (inbound). |
|
||||
| GET | `/api/settings/auth-export` | Export local auth credentials. |
|
||||
| GET | `/api/update-check` | Read cached/TTL-guarded npm update status for `@runfusion/fusion` (respects `updateCheckEnabled`). |
|
||||
| POST | `/api/update-check/refresh` | Clear cached update data and force a fresh npm update check. |
|
||||
|
||||
### Run Audit API
|
||||
The run-audit system records every mutation performed by the engine across three domains:
|
||||
- **Database** — task:create, task:update, task:move, etc.
|
||||
|
||||
@@ -48,6 +48,7 @@ Defaults from `DEFAULT_GLOBAL_SETTINGS`; key scope from `GLOBAL_SETTINGS_KEYS`.
|
||||
| `favoriteProviders` | `string[]` | `undefined` | Pinned providers shown first in model selectors. |
|
||||
| `favoriteModels` | `string[]` | `undefined` | Pinned models in `{provider}/{modelId}` format. |
|
||||
| `openrouterModelSync` | `boolean` | `true` | Sync OpenRouter model catalog into model pickers at startup. |
|
||||
| `updateCheckEnabled` | `boolean` | `true` | When enabled, Fusion performs a daily npm registry check for new `@runfusion/fusion` versions and shows update notices in CLI/dashboard. |
|
||||
| `modelOnboardingComplete` | `boolean` | `undefined` | Whether AI onboarding has been completed or dismissed. |
|
||||
| `executionGlobalProvider` | `string` | `undefined` | Global baseline provider for task execution. Project `executionProvider` overrides this. |
|
||||
| `executionGlobalModelId` | `string` | `undefined` | Global baseline model ID for task execution. |
|
||||
@@ -67,6 +68,12 @@ Defaults from `DEFAULT_GLOBAL_SETTINGS`; key scope from `GLOBAL_SETTINGS_KEYS`.
|
||||
| `dashboardCurrentNodeId` | `string` | `undefined` | Currently selected dashboard node ID. Restores the last-viewed node on fresh browser/PWA sessions. `undefined` means viewing the local node. |
|
||||
| `dashboardCurrentProjectIdByNode` | `Record<string, string>` | `undefined` | Map of node ID to last-selected project ID. Use key `"local"` for the local node. Persists project context across browser restarts and PWA sessions. |
|
||||
|
||||
Disable daily update checks globally:
|
||||
|
||||
```bash
|
||||
fn settings set updateCheckEnabled false
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Project Settings
|
||||
|
||||
Reference in New Issue
Block a user