This merge lands multiple enhancements to the planning mode modal UI and related components. Key changes include improved styling for the planning modal and quick chat FAB, CSS token alignment with the design system, plugin slot mount wiring, and updated drag handle placement. The merge also adds ne
Fusion-Task-Id: FN-3258
Test coverage for MissionManager detail pane states and containment was completed in Step 4, adding 161 lines of test assertions for the component's state transitions and containment logic.
Fusion-Task-Id: FN-3131
This merge incorporates UI enhancements for the planning mode modal and quick chat FAB, moves the drag handle into provider actions, wires required plugin slot mounts, and adds tests for MobileNavBar and UsageIndicator components. The changes span the dashboard UI components with styling and behavio
Fusion-Task-Id: FN-3068
This merge brings advanced planning UX improvements including enhanced PlanningModeModal layout and controls, QuickChatFAB styling refinements, and UsageIndicator updates. It also moves the drag handle into provider actions for cleaner separation, introduces durable insight lifecycle with bounded ex
Fusion-Task-Id: FN-3255
The merge brings several FN-3240 UI refinements that move and anchor drag handles into provider actions, alongside FN-3256 styling improvements to the planning mode modal and quick chat FAB. Key supporting changes include a durable insight lifecycle for FN-3243, a fix for list view detail callback t
Fusion-Task-Id: FN-3240
Merges the advanced planning disclosure UI (FN-3222), durable insight lifecycle (FN-3243), and list view type compatibility fix (FN-3241) into main, alongside QuickChatFAB styling refactor, TaskDetailModal enhancements, and a new bundle coverage test to lock the dependency graph.
Fusion-Task-Id: FN-3256
- Resolve NodeDetailModal conflict by keeping mainline-safe type-narrowing implementation
- Preserve smart-prefer-main policy to avoid re-adding branch-only/deleted content
- Verify full workspace gates with pnpm test and pnpm build before merge finalization
This merge lands v0.16.0 with several major features: an advanced planning mode modal redesign with collapsible disclosure controls (FN-3222), a durable insight lifecycle system using bounded run executors with quick recovery (FN-3243/FN-3013), and per-project SQLite connection caching for AgentStor
Fusion-Task-Id: FN-3222
This merge adds a durable insight lifecycle with bounded run executor to the core store layer, along with supporting database schema changes and comprehensive test coverage. It also restores type compatibility for list view detail callbacks and fixes QuickChatFAB CSS scope issues. Documentation acro
Fusion-Task-Id: FN-3243
Fixes a type compatibility issue with the list view detail callback in the dashboard App component, restoring proper typing for the callback.
Fusion-Task-Id: FN-3241
Adds durable insight lifecycle management to the Fusion system, including a bounded insight run executor, storage contracts for insight and research data, and API integration through the insights routes. Legacy schema compatibility is stabilized, and lifecycle safeguards are documented in the archit
Fusion-Task-Id: FN-3013
Companion to the per-rootDir Database cache: when an AgentStore is
closed, drop it from the cache so the next instantiation opens a
fresh connection instead of handing out the closed handle. Also
tolerate "database is not open" on close, since multiple AgentStore
instances now share one underlying Database.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds guards so README and CONTRIBUTING stay in sync with the actual
default `pnpm build` (excluding desktop/mobile) and the explicit
opt-in scripts for full / desktop / mobile builds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The dashboard re-instantiates AgentStore on every /api/agents request, and
each instance was opening a fresh Database — re-running schema migrations
and PRAGMA integrity_check on the full file. On a multi-hundred-MB DB that
was 3-7s per request and leaked file handles. Sharing a cached Database
keyed by rootDir reduces it to a one-time process cost.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merges a batch of five commits delivering dashboard performance optimizations (new composite indexes on `tasks.column`/`tasks.updatedAt` and debounced detail fetches), hardened chat SSE parsing with new test coverage, restored typecheck gates, split-pane task-link navigation (FN-3191), and research
Fusion-Task-Id: FN-3243
Group the planning model selector and depth controls under a collapsible
"Advanced planning settings" disclosure (defaultOpen) in the Planning Mode
modal. Adds a defaultOpen prop to OnboardingDisclosure and tightens the
node.capabilities readonly typing in NodeDetailModal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Speeds up task-list load and interaction for projects with 100+ tasks.
- Migration 59 adds idxTasksColumn and idxTasksUpdatedAt; listTasks()
filters by "column" on every board load and SSE/refresh paths sort by
updatedAt, so each query was previously a full table scan plus a temp
B-tree sort.
- Debounce handleEmbeddedOpenDetail in ListView so rapid keyboard/mouse
navigation no longer fires a heavy /tasks/:id (log + comments) per
selection; stale-target requests short-circuit.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fixes task link navigation in ListView so embedded links continue working when the split pane is active, including a new test case for FN-3191.
Fusion-Task-Id: FN-3191
Merged branch delivers Docker node onboarding with a new dedicated modal for guided setup, auto-installs the dependency graph plugin in CLI daemon and dashboard processes, hardens the research view with broader test coverage and a stuck-submit fix, plumbs planning draft text and model selection end-
Fusion-Task-Id: FN-3016
updateDraft preserved summarizedFor whenever the plan text was
unchanged, but the modal re-syncs the draft on model selection
changes too. Result: blur under model A, switch to model B without
editing text, click Start, and the running session kept model A's
title. The skip condition in startExistingSession only checks
text equality, not model identity.
Now updateDraft preserves summarizedFor only when both the plan
text AND the persisted modelProvider/modelId are unchanged, so a
model switch implicitly invalidates the marker and the start path
re-summarizes under whatever model the user just picked.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closes the loop on the blur/close summarize work. Previously the sidebar
always rendered `session.preview` for drafts, so the model call fired by
blur/close updated `session.title` to a value the user never saw, and
then `startExistingSession` summarized again on Start Planning even when
blur had already produced a title for the exact same text.
The sidebar now shows the summarized title once available and falls
back to the inputPayload preview only while the title is still the
placeholder. summarizeDraftTitle persists the plan text it summarized
from via a new `markDraftSummarized` store method, and updateDraft
preserves that marker only while the persisted text still matches it
(text edits invalidate it automatically). startExistingSession reads
the marker and skips its own summarize when the persisted plan equals
what was summarized last, eliminating the redundant model call.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pi-coding-agent sets Skill.name to the parent directory (e.g. 'web-research'),
while Fusion uses two-segment names everywhere (e.g. 'web-research/SKILL.md')
from extractSkillName(), normalizeAgentSkills(), and toggleExecutionSkill().
The previous fix (c9043519) correctly switched matching from skill.filePath to
skill.name, but that only works when both sides use the same format. Since they
don't, all pattern/requested-name comparisons still failed, producing the
spurious 'not found in discovered skills' warnings.
Fix: add bareSkillName() helper that strips the /SKILL.md suffix before
comparison. Applied to all five comparison points in skill-resolver.ts:
- skillNameMatches() (pattern filtering)
- requestedSkillNames set lookup (name filtering)
- hasDiscoveredMatch() (configured-pattern diagnostic)
- discoveredBareNamesLower (requested-name diagnostic)
- excluded-path discovery check
The planning modal's draft sync only updated SQLite, never the in-memory
session, so Start Planning ran the agent against whatever fragment was
typed before the first 500ms debounce and silently dropped everything
after. Drafts that survived a backend restart couldn't be started at
all (lazy rebuild was missing for the start path), reopened drafts left
the textarea empty, and the model override the user picked at create
time was forgotten on reopen — Start Planning would silently use the
project default instead.
This change rehydrates initialPlan from SQLite in startExistingSession,
flushes the latest text from the request body before reading it back,
lazy-rebuilds the in-memory session from the persisted row when needed,
and round-trips the model override through inputPayload so reopen
restores it into modal state. Sidebar drafts now render a derived
preview (from inputPayload, never persisted as title) so multiple
drafts are distinguishable while editing, and summarizeDraftTitle fires
on textarea blur and modal close — gated on status rather than title
content so blur-then-edit still refreshes rather than locking to the
first snapshot.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`TriageProcessor.finalizeApprovedTask` (added in FN-3056) called
`store.updateTask({title})` while the task was still in column='triage',
which triggered a pre-existing regen path in `TaskStore.updateTask` that
overwrote the agent's just-written specification with the bootstrap stub
(`# {id}: {title}\n\n{description}\n`). Tasks shipped to `todo` (and
through to `done`) with empty 70–200 byte specs while the executor only
saw the original one-line user description. The same regen path also
silently dropped `## Review Level` / `## Frontend UX Criteria` and any
section outside a fixed whitelist whenever a non-triage task's title or
description was edited.
Replaces the regen with wrapper-shape-exact stub detection (compare to
the bytes `createTask` would have written for the pre-update title and
description) plus surgical edits for real specs: title changes splice
only the leading `# ...` heading, description changes rewrite only the
body of `## Mission`, and every other section is preserved verbatim.
`finalizeApprovedTask` now applies the prompt-declared title after
`moveTask("todo")` as defense in depth. New regression tests cover real
specs surviving title sync, long bootstrap stubs, stubs whose body
contains `##` markdown or `**Created:**` text, and the end-to-end
triage finalize sequence on a real `TaskStore`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three related bugs that prevent agent skills from loading:
1. **Doubled "skills/" prefix in discovery** (skills-adapter.ts)
`discoverSkills()` unconditionally prepends "skills/" to the relative
path, but `baseDir` points to the parent of the skills directory
(e.g. `~/.fusion/agent`), so `relative()` already returns a path
starting with "skills/". Result: IDs like
`auto::skills/skills/web-research/SKILL.md` instead of
`auto::skills/web-research/SKILL.md`.
Fix: only prepend "skills/" when the relative path does not already
start with it.
2. **normalizeAgentSkills does not extract name from full ID**
(session-skill-context.ts)
The dashboard saves full skill IDs (e.g.
`"auto::skills/web-research/SKILL.md"`) into agent
`metadata.skills`. The runtime matches these against
`skill.name` (e.g. `"web-research/SKILL.md"`) — they never match,
so agent skills silently fail to load.
Fix: when an entry contains "::", parse out the skill name (last
two path segments) before matching.
3. **Pattern matching uses absolute filePath instead of skill name**
(skill-resolver.ts)
Settings patterns written by `toggleExecutionSkill()` are relative
(e.g. `"web-research/SKILL.md"`), but the resolver compares them
against `skill.filePath` which is absolute. Patterns can never
match, producing spurious "not found in discovered skills" warnings.
Fix: match patterns against `skill.name` (case-insensitive) with
fallback to exact `skill.filePath` match for backward compatibility.
- Add managed Docker node API client/routes, onboarding hook, and NodesView integration with new onboarding modal UX
- Refine Add Node, mobile nav, agent/node detail, and onboarding-related component styling/interaction flows
- Expand dashboard/core/cli test coverage for onboarding flows, node routes, insights persistence, and mobile regressions
- Add CLI/plugin packaging updates including bundled dependency-graph install and plugin schema initialization support
Fusion-Task-Id: FN-3108
Merged the three-step FN-3239 feature: auto-installing the dependency graph plugin on first run across the `daemon`, `dashboard`, and `serve` commands, with the core logic centralized in `bundled-plugin-install.ts`, bundling configuration in `tsup.config.ts`, and a documentation file for the default
Fusion-Task-Id: FN-3239
This merge lands FN-3015's insights feature: it adds persistence-backed coverage for the insights routes, expands the insight store lifecycle tests, closes route validation regressions, and fixes workspace verification gates. The implementation in `insights-routes.ts` was streamlined, and a new rese
Fusion-Task-Id: FN-3015
- Add mobile nav graph entry wiring in MobileNavBar to expose the graph view on mobile
- Update mobile navigation behavior to preserve existing routes while including the restored graph path
- Adjust MobileNavBar tests to cover the restored graph entry and expected rendering/interaction
Fusion-Task-Id: FN-3235
Merge brings FN-3067 UX revisions across onboarding components, including reduced ModelOnboardingModal complexity, new fallback styling for PluginSlot, and polish to OnboardingDisclosure, OnboardingResumeCard, and PostOnboardingRecommendations with minor updates to PlanningModeModal and SettingsModa
Fusion-Task-Id: FN-3067
This merge brings in model fallback notifications, async planning draft sync, mobile scroll container fixes, plugin schema initialization hooks, a new ResearchTaskActionModal, viewport-conditional mission split layout, and test infrastructure improvements including split vitest environments and a cr
Fusion-Task-Id: FN-3206
This merge consolidates a large batch of feature work, test infrastructure improvements, and performance fixes. Dashboard highlights include a viewport-conditional mission split layout for mobile (FN-3130), async planning draft sync (FN-3229), the ResearchTaskActionModal with model-fallback notifica
Fusion-Task-Id: FN-3130
This merge delivers three coordinated features: it adds a notification when task execution falls back to default AI model settings, scopes ResearchView's safe-area padding to mobile only, and hardens the pi-autoresearch analysis with a target matrix and preflight checks. The changes touch the core s
Fusion-Task-Id: FN-3012
Merges FN-3008 to add a "fallback-used" notification system: the engine now emits events when AI model fallbacks are triggered, dispatches notifications via ntfy/webhook providers, surfaces a session banner in the dashboard, and exposes a settings toggle to enable or disable these alerts.
Fusion-Task-Id: FN-3008
The merge brings in a fix (FN-2998) that scopes the bottom safe-area padding in ResearchView to mobile devices only, correcting an over-application of the padding on desktop or larger screens.
Fusion-Task-Id: FN-2998
Merged two changes: a new feature (FN-3229) that syncs planning drafts to the server in real-time while the user types, adding a PlanningModeModal component, a new ai-session-store for managing session state, and a dashboard API route to persist drafts; plus a performance fix replacing a blocking `e
Fusion-Task-Id: FN-3229
The dashboard backend (Express routes, services) lives under src/ and is pure
Node logic, but every test was paying for jsdom env init plus full CSS-import
processing. Split via environmentMatchGlobs so app/** keeps jsdom (React UI)
and src/** runs in node by default. Two src tests opt back into jsdom:
- status-bar.test.ts uses window.matchMedia.
- proxy-routes.test.ts asserts on DOMException constructor.name, which jsdom
reports as "AbortError" but node reports as "DOMException".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Split packages/dashboard/app/__tests__/api.test.ts (~6.4k lines) into per-area files (auth, git, missions, projects, settings, tasks), and src/__tests__/routes.test.ts (~20k lines) into per-area files (agents, auth, automation, git, github, planning, settings, system, tasks, tasks-ops). The monolith files were dominating wall-clock for the dashboard suite under file-parallel execution.
Also document in packages/core/vitest.config.ts why the core suite cannot move to "threads": vitest-setup gates per-worker cwd on isMainThread (false in worker_threads, so isolation breaks), and setup-test-isolation writes process.env.HOME unconditionally (threads share env, so concurrent workers race).
Drop an unused execFileSync import from scripts/test-with-lock.mjs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`git diff --no-index` exits 1 when files differ — that's the success case for synthetic untracked-file diffs, not an error. Use spawn directly so we can resolve on exit 0 or 1, independent of how callers (or test mocks) wrap execFile / promisify.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- scripts/test-with-lock.mjs: pnpm test:locked acquires an exclusive
~/.fusion/test.lock (O_EXLOCK) before running pnpm test, so several
Claude Code worktrees on the same machine serialize their vitest
fan-out instead of saturating the box. Prints the holding PID and
worktree path while waiting.
- dev-server-manager test children now park on stdin instead of
setInterval so manager.shutdown() can deterministically exit them
via stdin close, preventing orphaned node processes outliving the
test run.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Introduce a draft lifecycle for planning sessions: typing into the
PlanningModeModal textarea now creates a server-side draft after a
300ms debounce, persisted with status='draft' so the user's in-flight
plan survives modal close/reopen and shows up immediately in the
session list.
- planning.ts: new createDraftSession path; persistSession status
union widened to include 'draft'; Session gains an explicit title
field so subsequent updates don't clobber it.
- register-planning-subtask-routes.ts: wires the createPlanningDraft
POST endpoint that the modal calls on debounce.
- ai-session-store.ts: tracks the draft status across queries so the
session list and locks behave the same as any active session.
- legacy.ts: client wrapper for createPlanningDraft.
- PlanningModeModal styling, tests, and ModalReentry coverage updated
for the new flow.
- docs/architecture.md notes the expanded ai_sessions.status lifecycle.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- pnpm build now excludes @fusion/desktop and @fusion/mobile by default
(recursive build still available as pnpm build:all). Saves time on
workspace-wide builds that don't need the native shells.
- Hoist the per-package max-worker computation into a shared
packages/core/src/__test-utils__/vitest-workers.ts util. Every
vitest.config.ts now calls computeMaxWorkers(), which honors
VITEST_MAX_WORKERS, FUSION_TEST_TOTAL_WORKERS, and a per-config
defaultCap, clamped to cpus-1.
- pnpm test sets VITEST_MAX_WORKERS=2 so the workspace run keeps total
fan-out modest with --workspace-concurrency=2.
- Switch dashboard vitest pool from forks to threads so jsdom/React
suites share a V8 heap instead of duplicating ~500MB per worker.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Inline object passed to setPlanningSessions widened type/status to string,
breaking AiSessionSummary's literal union. Hoist the draft into a typed
variable so the literals narrow correctly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Refreshes the built-in model catalog feeding ModelRegistry with the
latest entries upstream pi-ai generates from models.dev (Anthropic,
OpenAI, Codex, Bedrock, etc.). No Fusion-side API changes; upgrades
applied in cli, dashboard, and engine package.json plus lockfile.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>