The merge introduces a new droid CLI extension with path reconciliation across daemon, dashboard, and serve commands, along with supporting core and engine utilities. It also removes stale lint suppression comments (FN-2983). Tests cover the new CLI extension and path reconciliation logic.
Fusion-Task-Id: FN-2984
This merge completes the session-first quick chat FAB flow (Step 5), restores the quick chat hook after fixing a styling regression, and fixes heartbeat prompt composition for autonomous agents. It also adds the planning mode question display with new-session reset, introduces new Droid CLI settings
Fusion-Task-Id: FN-3058
This merge fixes heartbeat prompt composition for autonomous agents (FN-3036) so child agents spawned via `spawn_agent` receive properly formatted system prompts with heartbeat instructions, adds regression tests and documentation for the behavior, and removes duplicate constructor assignments in He
Fusion-Task-Id: FN-3036
Merges FN-2982 Step 3: adds model filtering for the droid-cli settings API, fixes planning mode question display and new-session reset in the dashboard, and adds test coverage for droid-cli settings and model route registration.
Fusion-Task-Id: FN-2982
- Add 8s polling fallback while view is "loading" so a missed SSE
question/summary event self-heals instead of leaving the panel stuck
on "thinking" until close+reopen.
- Track dismissed resumeSessionIds in a ref and drop loadSession from
the resume effect's deps so typing into the textarea no longer
re-fires resume and yanks the user back to the previous session.
- Guard SSE onThinking/onQuestion/onSummary against late events from a
torn-down connection by comparing the captured sessionId against
currentSessionIdRef.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move the show/hide archived control out of the sidebar header (where it
competed visually with the New Session button) into a small muted link
in a new sidebar footer below the list.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Migrations 56 (chat_sessions.cliSessionFile) and 57 (ai_sessions.archived)
were added without bumping SCHEMA_VERSION, so migrate() early-returned on
existing v55 DBs. The dashboard surfaced this as repeated 500s on
/api/ai-sessions: "no such column: archived". Add a guardrail test that
parses db.ts and asserts SCHEMA_VERSION matches the highest applyMigration
target.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Archive/unarchive routes were returning the row-update boolean rather than
the actual archived flag, so a no-op unarchive replied with `archived: true`.
Re-read the row and report its current state instead. Also adds tests for
archive (terminal-only), unarchive event emission, and listAll filtering.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Planning sidebar's `/api/ai-sessions` listing filtered out `complete`
rows, so a session that finished while the modal was closed disappeared
on refresh even though the result was still in SQLite. Add
`?includeCompleted` / `?includeArchived` flags and a new `archived`
column (migration 57) so users can hide terminal sessions on demand
without deleting them; only `complete`/`error` rows are archivable so
live agents can't be orphaned.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
In a multi-iteration tool loop, buildResumePrompt anchored on the last user
message and walked forward through preceding tool results. The only user
message stays at index 0, so each iteration re-sent the entire transcript over
stdin to the resumed CLI session, duplicating the original query plus a
growing stack of tool results into the on-disk session every turn. The agent
saw its own context bloating and called it "compaction." Anchor on the last
assistant message and slice forward instead — the genuine delta since the
last turn already on disk. Same bug+fix in droid-cli (copy of pi-claude-cli).
Quick chat also created a fresh pi/Claude CLI session per user message and
faked continuity by stuffing the last 50 chat_messages into the prompt as
"## Previous Conversation". Replace that with real session continuity:
chat_sessions gains a cliSessionFile column (migration 56); ChatManager
opens the existing pi SessionManager file when present and creates a fresh
one (persisting its path) on the first turn. The prompt now carries only
the new user content.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This merge lands v0.12.0 with two major features: a droid-cli provider integration adding auth routes, status endpoints, and a settings toggle hook for controlling CLI-based authentication, plus a new experimental agent onboarding modal with a create-agent form. The release also stabilizes engine st
Fusion-Task-Id: FN-2981
Merges FN-3049 to replace all runtime dynamic imports of `@fusion/engine` with static imports that esbuild can inline into the CLI bundle, preventing the known regression where the published `npm i -g @runfusion/fusion` silently failed at the import site. Also ships FN-3024, adding an experimental a
Fusion-Task-Id: FN-3049
This merge delivers v0.12.0, which includes a new experimental agent onboarding modal (`ExperimentalAgentOnboardingModal`) that streamlines the handoff from onboarding to the create-agent form, along with backend lifecycle tests and documentation for the experimental flag. The release bumps all work
Fusion-Task-Id: FN-3024
After sending on mobile the iOS Safari focus retention shifts
visualViewport.offsetTop, leaving the composer near the top of the
screen. Translate the chat thread by that offset so it stays pinned
above the keyboard.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The title summarizer ran with `tools: "readonly"` but host extensions
(`@runfusion/fusion`) were still injected, exposing `fn_task_create` and
the rest of the `fn_*` mutation surface. A summarizer model called
`fn_task_create` mid-summary, spawning an unintended sibling task and
leaving its chat-style reply ("Created **FN-xxxx** with the full spec…")
sliced as the original task's title.
- pi.ts: in `tools: "readonly"` mode, skip host extension paths and drop
caller-supplied customTools so the session truly only has read/grep/
find/ls.
- ai-summarize.ts: harden all four system prompts (title, merge summary,
commit body, commit subject) with explicit no-tool / treat-input-as-
content framing; wrap the title prompt's user content in a
`<description>` delimiter; route the AI response through new
`sanitizeTitle` that strips chatty preambles, markdown emphasis,
surrounding quotes, and trailing punctuation before truncation.
- Tests: add a regression covering the exact incident shape plus
unit coverage for `sanitizeTitle` edge cases.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Suppress iOS auto-scroll-into-view on the chat textarea and lock body
overflow while the keyboard is open so visualViewport.offsetTop stays
zero and the composer remains pinned above the keyboard.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
engine: reviewer subagents previously kept running after the parent task
was moved out of in-progress, paused, or globally paused — they spawn
their own AgentSession outside `activeSessions`/`activeStepExecutors`,
so the existing kill paths never reached them. Track them in a per-task
`activeSubagentSessions` map (mirrored in TriageProcessor) and dispose
on the same triggers as the main session. ReviewOptions gains
`onSessionCreated` / `onSessionEnded` callbacks the executor and triage
processor wire to register/unregister.
droid-cli: probe timeouts (`validateCliPresence`, `validateCliAuth`,
`runDroidProbe`) raised from 5s to 45s — observed cold-start is ~20s,
so 5s reported the binary as missing even when present. Provider gains
a `FIRST_LINE_TIMEOUT_MS` (60s) cold-start guard so a hung droid binary
is reported with an actionable error instead of being indistinguishable
from a slow-thinking turn. Fix the await race in `streamViaCli`: when
SIGKILL destroys stdout mid-buffer, `rl` may never emit "close", so the
promise also resolves on `proc.close` and forces `rl.close()` — prevents
the engine's "executor did not unwind within 60s — hung subprocess".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Plugin runtimes (openclaw, hermes, paperclip) wrap external CLIs and may not
propagate JS customTools to the underlying agent, so fn_identity could be
unreachable on those runtimes. Embedding the agent's identity (role, soul,
instructions, memory previews) directly in every execution prompt guarantees
the agent always sees what loaded for the tick — fn_identity remains as an
optional richer read for runtimes that do support custom tools.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merges the FN-2997 research CLI feature (275-line `research` command with routing, error handling, and docs), a droid CLI provider card for onboarding, a consolidated mock helpers module shared across CLI/dashboard/engine, the SSE architecture reference documentation, and the droid CLI probe module
Fusion-Task-Id: FN-2997
Adds a new Droid CLI provider card to the onboarding flow, including a dedicated provider icon, simplified card CSS, and token fallback fixes for droid provider authentication. The changes wire the card into the ModelOnboardingModal and add test coverage for the card component, icon, and onboarding
Fusion-Task-Id: FN-2980
The merge consolidates mock helpers across packages by creating a new shared `mockCoreEngine.ts` in the CLI package and strengthening the core/engine helpers, then migrating both CLI command tests and the dashboard's `AgentsView` tests to use the canonical helpers. It also publishes SSE architecture
Fusion-Task-Id: FN-3053
Published a canonical SSE architecture reference, with a major rewrite of the real-time dashboard documentation and a new contributing guideline for SSE patterns (FN-3054).
Fusion-Task-Id: FN-3054
The merge introduces a new `droid-cli-probe` module (148 lines) for node diagnostics, adds the corresponding runtime registration routes, and updates the `AgentDetailView` dashboard component to surface probe data. The agent heartbeat system is expanded with enhanced logging (agent-logger +125 lines
Fusion-Task-Id: FN-3052
Added a new `droid-cli-probe` module to the dashboard package with test coverage, implementing a CLI probe capability for the droid system.
Fusion-Task-Id: FN-2979
This merge introduces a new `packages/droid-cli` package that bridges AI agent execution as a subprocess, including process management, event streaming, tool mapping, MCP configuration, and thinking-mode support. It also adds the `DroidCliProviderCard` dashboard UI component with onboarding flows an
Fusion-Task-Id: FN-2978
The merge strengthens task recovery logic to prevent in-review tasks from entering merge-recovery loops and preserves failed review tasks during retry sweeps instead of incorrectly resetting them. It adds targeted test coverage for these edge cases in the self-healing and project engine modules.
Fusion-Task-Id: FN-3050
This merge implements a recoverable pending-login auth flow (FN-3047) across three phases: cancellable in-progress auth routes in the API, an extended auth client contract, and updated ModelOnboardingModal/SettingsModal UI with proper cancel-button visibility during logout. It also adds `dashboard-r
Fusion-Task-Id: FN-3047
Adds a new `dashboard-realtime.md` documentation file covering the SSE lifecycle and scoping behavior, plus minor cross-references in the README and architecture docs.
Fusion-Task-Id: FN-3048
This merge introduces canonical mock helper modules across the dashboard and engine packages, and migrates representative test suites to use them for consistency. The changes add four new mock helpers (`mockApi.ts`, `mockLucide.ts`, `mockCore.ts`, `mockCoreEngine.ts`) and harden the API mock proxy's
Fusion-Task-Id: FN-3044
Research settings sections in the SettingsModal are now gated behind the feature flag, with docs updated to document the gating behavior. Tests cover both desktop and mobile settings views for the new gating logic.
Fusion-Task-Id: FN-3045
Completes Step 2 of FN-3042 by scaling board typography styles across TaskCard and QuickEntryBox components, adding a new CustomModelDropdown stylesheet, and introducing keyboard focus-visible styles for theme selector controls. The merge includes new regression tests for board font scaling, resolve
Fusion-Task-Id: FN-3042
- Replace implicit theme swatch rendering with explicit sample definitions in the custom model dropdown styling
- Add ThemeSelectorSwatchContract regression tests to lock the swatch contract and prevent visual drift
- Restore workspace lint/typecheck gate behavior in onboarding-related settings flows
- Document the explicit swatch sample contract in dashboard README and related onboarding prompt/context updates
Fusion-Task-Id: FN-3043
The mobile QuickChat panel was unusable on iOS Safari: the input bar
rendered off-screen, the soft keyboard often did not open on FAB tap,
the panel slid up out of view on the second input focus, and the
header pill overflowed when the model name was long.
- The FAB JSX no longer emits inline right/bottom styles on mobile,
and the mobile media query pins every edge with !important so the
panel cannot be dragged off-screen by the desktop draggable hook.
- Body scroll is locked while the panel is open via overflow:hidden
on <html> and <body>, and the document is reset to scroll 0 on
open. This prevents iOS from leaking residual scroll into the
fixed-positioned panel between opens.
- An always-mounted, offscreen stealth input claims the iOS soft
keyboard inside the FAB click gesture (the real composer input is
initially `disabled` waiting for the chat session, and iOS will
not open the keyboard for a disabled input). Focus is transferred
synchronously to the real input once it becomes enabled.
- The composer input intercepts touchstart on mobile and re-focuses
with `preventScroll: true`, suppressing iOS's default focus-and-
scroll behavior that was shifting visualViewport.offsetTop and
sliding the panel up off-screen on a refocus.
- A useLayoutEffect mirrors visualViewport.height onto the panel as
--vv-height directly via the DOM, bypassing React state to avoid
the per-event reconciliation lag that read as visual jank during
the keyboard slide-in. On blur, the variable is cleared and a
short suppress window (~450ms) prevents iOS's mid-dismiss reports
from clobbering the regrowth, so the panel snaps back to full
height immediately while the keyboard finishes sliding down on
top of it.
- The model-tag pill in the header collapses to the provider icon
when the tag would otherwise exceed ~12 characters on mobile.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously the mobile terminal header used flex-wrap to stack tabs and
the action cluster on separate rows. The actions now stay pinned to the
right edge of the header row while the tab bar flexes to fill remaining
width and remains horizontally scrollable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add backend onboarding session service and legacy API routes for start, state, and import/export generation
- Introduce experimental AgentOnboardingModal UI with stream-state handling, model selector wiring, and onboarding launch flow in AgentsView
- Add onboarding gating via prompt overrides/store updates and include search behavior fix for partial-match filtering
- Expand dashboard/core tests for onboarding API, modal behavior, agents/settings integration, and prompt override handling
Fusion-Task-Id: FN-3025
- useTasks debounced effect bailed when searchQuery transitioned back to
undefined (App passes `searchQuery || undefined`), so clearing the
input never refetched the unfiltered list. Track previous value via
ref and only skip the initial mount.
- FTS5 search used bare tokens (exact term match), so "frob" did not
match "frobnicator". Append `*` to each token (and to quoted tokens)
for prefix matching. LIKE fallback already did substring matching.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>