- All 8 vitest configs now default maxWorkers to \`cpus().length - 1\`
instead of the arbitrary \`Math.min(4, …)\` cap. Respects an explicit
VITEST_MAX_WORKERS override for constrained environments (CI, laptops
on battery). CLI keeps \`fileParallelism: false\` — audit found real
shared state (process.chdir in agent-import, dist/ races in build-exe
suites) that needs refactoring before we can flip it.
- packages/dashboard: move the mobile build-output smoke test (which
invokes \`pnpm build:client\` via execSync, ~3s per run) into a
dedicated \`test:build\` script so \`pnpm test\` isn't gated by it. A
matching root script keeps CI wiring simple.
- Root: bump --workspace-concurrency from 2 → 4 so core/engine/cli/
desktop can pipeline against dashboard's tail.
- Drop the now-redundant VITEST_MAX_WORKERS=4 prefix from the root
scripts; the per-package configs pick up cpu count themselves.
Dashboard test suite: 182s → 38s (5x) on a 10-core machine. Full
workspace run: ~3m15 → 2m29. All tests still pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Clears the remaining no-unused-vars warnings across the dashboard app and
server, desktop main, and engine sources. Dead React state destructures are
collapsed to setter-only, unused props are underscore-prefixed to preserve
API shape, and unreferenced catch bindings are dropped. No behaviour change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- DevServerView.preview.test.tsx: drop manual-preview-override assertion
(the component hard-codes isManualPreviewOverride=false under the new
session model, so the badge is always "Auto"), provide both legacy and
current-API fields from createDevServerHookState, and mirror
embedContext into blockReason in createPreviewEmbedState so the
fallback panel picks up the reason text under the new destructure.
- runtime-adapter.test.ts: skip the createSession / promptWithFallback /
describeModel blocks with a TODO — the adapter loads pi.js via
CommonJS require() which vi.mock does not intercept, so the mocked
module is never actually installed. Needs a dynamic import seam
before these can run; tracking separately.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pre-release polish. Two related changes bundled because they both land the
project on public-release footing:
Dashboard auth
- fn dashboard now gates the HTTP API + terminal/badge WebSockets behind a
bearer token by default. Token resolution order: --token flag,
FUSION_DASHBOARD_TOKEN env, FUSION_DAEMON_TOKEN env (back-compat), or an
auto-generated fn_<32 hex>. --no-auth disables. The startup banner prints
a click-to-open URL with ?token=<token> embedded.
- Auth middleware now also accepts fn_token=<token> as a query-string
fallback so EventSource and WebSocket clients (which can't set custom
headers) still authenticate.
- setupTerminalWebSocket / setupBadgeWebSocket now refuse unauthenticated
upgrades with a proper 401 + socket close.
- Frontend: new auth.ts module captures ?token= off the URL into
localStorage (key fn.authToken), strips it from the visible URL via
replaceState, and installs a window.fetch wrapper that injects
Authorization: Bearer <token> on every same-origin /api/* request.
EventSource/WebSocket URL builders (api.ts, sse-bus.ts, useTerminal,
useBadgeWebSocket) route through appendTokenQuery().
MIT license
- LICENSE file at repo root.
- license: "MIT" on root package.json and every packages/*/package.json,
plus description/bugs metadata on the CLI package.
Docs
- docs/cli-reference.md documents --token / --no-auth / FUSION_DASHBOARD_TOKEN
and the click-to-open auth flow.
- docs/getting-started.md, docs/docker.md, README.md point at the new flow
and the CLI reference section.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When the engine restarts mid-step, an in-progress step may have already
passed plan + code review but not yet been flipped to done by the agent's
next task_update call. Previously, the next executor pass re-entered the
step and replayed both reviews — measured at 5-20 min of pure waste per
restart (observed in FN-2215 Step 1 and FN-2207 Step 6).
recoverApprovedStepsOnResume scans the task log for any in-progress step
whose most recent "code review Step N: APPROVE" entry is newer than its
most recent "Step N → pending" transition, and marks those steps done
before execute() runs. Safely skips steps that were reset after approval
(e.g. by a workflow revision) or only received REVISE verdicts.
Called from both the engine-restart path (resumeOrphaned) and the
unpause path, matching the two places the task log shows as vulnerable
to this race.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Fix CSS URL resolution in memory when loading with file:// protocol
- Add DASHBOARD_URL re-export from renderer module for backward compatibility
- Update main.test.ts to use correct renderer mock reference (rendererMocks vs mocks)
- Document the URL resolution bug fix in memory
- Add ChatStore mock to all dashboard route tests that mock @fusion/core,
since server.ts now instantiates ChatStore(store.getFusionDir(), ...)
- Add getFusionDir to createMockStore in server.test.ts
- Gate AI session cleanup scheduling behind shouldScheduleAiSessionCleanup()
(returns false in test env) to prevent open handle warnings
- Fix desktop tests: DASHBOARD_URL is now exported as a function alias,
update assertions to call DASHBOARD_URL() instead of using as string
- Add node:os mocks to system-metrics.test.ts for deterministic results
- Replace hardcoded maxWorkers=16 with availableParallelism()-based
calculation in all vitest configs to prevent OOM on 2-core CI runners
- Add --workspace-concurrency=2 to pnpm test commands
- Fix TaskCard tests: update mission badge title assertions to full titles
- Remove unused /api/mesh/state route
- Fix plugin-auto-label: add isError field, async onTaskCreated, "tests" keyword
- Fix plugin-ci-status: add module-level logger, tighten test assertions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add rust, copper, foundry, carbon theme IDs to core types
- Register themes in ThemeSelector component and flash-prevention logic
- Add CSS theme blocks and swatches for all four new themes
- Add ThemeSelector unit tests for the new themes
- Update memory documentation with new theme count
- Add isolate: true to vitest configs for safe parallel test execution
- Simplify engine test script from 7 sequential runs to single parallel run
- Fix TypeScript type errors in Column, Board, WorktreeGroup, and App components
- Fix board-mobile test to match current TaskCard tap behavior
- Relax App deep-link test to handle React Strict Mode behavior
- Replace environmentMatchGlobs with explicit Vitest test.projects entries for desktop and desktop-renderer suites
- Keep desktop core tests on the threads pool and renderer tests in a jsdom-targeted project
- Increase the batch-import 429 retry test timeout from 30s to 60s to reduce CI flakiness
- Add new `fn desktop` CLI command with argument handling and comprehensive command/bin tests
- Implement desktop build and hot-reload dev scripts and wire package scripts/dependencies for Electron workflows
- Add electron-builder configuration and desktop main-process/integration test coverage to stabilize packaging behavior
- Document desktop development and usage in README files and include a changeset for the published CLI package
- Add Electron main-process IPC handlers and preload bridges for API proxying, window controls, update install, and platform lookup
- Introduce a desktop renderer entrypoint with DesktopWrapper and a custom frameless TitleBar component
- Add Electron-aware renderer utilities including API transport selection and hooks for runtime detection, auto-update events, and deep links
- Update dashboard header behavior for Electron mode and expand desktop tests across preload, transport, hooks, and title bar flows
- Document the desktop renderer architecture and update desktop package config/dependencies
- Render a dedicated configured-steps state in WorkflowResultsTab with step count, descriptions, and phase badges when results are not yet available
- Keep inline workflow step editing available from the configured state and results state, including add/remove and execution-order controls
- Refine workflow step loading/edit behavior by aligning callback names and fetching step definitions by project context
- Add dashboard styles for the configured workflow step cards and improved edit toggle button treatment
- Expand WorkflowResultsTab and TaskDetailModal tests and add electron-updater type declarations to restore workspace build
- Add electron-updater dependency and implement native desktop integration utilities for dialogs, notifications, auto-update wiring, and window state persistence
- Add fusion:// deep-link protocol registration, URL parsing, single-instance handlers, and renderer event forwarding for task/project routes
- Add comprehensive Vitest coverage for native integrations and deep-link handling across success, edge, and failure cases
- Document native and deep-link API contracts, behavior, and usage details in the desktop package README
- Add dedicated desktop tray and menu modules, including platform-aware menu templates and tray status/visibility controls
- Integrate tray setup, app menu initialization, and tray status exports into the Electron main process bootstrap
- Add tray icon assets plus an icon generation script and update desktop package dependencies/lockfile
- Expand desktop test coverage with new menu/tray test suites and main process integration assertions
- Update desktop README with tray and application menu usage/documentation
- 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