429 Commits

Author SHA1 Message Date
gsxdsm
081dae0e0f FN-7705: Add Grok CLI runtime support as a bundled plugin
Adds a new bundled Grok CLI runtime plugin, wiring it end-to-end into settings, auth routes, model discovery, and the dashboard authentication UI.

- New `fusion-plugin-grok-runtime` package with CLI spawn, probe, provider, process-manager, and runtime-adapter modules plus tests
- Bundled-plugin install list (CLI + core) updated to auto-install the grok-cli plugin
- New `useGrokCli`/`grokCliBinaryPath` settings in `settings-schema.ts` and `types.ts`
- Dashboard: `GrokCliProviderCard` component/styles, `ProviderIcon` grok entry, `AuthenticationSection` wiring
- New `grok-model-cache.ts` for caching `grok models` discovery results, registered model/auth routes for `/auth/grok-cli` and `/providers/grok-cli/status`, merged into `/api/models`
- `runtime-provider-probes.ts` extended with Grok CLI probe/model-discovery delegation
- Docs updated (`PLUGIN_AUTHORING.md`, `settings-reference.md`) and changeset added (minor, feature)
- Workspace config (`pnpm-workspace.yaml`, `pnpm-lock.yaml`) updated to register the new plugin package

Files changed:
 .changeset/fn-7705-grok-cli-runtime.md             |   7 +
 docs/PLUGIN_AUTHORING.md                           |   2 +-
 docs/settings-reference.md                         |   4 +
 packages/cli/src/plugins/bundled-plugin-install.ts |   8 +
 .../cli/src/plugins/staged-bundled-plugin-ids.ts   |   1 +
 packages/cli/vitest.config.ts                      |  12 +
 .../core/src/__tests__/grok-cli-settings.test.ts   |  34 +++
 packages/core/src/index.ts                         |   1 +
 .../core/src/plugins/bundled-plugin-install.ts     |  10 +
 packages/core/src/settings-schema.ts               |   6 +
 packages/core/src/types.ts                         |   9 +
 packages/dashboard/app/api/legacy.ts               |  40 ++++
 .../app/components/GrokCliProviderCard.css         |  65 ++++++
 .../app/components/GrokCliProviderCard.tsx         | 204 ++++++++++++++++
 packages/dashboard/app/components/ProviderIcon.tsx |   5 +
 .../__tests__/GrokCliProviderCard.test.tsx         | 105 +++++++++
 .../app/components/__tests__/ProviderIcon.test.tsx |   8 +
 .../settings/sections/AuthenticationSection.tsx    |   8 +-
 packages/dashboard/package.json                    |   1 +
 .../src/__tests__/grok-model-cache.test.ts         | 152 ++++++++++++
 .../register-model-routes-grok-cli.test.ts         | 214 +++++++++++++++++
 .../dashboard/src/__tests__/routes-auth.test.ts    | 258 ++++++++++++++++++++-
 packages/dashboard/src/grok-model-cache.ts         | 166 +++++++++++++
 packages/dashboard/src/routes.ts                   |   1 +
 .../dashboard/src/routes/register-auth-routes.ts   | 134 ++++++++++-
 .../dashboard/src/routes/register-model-routes.ts  |  51 ++++
 packages/dashboard/src/runtime-provider-probes.ts  |  43 ++++
 packages/dashboard/vitest.config.ts                |  12 +
 packages/desktop/scripts/workspace-tools.ts        |   3 +-
 plugins/fusion-plugin-grok-runtime/CHANGELOG.md    |   7 +
 plugins/fusion-plugin-grok-runtime/README.md       |  54 +++++
 plugins/fusion-plugin-grok-runtime/manifest.json   |   6 +
 plugins/fusion-plugin-grok-runtime/package.json    |  40 ++++
 .../src/__tests__/cli-spawn.test.ts                | 103 ++++++++
 .../src/__tests__/index.test.ts                    |  12 +
 .../src/__tests__/probe.test.ts                    | 135 +++++++++++
 .../src/__tests__/process-manager.test.ts          |  96 ++++++++
 .../src/__tests__/provider.test.ts                 |  57 +++++
 .../src/__tests__/runtime-adapter.test.ts          |  21 ++
 .../fusion-plugin-grok-runtime/src/cli-spawn.ts    |  50 ++++
 plugins/fusion-plugin-grok-runtime/src/index.ts    |  74 ++++++
 plugins/fusion-plugin-grok-runtime/src/probe.ts    | 107 +++++++++
 .../src/process-manager.ts                         |  86 +++++++
 plugins/fusion-plugin-grok-runtime/src/provider.ts |  25 ++
 .../src/runtime-adapter.ts                         |  25 ++
 plugins/fusion-plugin-grok-runtime/src/types.ts    |  12 +
 plugins/fusion-plugin-grok-runtime/tsconfig.json   |  10 +
 .../fusion-plugin-grok-runtime/vitest.config.ts    |  22 ++
 pnpm-lock.yaml                                     |  25 ++
 pnpm-workspace.yaml                                |   1 +
 50 files changed, 2525 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-7705

Fusion-Task-Lineage: b8194ea8-c773-4199-a52a-b0e4e7347192

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-08 23:39:34 -07:00
gsxdsm
461a4a2711 FN-7689: add opt-in Anthropic-style prompt caching for custom providers
Custom providers previously never enabled prompt-cache control, so agent turns re-billed the full context every request even on cache-capable backends.

- Add `CustomProvider.anthropicPromptCaching` opt-in flag in @fusion/core types
- Set pi-ai `compat.cacheControlFormat="anthropic"` on opted-in models in both registration paths: custom-provider-registry `toProviderConfig` and pi.ts `createFnAgent`
- Expose the new toggle in the dashboard CustomProvidersSection UI (with supporting CSS) and thread it through the legacy API + custom-provider routes
- Update docs (dashboard-guide, settings-reference) to document the new setting
- Add engine test coverage for the caching flag across provider registration and pi-create-fn-agent paths
- Add changeset for the fix

Files changed:
 .changeset/fn-7689-custom-provider-prompt-caching.md          |   7 +
 docs/dashboard-guide.md                                       |   1 +
 docs/settings-reference.md                                    |   2 +-
 packages/core/src/types.ts                                    |  15 ++
 packages/dashboard/app/api/legacy.ts                          |  12 ++
 packages/dashboard/app/components/CustomProvidersSection.css  |  24 +++
 packages/dashboard/app/components/CustomProvidersSection.tsx  |  58 +++++-
 packages/dashboard/src/routes/register-custom-provider-routes.ts |  16 ++
 packages/engine/src/__tests__/pi-create-fn-agent.test.ts      |  71 +++++++
 packages/engine/src/__tests__/provider-registration.test.ts   | 204 ++++++++++++++++++++-
 packages/engine/src/custom-provider-registry.ts               |  71 +++++--
 packages/engine/src/pi.ts                                     |  27 ++-
 12 files changed, 473 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-7689

Fusion-Task-Lineage: b4f88f32-50da-4651-a546-432a95a1ab1c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-08 13:09:10 -07:00
gsxdsm
be94f630ea Surface runtime-resolution fallback in dashboard; thread real FallbackReason (#1957)
Closes/relates to Runfusion/Fusion#1956.

## Summary

Surfaces silent runtime-resolution fallback in the dashboard, and
threads the real `FallbackReason` ("not_found" vs "factory_error")
through instead of hardcoding `"not_found"` for every fallback.

## Changes

- `packages/engine/src/runtime-resolution.ts`: `resolvePluginRuntime()`
now returns a tagged miss result (`{ ok: false, reason }`)
distinguishing "not found" from "factory/instantiation error" instead of
collapsing both to `null`. `resolveRuntime()` threads the real reason
through to `logRuntimeFallback(...)` and returns it via
`ResolvedRuntime.fallbackReason`.
- `packages/engine/src/agent-session-helpers.ts`:
`createResolvedAgentSession()` includes `fallbackReason` in the
`session:runtime-resolved` audit event metadata when present.
- `packages/dashboard/src/routes/register-task-workflow-routes.ts`: new
`GET /api/tasks/:id/runtime-fallback` endpoint, returning the most
recent `session:runtime-resolved` event normalized for UI consumption
(`wasConfigured`, `runtimeHint`, `reason`, `showFallbackBadge`).
- `packages/dashboard/app/hooks/useRuntimeFallbackStatus.ts` (new):
polls the endpoint, dedupes toast firing per audit-event-id.
- `packages/dashboard/app/components/RuntimeFallbackBadge.tsx` (new):
renders the badge + fires the toast; wired into `TaskCard.tsx`,
`ActiveAgentsPanel.tsx`, and `AgentsView.tsx` (board and list variants).

## Test plan

- `pnpm --filter @fusion/engine exec vitest run
src/__tests__/runtime-resolution.test.ts` — 24/24 pass (21 pre-existing
+ 3 new, none weakened)
- `pnpm --filter @fusion/dashboard exec vitest run
src/routes/__tests__/register-task-workflow-routes.runtime-fallback.test.ts`
— 5/5 pass
(empty/configured-ok/fallback-with-hint/fallback-blank-hint/stale-superseded
states)
- `pnpm --filter @fusion/dashboard exec vitest run
app/components/__tests__/RuntimeFallbackBadge.test.tsx` — 8/8 pass (all
data states + mobile breakpoint + toast-fires-once)
- `pnpm --filter @fusion/dashboard run typecheck` and `pnpm --filter
@fusion/engine run typecheck` — both clean


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added runtime-fallback warning badges across task and agent views
(including board and “working on” sections) with automatic toast
notifications.
* Introduced a new backend API to surface the latest runtime-fallback
state for a task.
* Added runtime-fallback status polling and UI messaging to reflect the
most recent state.

* **Bug Fixes**
* Prevented repeated toasts by deduplicating notifications across
polling updates.
* Improved fallback reporting so the UI reflects the latest
runtime-resolved audit event.
* Enhanced diagnostics by distinguishing fallback reasons (e.g., missing
runtime vs factory failure) for clearer user guidance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-08 07:24:51 -07:00
gsxdsm
03161adfb9 FN-7659: paginate and sort the Archived column newest-first
Adds server-side pagination for the Archived task column, sorted by most-recently-archived first, with a Show more control on the dashboard.

- Add ArchiveDatabase.listPage and TaskStore.listArchivedTasks for a bounded SQL LIMIT/OFFSET read ordered by archivedAt DESC
- Add GET /tasks/archived route for paged archive fetches, leaving the legacy merged listTasks({includeArchived}) path unchanged
- Wire useTasks.loadArchivedTasks to fetch page 1 on first Archived-column expand and loadMoreArchivedTasks for subsequent pages
- Add a "Show more" affordance in Column.tsx/Board.tsx/MainContent.tsx to trigger loading additional archived pages
- Extend taskSorting.ts to keep archived task ordering stable with the new paged data
- Add core and dashboard tests covering archive pagination and store/route behavior
- Add changeset for @runfusion/fusion (minor) and update docs/storage.md and docs/dashboard-guide.md

Files changed:
 .changeset/FN-7659-archived-pagination.md          |   7 +
 docs/dashboard-guide.md                            |   4 +-
 docs/storage.md                                    |   7 +
 packages/core/src/__tests__/archive-db-pagination.test.ts    |  94 ++++++++
 packages/core/src/__tests__/store-archive-search.test.ts     |  63 ++++++
 packages/core/src/archive-db.ts                    |  18 ++
 packages/core/src/store.ts                         |  32 +++
 packages/dashboard/app/App.tsx                     |   5 +-
 packages/dashboard/app/api/legacy.ts               |  19 ++
 packages/dashboard/app/components/Board.tsx        |  19 +-
 packages/dashboard/app/components/Column.tsx       |  48 ++++-
 packages/dashboard/app/components/__tests__/Column.test.tsx       |  41 ++++
 packages/dashboard/app/components/__tests__/taskSorting.test.ts   |  27 +++
 packages/dashboard/app/components/dashboard/MainContent.tsx       |   9 +
 packages/dashboard/app/components/dashboard/types.ts    |   6 +
 packages/dashboard/app/components/taskSorting.ts   |  16 ++
 packages/dashboard/app/hooks/__tests__/useTasks.test.ts | 236 ++++++++++++++++++++-
 packages/dashboard/app/hooks/useTasks.ts           | 173 ++++++++++++++-
 packages/dashboard/app/test/mockApi.ts             |   3 +
 packages/dashboard/src/routes/__tests__/tasks-archived-pagination.test.ts |  94 ++++++++
 packages/dashboard/src/routes/register-task-workflow-routes.ts  |  32 +++
 21 files changed, 930 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-7659

Fusion-Task-Lineage: 7a5a1f62-277c-4f29-883c-62e75b269bc5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-08 01:29:56 -07:00
Fusion
0bed997af8 feat: surface runtime-resolution fallback in dashboard, thread real FallbackReason
Fixes silent runtime fallback visibility (dashboard never read wasConfigured
or session:runtime-resolved) and threads the real FallbackReason
(not_found vs factory_error) through resolveRuntime()/logRuntimeFallback
instead of hardcoding "not_found" for every fallback.

- packages/engine/src/runtime-resolution.ts: resolvePluginRuntime() now
  returns a tagged miss result distinguishing not_found from factory_error;
  resolveRuntime() threads the real reason through and returns it as
  ResolvedRuntime.fallbackReason
- packages/engine/src/agent-session-helpers.ts: includes fallbackReason in
  the session:runtime-resolved audit event metadata
- packages/dashboard/src/routes/register-task-workflow-routes.ts: new
  GET /api/tasks/:id/runtime-fallback endpoint
- packages/dashboard/app/hooks/useRuntimeFallbackStatus.ts +
  packages/dashboard/app/components/RuntimeFallbackBadge.tsx: new polling
  hook + badge/toast component wired into TaskCard, ActiveAgentsPanel, and
  AgentsView

Ref: Fusion task FUX-022, investigations/FUX-017-hermes-runtime-fallback.md
recommendation #1
2026-07-08 03:09:29 -04:00
gsxdsm
6777eea5d2 FN-7631: add content search to Chat sidebar with title-only toggle
Chat sidebar search now matches message content by default, not just the conversation title/agent, with an opt-out toggle to restore title-only filtering.

- Add ChatStore.searchSessionsByMessageContent (parameterized LIKE ... ESCAPE) for server-side content search across sessions
- GET /chat/sessions route (register-chat-routes.ts, legacy.ts) gains q/titleOnly query params, debounced server-side content lookup merged with local title/agent matches
- useChat hook exposes searchInTitleOnly state and wires debounced content search into session list results
- ChatView renders a "Search in title only" toggle beside the search box (desktop + mobile) and shows a "Matched: ..." preview snippet on content-matched rows
- Task-planner sessions remain excluded from content matches via the same common-feed visibility guard used for the normal session list
- Add unit/integration tests: chat-store content-search, chat-routes API test, ChatView content-search test
- Update docs/dashboard-guide.md to document the new content search behavior and toggle
- Add changeset fn-7631-chat-content-search.md (@runfusion/fusion minor)

Files changed:
 .changeset/fn-7631-chat-content-search.md          |   7 +
 docs/dashboard-guide.md                            |   2 +
 .../__tests__/chat-store.content-search.test.ts    | 157 +++++++++++++++++++++
 packages/core/src/chat-store.ts                    |  64 +++++++++
 packages/core/src/chat-types.ts                    |   8 ++
 packages/dashboard/app/api/legacy.ts               |  23 ++-
 packages/dashboard/app/components/ChatView.css     |  30 ++++
 packages/dashboard/app/components/ChatView.tsx     |  26 ++++
 .../__tests__/ChatView.autosize.test.tsx           |   2 +
 .../__tests__/ChatView.content-search.test.tsx     | 114 +++++++++++++++
 .../components/__tests__/ChatView.draft.test.tsx   |   2 +
 .../__tests__/ChatView.hash-mention.test.tsx       |   2 +
 .../__tests__/ChatView.mobile-render.test.tsx      |   2 +
 .../components/__tests__/ChatView.rooms.test.tsx   |   2 +
 .../__tests__/ChatView.scroll-to-top.test.tsx      |   2 +
 .../components/__tests__/ChatView.test-harness.tsx |   2 +
 packages/dashboard/app/hooks/useChat.ts            | 105 ++++++++++++--
 .../dashboard/src/__tests__/chat-routes.test.ts    |  78 ++++++++++
 .../dashboard/src/routes/register-chat-routes.ts   |  39 ++++-
 packages/i18n/locales/en/app.json                  |   2 +
 packages/i18n/locales/es/app.json                  |   2 +
 packages/i18n/locales/fr/app.json                  |   2 +
 packages/i18n/locales/ko/app.json                  |   2 +
 packages/i18n/locales/zh-CN/app.json               |   2 +
 packages/i18n/locales/zh-TW/app.json               |   2 +
 25 files changed, 667 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-7631

Fusion-Task-Lineage: bc68b489-26a7-453e-901b-bda816af364e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-07 22:06:17 -07:00
gsxdsm
42009cfdb9 FN-7628: allow editing sent chat messages and rewinding agent responses
Adds the ability to edit a previously sent message in an agent chat, which rewinds the session/task room and regenerates the response from the edited message.

- Add chat-store support for locating/replacing a message and truncating subsequent history for a rewind
- Add a chat-manager rewind-session flow and a new register-chat-routes endpoint to rewind a room to an edited message
- Add legacy API route wiring and useChat hook support for issuing an edit request
- Add ChatView/StandardChatSurface/TaskPlannerChatTab UI affordances (edit control, styling) to trigger message edits
- Add a changeset documenting the new chat message-edit capability
- Add unit/integration tests covering chat-store rewind logic, chat-manager rewind-session behavior, chat routes, useChat, and ChatView edit UI

Files changed:
 .changeset/fn-7628-chat-message-edit.md            |   7 +
 docs/dashboard-guide.md                            |   4 +
 packages/core/src/__tests__/chat-store.test.ts     | 171 ++++++++++++++
 packages/core/src/chat-store.ts                    |  95 ++++++++
 packages/dashboard/app/api/legacy.ts               |  22 ++
 packages/dashboard/app/components/ChatView.css     |  78 ++++++
 packages/dashboard/app/components/ChatView.tsx     |  14 ++
 .../app/components/StandardChatSurface.tsx         |  87 ++++++-
 .../app/components/TaskPlannerChatTab.tsx          |   8 +
 .../__tests__/ChatView.autosize.test.tsx           |   1 +
 .../__tests__/ChatView.default-model-icon.test.tsx |   1 +
 .../components/__tests__/ChatView.draft.test.tsx   |   1 +
 .../__tests__/ChatView.hash-mention.test.tsx       |   1 +
 .../__tests__/ChatView.message-edit.test.tsx       | 262 +++++++++++++++++++++
 .../__tests__/ChatView.mobile-render.test.tsx      |   1 +
 .../components/__tests__/ChatView.rooms.test.tsx   |   1 +
 .../__tests__/ChatView.scroll-to-top.test.tsx      |   1 +
 .../components/__tests__/ChatView.test-harness.tsx |   1 +
 .../dashboard/app/hooks/__tests__/useChat.test.ts  |  98 ++++++++
 packages/dashboard/app/hooks/useChat.ts            |  60 +++++
 .../__tests__/chat-manager-rewind-session.test.ts  | 185 +++++++++++++++
 .../dashboard/src/__tests__/chat-manager.test.ts   |  12 +
 .../dashboard/src/__tests__/chat-routes.test.ts    | 124 ++++++++++
 packages/dashboard/src/chat.ts                     | 147 +++++++++++-
 .../dashboard/src/routes/register-chat-routes.ts   |  52 ++++
 25 files changed, 1429 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-7628

Fusion-Task-Lineage: 36d98989-1b75-428c-baf1-b2c7e8e78013

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-07 22:06:15 -07:00
gsxdsm
e7cb2f1fed FN-7525: add Revert/Undo affordance to Done and Archived task cards
Adds a Revert action so operators can undo landed changes for Done/Archived tasks directly from the board.

- Adds onRevertTask wiring through Board, Column, Lane, ListView, TaskDetailModal, and WorktreeGroup surfaces
- Adds a Revert affordance to TaskCard (Done/Archived states) with confirm UX and CSS
- Adds POST /tasks/:id/revert legacy API route supporting "auto" mode with an AI-undo fallback (mode: "ai") on conflict
- Wires useTasks hook and dashboard MainContent/types to support the new revert action
- Adds new i18n strings for the revert affordance
- Adds a minor changeset for @runfusion/fusion documenting the feature
- Adds/updates tests: TaskCard.test.tsx, board-mobile.test.tsx, api-git.test.ts
- Updates docs/dashboard-guide.md and docs/task-management.md

Files changed:
 .changeset/fn-7525-revert-card-affordance.md       |   7 +
 docs/dashboard-guide.md                            |   2 +-
 docs/task-management.md                            |  10 ++
 packages/dashboard/app/App.tsx                     |   7 +-
 packages/dashboard/app/__tests__/api-git.test.ts   |  51 +++++++
 packages/dashboard/app/api/legacy.ts               |  51 +++++++
 packages/dashboard/app/components/AppModals.tsx    |   5 +-
 packages/dashboard/app/components/Board.tsx        |  10 +-
 packages/dashboard/app/components/Column.tsx       |   8 +-
 packages/dashboard/app/components/Lane.tsx         |   5 +-
 packages/dashboard/app/components/ListView.tsx     |  80 ++++++++++-
 packages/dashboard/app/components/TaskCard.css     |  24 +++-
 packages/dashboard/app/components/TaskCard.tsx     | 127 ++++++++++++++++-
 packages/dashboard/app/components/TaskDetailModal.tsx   |  85 ++++++++++++
 packages/dashboard/app/components/WorktreeGroup.tsx     |   6 +
 packages/dashboard/app/components/__tests__/TaskCard.test.tsx     | 151 +++++++++++++++++++++
 packages/dashboard/app/components/__tests__/board-mobile.test.tsx |  63 +++++++++
 packages/dashboard/app/components/dashboard/MainContent.tsx       |   4 +
 packages/dashboard/app/components/dashboard/types.ts    |   8 ++
 packages/dashboard/app/components/useRightDockController.tsx      |   4 +
 packages/dashboard/app/hooks/useTasks.ts           |  21 ++-
 packages/i18n/locales/en/app.json                  |  11 ++
 22 files changed, 718 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-7525

Fusion-Task-Lineage: b9e2ca94-4ec6-4443-8e41-cf4828018856

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-05 11:31:47 -07:00
gsxdsm
4b530a65de fix: restore Anthropic subscription card after in-session logout + re-login
Subscription OAuth is aliased across the legacy `anthropic` id (where login
persists the credential) and `anthropic-subscription` (where the settings card
and status read are keyed). After an in-session logout, re-login wrote only
`anthropic` and never cleared the in-memory `anthropic-subscription` logged-out
flag, so the card reported "Login did not complete" despite a valid stored
credential until the process restarted.

auth-storage's proxy now clears the logged-out suppression on both aliases when
either is re-authenticated (new `login` trap + hardened `set` trap via
clearReauthenticatedLogoutState); raw api_key writes stay scoped to their own
card. Also surface previously-swallowed background OAuth login failures on
GET /auth/status (`loginError`) plus server logs and a settings toast, so real
paste-callback failures are diagnosable instead of a generic error.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 11:31:47 -07:00
gsxdsm
d10ea9aef1 FN-7519: add planner-overseer intervention timeline model and UI
Introduces a persisted planner-overseer intervention timeline surfaced in the task-detail Planner Oversight cluster, recording stage, reason, action taken, outcome, attempt count/limit, and source links for each intervention.

- Add core `PlannerInterventionEntry` type plus `recordPlannerIntervention`/`getPlannerInterventionTimeline` helpers that persist entries via the run-audit store under the `overseer:intervention` mutation
- Add `PlannerInterventionTimeline` dashboard component rendering the timeline (stage/reason/action/outcome/attempts/links) with associated styles
- Wire the new API route/legacy handler and TaskDetailModal integration to expose and render the timeline
- Add unit tests for the core helpers and the new UI component
- Add changeset for the new minor feature and update architecture/dashboard-guide docs

Files changed:
$(cat /tmp/diffstat_7519.txt)

Fusion-Task-Id: FN-7519

Fusion-Task-Lineage: 3c4fcda3-9eb2-46d3-b142-b0c7d6334cd0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-04 21:28:17 -07:00
gsxdsm
6498d028f2 FN-7517: add task detail oversight quick-controls (level change, manual nudge, stop, explain-current-action)
Adds task detail modal controls that let an operator quickly change a task's
oversight level, nudge the planner with a manual instruction, stop oversight
entirely, and request an explanation of the overseer's current action,
backed by new dashboard API routes and engine/core plumbing.

- Add oversight quick-controls UI (level change, manual nudge, stop
  oversight, explain-current-action) to TaskDetailModal with supporting
  styles in TaskDetailModal.css and TaskCard.css
- Add dashboard legacy API + task-workflow routes to handle the new
  oversight actions (register-task-workflow-routes.ts, api/legacy.ts)
- Extend planner-overseer-state and planner-overseer-runtime-snapshot to
  track/report manual nudge and stop-oversight state
- Extend PlannerRecoveryController and project-engine to apply manual
  oversight actions (level change, nudge, stop, explain) end-to-end
- Add tests: TaskDetailModal.oversight-controls.test.tsx,
  tasks-overseer-controls.test.ts,
  planner-recovery-controller-manual-action.test.ts, plus updates to
  planner-overseer-runtime-snapshot.test.ts and test-helpers
- Update docs/dashboard-guide.md and docs/settings-reference.md

Files changed:
 docs/dashboard-guide.md                            |   2 +
 docs/settings-reference.md                         |   2 +-
 packages/core/src/planner-overseer-state.ts        |  18 +
 packages/dashboard/app/api/legacy.ts               |  33 ++
 packages/dashboard/app/components/TaskCard.css     |  13 +
 packages/dashboard/app/components/TaskDetailModal.css   | 122 +++++++
 packages/dashboard/app/components/TaskDetailModal.tsx   | 374 ++++++++++++++++++++-
 packages/dashboard/app/components/__tests__/TaskDetailModal.oversight-controls.test.tsx | 290 ++++++++++++++++
 packages/dashboard/app/components/__tests__/TaskDetailModal.test-helpers.ts      |  11 +
 packages/dashboard/src/routes/__tests__/tasks-overseer-controls.test.ts      | 191 +++++++++++
 packages/dashboard/src/routes/register-task-workflow-routes.ts    |  68 ++++
 packages/engine/src/__tests__/planner-overseer-runtime-snapshot.test.ts      |  24 +-
 packages/engine/src/__tests__/planner-recovery-controller-manual-action.test.ts |  84 +++++
 packages/engine/src/planner-overseer-runtime-snapshot.ts       |  11 +
 packages/engine/src/planner-recovery-controller.ts |  40 +++
 packages/engine/src/project-engine.ts              | 102 ++++++
 16 files changed, 1380 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-7517

Fusion-Task-Lineage: eded7ff5-d126-429d-acbb-9f4bfff5ae2a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-04 21:28:16 -07:00
gsxdsm
c16cc9e08a FN-7515: expose planner oversight configuration
Expose planner oversight as workflow-native configuration across task and workflow surfaces.

- Add a shared TaskForm selector for per-task planner oversight overrides with inherit semantics.
- Thread plannerOversightLevel through new task creation, task detail edits, and legacy dashboard API payloads.
- Add a Workflow Editor Values display group and documentation for configuring workflow defaults.
- Cover create, edit, form, and workflow settings behavior with dashboard tests.

Files changed:
 .changeset/fn-7515-planner-oversight-config-exposure.md   |  7 ++
 docs/dashboard-guide.md                                    |  1 +
 docs/settings-reference.md                                 |  2 +-
 packages/dashboard/app/api/legacy.ts                       |  3 +
 packages/dashboard/app/components/NewTaskModal.tsx         | 12 +++-
 packages/dashboard/app/components/TaskDetailModal.tsx      | 11 +++-
 packages/dashboard/app/components/TaskForm.tsx             | 34 ++++++++++
 packages/dashboard/app/components/__tests__/NewTaskModal.test.tsx | 31 +++++++++
 packages/dashboard/app/components/__tests__/TaskDetailModal.inline-editing-and-integrations.test.tsx | 76 ++++++++++++++++++++++
 packages/dashboard/app/components/__tests__/TaskForm.test.tsx | 28 ++++++++
 packages/dashboard/app/components/__tests__/WorkflowSettingsPanel.test.tsx | 34 ++++++++++
 packages/dashboard/app/components/workflow-setting-display.ts | 17 ++++-
 12 files changed, 251 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-7515

Fusion-Task-Lineage: aded67c0-835c-4046-b691-04dc2bb2d314

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-04 14:26:46 -07:00
gsxdsm
61c8bdc117 FN-7497: keep accepted chat streams waiting
Keep accepted-but-silent chat streams waiting so late responses can reconcile without false timeout failures.

- Stop aborting accepted chat streams when the first SSE event timer fires without content.
- Cover desktop, mobile, planner chat, reattach, hook, and SSE parser paths for late accepted responses.
- Add a patch changeset for the chat first-event timeout fix.

Files changed:
 .changeset/fn-7497-chat-first-event-timeout.md     |  7 +++
 .../app/api/__tests__/legacy-chat-stream.test.ts   | 27 ++++++--
 packages/dashboard/app/api/legacy.ts               |  8 ++-
 .../__tests__/ChatView.core-interactions.test.tsx  | 41 +++++++++++++
 .../__tests__/TaskPlannerChatTab.test.tsx          | 71 ++++++++++++++++++++++
 .../dashboard/app/hooks/__tests__/useChat.test.ts  | 41 +++++++++++++
 6 files changed, 188 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-7497

Fusion-Task-Lineage: bb53793d-dc78-4a25-af22-ed1c62b73094

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-04 10:42:20 -07:00
gsxdsm
315f3bc32c FN-7470: show Git prerequisite during onboarding
Add Git availability checks to the first-run GitHub onboarding flow so missing host prerequisites are visible before project setup.

- Probe the server-host Git CLI with a bounded core helper and expose status through the auth status API.
- Render ready/missing Git prerequisite guidance in the GitHub onboarding step with install instructions and localized strings.
- Cover the probe, auth route, and onboarding UI states with regression tests, docs, and a changeset.

Files changed:
 .changeset/fn-7470-git-onboarding.md               |  7 ++
 docs/dashboard-guide.md                            |  2 +
 docs/getting-started.md                            |  2 +-
 packages/core/src/__tests__/git-cli-status.test.ts | 83 +++++++++++++++++++++
 packages/core/src/git-cli-status.ts                | 56 ++++++++++++++
 packages/core/src/index.ts                         |  7 ++
 packages/dashboard/app/api/legacy.ts               |  8 ++
 .../app/components/ModelOnboardingModal.css        | 59 +++++++++++++++
 .../app/components/ModelOnboardingModal.tsx        | 53 ++++++++++++-
 .../__tests__/ModelOnboardingModal.test.tsx        | 87 ++++++++++++++++++++++
 .../dashboard/src/__tests__/routes-auth.test.ts    | 62 ++++++++++++++-
 .../dashboard/src/routes/register-auth-routes.ts   | 13 +++-
 packages/i18n/locales/en/app.json                  | 11 ++-
 packages/i18n/locales/es/app.json                  | 44 ++++++++++-
 packages/i18n/locales/fr/app.json                  | 44 ++++++++++-
 packages/i18n/locales/ko/app.json                  | 44 ++++++++++-
 packages/i18n/locales/zh-CN/app.json               | 44 ++++++++++-
 packages/i18n/locales/zh-TW/app.json               | 44 ++++++++++-
 packages/i18n/src/resources.d.ts                   |  9 +++
 19 files changed, 661 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-7470
Fusion-Task-Lineage: 56d6f118-0d82-4f89-bcaa-b01e72a1bf8b
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 21:45:21 -07:00
gsxdsm
30a11ac919 FN-7461: count footer queues across task states
Correct the dashboard footer counter contract so active task pressure matches board state coverage.

- Count triage and planning lanes as queued while excluding done, archived, and inactive custom lanes.
- Treat only actionable blockedBy values as blocked tasks and keep running/stuck scoped to in-progress work.
- Cover every visible footer counter, background/overlap segments, and the intentional absence of a Done footer count in regression tests.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-7461-footer-counters.md              |  7 ++
 packages/dashboard/app/api/legacy.ts               |  6 +-
 .../__tests__/ExecutorStatusBar.test.tsx           | 86 +++++++++++++++++++++-
 .../app/hooks/__tests__/useExecutorStats.test.ts   | 59 ++++++++-------
 packages/dashboard/app/hooks/useExecutorStats.ts   | 24 +++++-
 5 files changed, 150 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-7461

Fusion-Task-Lineage: a1eceb98-76b2-4820-95c4-888ad61b4162

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 07:47:03 -07:00
gsxdsm
91737b1831 FN-7433: add explicit onboarding git setup modes
Expose explicit git setup choices in first-run onboarding and project registration.

- Add setup wizard modes for existing repositories, new git initialization, and remote cloning with mode-specific hints and validation.
- Extend project registration to accept gitSetupMode while preserving legacy cloneUrl-only behavior.
- Cover init and clone validation paths with dashboard tests, localized copy, docs, and a published package changeset.

Files changed:
 .changeset/fn-7433-onboarding-git-setup.md         |   7 +
 docs/dashboard-guide.md                            |  10 ++
 docs/getting-started.md                            |  10 +-
 packages/dashboard/app/api/legacy.ts               |   1 +
 .../dashboard/app/components/SetupWizardModal.css  |  77 +++++++++-
 .../dashboard/app/components/SetupWizardModal.tsx  | 159 ++++++++++++++-------
 .../components/__tests__/SetupWizardModal.test.tsx | 107 +++++++++++++-
 .../dashboard/src/__tests__/project-routes.test.ts |  98 +++++++++++++
 .../src/routes/register-project-routes.ts          |  25 +++-
 packages/i18n/locales/en/app.json                  |  23 ++-
 packages/i18n/locales/es/app.json                  |  25 +++-
 packages/i18n/locales/fr/app.json                  |  25 +++-
 packages/i18n/locales/ko/app.json                  |  25 +++-
 packages/i18n/locales/zh-CN/app.json               |  25 +++-
 packages/i18n/locales/zh-TW/app.json               |  25 +++-
 15 files changed, 538 insertions(+), 104 deletions(-)

Fusion-Task-Id: FN-7433

Fusion-Task-Lineage: 022c25c2-3c2d-4e47-aa8c-02525caad672

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:34 -07:00
gsxdsm
b8e126eeaf FN-7425: add GitLab tracking metadata to tasks
Persist GitLab tracking metadata and surface it across task APIs and dashboard views.

- add task-store schema, migration, and update helpers for linked GitLab items and stale state
- expose validated GitLab tracking updates through task workflow routes and legacy task payloads
- render GitLab badges, detail-panel metadata, open/unlink actions, styling, i18n strings, and docs
- cover persistence, route validation, task card badges, and task detail interactions with tests
- add a patch changeset for the published Fusion package

Files changed:
 .changeset/fn-7425-gitlab-tracking.md              |   7 ++
 docs/cli-reference.md                              |   2 +-
 docs/dashboard-guide.md                            |   3 +
 packages/core/src/__tests__/db-migrate.test.ts     |  29 +++++
 .../src/__tests__/store-gitlab-tracking.test.ts    | 138 +++++++++++++++++++++
 packages/core/src/db.ts                            |  10 +-
 packages/core/src/gitlab-tracking.ts               |  10 ++
 packages/core/src/index.ts                         |   3 +-
 packages/core/src/store.ts                         | 135 +++++++++++++++++++-
 packages/core/src/types.ts                         |  49 ++++++++
 packages/dashboard/app/api/legacy.ts               |   3 +
 packages/dashboard/app/components/GitLabBadge.tsx  |  33 +++++
 packages/dashboard/app/components/TaskCard.tsx     |   7 +-
 .../dashboard/app/components/TaskCardBadge.tsx     |  15 ++-
 .../dashboard/app/components/TaskDetailModal.css   |  47 +++++--
 .../dashboard/app/components/TaskDetailModal.tsx   | 134 +++++++++++++++++++-
 .../app/components/__tests__/TaskCard.test.tsx     |  49 ++++++++
 .../TaskDetailModal.gitlab-tracking.test.tsx       | 121 ++++++++++++++++++
 .../__tests__/TaskDetailModal.test-helpers.ts      |   1 +
 packages/dashboard/app/styles.css                  |   9 ++
 .../src/__tests__/routes-tasks-ops.test.ts         | 136 ++++++++++++++++++++
 packages/dashboard/src/gitlab.ts                   |  24 +++-
 packages/dashboard/src/routes/register-gitlab.ts   |   1 +
 .../src/routes/register-task-workflow-routes.ts    | 106 +++++++++++++++-
 packages/i18n/locales/en/app.json                  |  31 +++++
 packages/i18n/src/resources.d.ts                   |  31 +++++
 26 files changed, 1106 insertions(+), 28 deletions(-)

Fusion-Task-Id: FN-7425

Fusion-Task-Lineage: 9b5e6005-7284-402e-995c-553be2275eff

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:34 -07:00
gsxdsm
865dec235b FN-7424: add GitLab task imports
Adds GitLab-backed task import flows across the CLI, extension, API, and dashboard.

- Add GitLab client normalization, provenance, duplicate detection, and import routes for project issues, group issues, and merge requests.
- Extend the dashboard import modal with a GitLab provider, resource tabs, previews, imported-state detection, and import actions.
- Add CLI and extension task import commands plus usage event/gating classifications and operator documentation.
- Cover GitLab fetch/import behavior with dashboard, CLI, and gating tests.

Files changed:
 .changeset/fn-7424-gitlab-imports.md               |   7 +
 docs/cli-reference.md                              |  11 +-
 docs/gitlab-parity-inventory.md                    |  10 +-
 docs/task-management.md                            |   6 +-
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 .../cli/skill/fusion/references/extension-tools.md |  60 ++++
 .../skill/fusion/references/fusion-capabilities.md |   6 +
 packages/cli/src/__tests__/extension.test.ts       |   6 +
 .../__tests__/task-command-gitlab-import.test.ts   |  97 ++++++
 packages/cli/src/bin.ts                            |  25 +-
 packages/cli/src/commands/task.ts                  |  58 ++++
 packages/cli/src/extension.ts                      | 106 +++++++
 packages/core/src/__tests__/usage-events.test.ts   |   2 +
 packages/core/src/types.ts                         |   7 +
 packages/core/src/usage-events.ts                  |   3 +
 packages/dashboard/app/api/legacy.ts               |  52 ++++
 .../dashboard/app/components/GitHubImportModal.css |  41 +++
 .../dashboard/app/components/GitHubImportModal.tsx | 143 ++++++++-
 .../__tests__/GitHubImportModal.test.tsx           |  33 ++
 packages/dashboard/src/__tests__/gitlab.test.ts    |  56 ++++
 .../dashboard/src/__tests__/routes-gitlab.test.ts  |  99 ++++++
 packages/dashboard/src/gitlab.ts                   | 334 +++++++++++++++++++++
 packages/dashboard/src/index.ts                    |  15 +
 packages/dashboard/src/routes.ts                   |   2 +
 packages/dashboard/src/routes/register-gitlab.ts   | 192 ++++++++++++
 .../engine/src/__tests__/agent-action-gate.test.ts |   4 +
 .../gating-classifications-provisioning.test.ts    |  13 +-
 .../src/__tests__/gating-classifications.test.ts   |   6 +
 packages/engine/src/gating-classifications.ts      |   9 +
 29 files changed, 1388 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-7424
Fusion-Task-Lineage: 8012425c-21d5-4b20-adb7-07d2e5aa1cef
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:34 -07:00
gsxdsm
abb1917999 FN-7419: add Cursor CLI binary path override
Add a global Cursor CLI binary path override that is validated before enabling or probing Cursor routing.

- Add global settings schema/types and API support for storing a trimmed Cursor CLI binary path override.
- Surface a Settings Authentication control to save, clear, and test the Cursor CLI binary path.
- Probe configured Cursor binaries before PATH fallbacks and expose diagnostics for status/routes.
- Cover settings, route, dashboard, and cursor runtime behavior with focused tests and documentation.

Files changed:
 .changeset/fn-7419-cursor-cli-binary-path.md       |   7 ++
 docs/cursor-cli-contract.md                        |  33 ++++--
 docs/settings-reference.md                         |   2 +
 .../core/src/__tests__/cursor-cli-settings.test.ts |  34 ++++++
 packages/core/src/settings-schema.ts               |   6 +
 packages/core/src/types.ts                         |   8 ++
 packages/dashboard/app/api/legacy.ts               |  17 ++-
 .../app/components/CursorCliProviderCard.css       |  37 +++++-
 .../app/components/CursorCliProviderCard.tsx       |  78 ++++++++++++-
 .../__tests__/ModelOnboardingModal.test.tsx        |   4 +
 .../__tests__/SettingsModal.general.test.tsx       |   2 +
 .../__tests__/SettingsModal.models-auth.test.tsx   |  75 ++++++++++++
 .../SettingsModal.remote-notifications.test.tsx    |   2 +
 .../SettingsModal.scheduling-merge.test.tsx        |   2 +
 .../__tests__/SettingsModal.test-harness.tsx       |   3 +
 .../dashboard/src/__tests__/routes-auth.test.ts    | 130 ++++++++++++++++++++-
 .../dashboard/src/routes/register-auth-routes.ts   |  69 +++++++++--
 .../src/__tests__/probe.test.ts                    |  61 +++++++++-
 .../src/__tests__/process-manager.test.ts          |  10 ++
 .../src/__tests__/provider.test.ts                 |  57 +++++++++
 plugins/fusion-plugin-cursor-runtime/src/probe.ts  |  39 +++++--
 .../fusion-plugin-cursor-runtime/src/provider.ts   |  15 ++-
 plugins/fusion-plugin-cursor-runtime/src/types.ts  |   3 +
 23 files changed, 655 insertions(+), 39 deletions(-)

Fusion-Task-Id: FN-7419
Fusion-Task-Lineage: 2c192a37-a1db-41a9-99f5-a480ed311d9c
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 11:38:33 -07:00
gsxdsm
14bb7a3707 feat(FN-7360): remove legacy workflow step engine
The step execution engine was already gone (runWorkflowSteps deleted,
workflow_steps table dropped in migration 132). This removes what remained:
the linear step compiler (compileWorkflowToSteps/validateLinearity/
WorkflowCompileError), which survived only as a validator + step-preview
generator.

parseWorkflowIr/validateV2 (which accepts branching graphs) is now the sole
workflow validity gate at save/select/refine and in the graph task runner.
Custom branching workflows are now selectable and run on the graph
interpreter instead of being rejected as non-linear.

- core: delete workflow-compiler.ts; rework store.validateWorkflowCompilable
  onto parseWorkflowIr; move MERGE_REGION_NODE_KINDS into
  workflow-lifecycle-validation; retag workflow-steps-to-ir as legacy lowering
- engine: drop the compiler double-validation in workflow-graph-task-runner
- dashboard: remove POST /api/workflows/:id/compile + client wrapper; drop the
  interpreterOnly response field and editor banner; no post-save compile check
- i18n: remove the orphaned workflowNodes.interpreterOnly key across locales
- tests: reframe two workflow-selection tests whose premise inverted; fix a
  pre-existing red in builtin-lead-generation (completion-summary node)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 11:28:03 -07:00
gsxdsm
869974cd5a FN-7383: refresh workflows after chat authoring
Chat-authored workflow changes now propagate immediately to workflow selectors and editors.

- Emit workflow lifecycle SSE events when chat, planner, or room workflow tools create, update, select, configure, or delete workflows.
- Force-refresh board workflow caches and the workflow editor list when workflow lifecycle events arrive.
- Add cross-surface tests for chat workflow creation visibility and room/chat workflow tool event behavior.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-7383-chat-workflow-authoring.md      |  7 +++
 .../workflow-selection-cross-surface.test.tsx      | 23 +++++++++
 packages/dashboard/app/api/legacy.ts               |  9 ++--
 .../app/components/WorkflowNodeEditor.tsx          | 23 ++++++++-
 .../app/hooks/__tests__/useBoardWorkflows.test.ts  | 27 +++++++---
 packages/dashboard/app/hooks/useBoardWorkflows.ts  | 22 +++++---
 .../utils/__tests__/boardWorkflowsCache.test.ts    | 12 ++++-
 .../dashboard/app/utils/boardWorkflowsCache.ts     | 14 +++++
 .../dashboard/src/__tests__/chat-manager.test.ts   | 44 ++++++++++++++--
 .../dashboard/src/__tests__/chat.rooms.test.ts     | 44 ++++++++++++++++
 packages/dashboard/src/chat.ts                     | 59 +++++++++++++++++++---
 11 files changed, 255 insertions(+), 29 deletions(-)

Fusion-Task-Id: FN-7383

Fusion-Task-Lineage: ebe4c982-214b-402f-b829-a58ace19ffe0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-01 11:12:59 -07:00
gsxdsm
a65633d878 FN-7368: keep accepted chat sends visible after provider errors
Preserve sent chat turns when provider failures arrive after the server accepts a stream.

- Track whether chat stream errors happen before or after server acceptance.
- Reconcile persisted user-message echoes with optimistic bubbles across global chat and planner chat.
- Preserve delivered room-chat messages when reply generation or recovery refresh fails.
- Cover accepted-error and pre-acceptance rollback behavior with focused dashboard tests.

Files changed:
 .changeset/fn-7368-chat-provider-error.md          |  7 ++
 packages/dashboard/app/api/legacy.ts               | 25 ++++--
 .../app/components/TaskPlannerChatTab.tsx          | 47 ++++++++++-
 .../__tests__/TaskPlannerChatTab.test.tsx          | 71 ++++++++++++++++
 .../dashboard/app/hooks/__tests__/useChat.test.ts  | 96 ++++++++++++++++++++++
 .../app/hooks/__tests__/useChatRooms.test.ts       | 25 ++++++
 .../app/hooks/createChatStreamHandlers.ts          | 10 +--
 packages/dashboard/app/hooks/useChat.ts            | 48 ++++++++---
 packages/dashboard/app/hooks/useChatRooms.ts       |  5 +-
 9 files changed, 305 insertions(+), 29 deletions(-)

Fusion-Task-Id: FN-7368

Fusion-Task-Lineage: b7935c3f-3604-4ed5-b32e-a6ead536a991

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-01 07:50:52 -07:00
gsxdsm
7d2bd9794e FN-7337: make planner chats lazy and archive-scoped
Task planner chats now stay out of global chat history until a user interacts and are retained until task archive.

- Load task planner chat tabs with lookup-only resume before any user send.
- Show task-planner sessions in global Chat only after messages exist, including SSE refresh handling.
- Keep interacted planner chats for done tasks while deleting task-scoped planner sessions on archive.
- Cover chat store deletion, planner tab behavior, route filtering, and chat-list refresh with regression tests.

Files changed:
 .changeset/fn-7337-planner-chat-retention.md       |   7 ++
 docs/dashboard-guide.md                            |   4 +-
 packages/core/src/__tests__/chat-store.test.ts     |  44 +++++++++
 packages/core/src/chat-store.ts                    |  22 +++++
 packages/dashboard/app/api/legacy.ts               |  35 ++++++-
 .../app/components/TaskPlannerChatTab.tsx          |  13 ++-
 .../__tests__/TaskPlannerChatTab.test.tsx          |  91 +++++++++++++-----
 .../dashboard/app/hooks/__tests__/useChat.test.ts  |  41 ++++++++
 packages/dashboard/app/hooks/useChat.ts            |  15 ++-
 .../dashboard/src/__tests__/chat-routes.test.ts    | 105 +++++++++++++++++++++
 .../dashboard/src/routes/register-chat-routes.ts   |  17 +++-
 packages/dashboard/src/server.ts                   |  10 +-
 packages/engine/src/runtimes/in-process-runtime.ts |   8 ++
 13 files changed, 378 insertions(+), 34 deletions(-)

Fusion-Task-Id: FN-7337

Fusion-Task-Lineage: 7ef9ed8f-af2e-4fa9-a2b6-0e8c8a805d5e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 23:45:01 -07:00
gsxdsm
ddfd841b53 FN-7312: send task context to planner chat
Send bounded task state into task-detail planner chat so status and progress questions can be answered in context.

- Build reusable server-side planner chat context from task metadata, dependencies, steps, comments, activity, source, and review state.
- Pass and validate the task id on planner chat sends to keep sessions scoped to the current task.
- Update planner chat copy, docs, tests, and changeset coverage for task-aware status/progress questions.

Files changed:
 .changeset/fn-7312-task-planner-chat-context.md    |   7 +
 docs/dashboard-guide.md                            |   4 +-
 packages/dashboard/app/api/legacy.ts               |   5 +-
 .../app/components/TaskPlannerChatTab.tsx          |   5 +-
 .../__tests__/TaskPlannerChatTab.test.tsx          |  22 ++
 .../dashboard/src/__tests__/chat-manager.test.ts   |  17 +-
 .../dashboard/src/__tests__/chat-routes.test.ts    |  76 +++++
 .../__tests__/task-planner-chat-context.test.ts    | 165 +++++++++++
 packages/dashboard/src/chat.ts                     |  92 +-----
 .../dashboard/src/routes/register-chat-routes.ts   |  11 +-
 .../dashboard/src/task-planner-chat-context.ts     | 326 +++++++++++++++++++++
 11 files changed, 634 insertions(+), 96 deletions(-)

Fusion-Task-Id: FN-7312

Fusion-Task-Lineage: 90cf0fe3-3984-4a67-bb44-fce492c256eb

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 18:51:41 -07:00
gsxdsm
db7b46f60f FN-7310: add task planner chat tab
Add a dedicated task-detail Chat surface for planner-model conversations separate from Activity steering.

- Add task-scoped planner chat session creation and routing with planning-model overrides.
- Render a new top-level Chat tab next to Activity, including streaming responses, tool-call cards, and retry/error states.
- Cover planner chat tab ordering, session reuse, route validation, manager dispatch, and dashboard documentation.

Files changed:
 .changeset/fn-7310-planner-chat.md                 |   7 +
 docs/dashboard-guide.md                            |   3 +-
 packages/dashboard/app/api/legacy.ts               |  35 +++
 .../dashboard/app/components/TaskDetailModal.tsx   |  40 ++-
 .../app/components/TaskPlannerChatTab.css          | 149 ++++++++++
 .../app/components/TaskPlannerChatTab.tsx          | 322 +++++++++++++++++++++
 ...etailModal.responsive-and-dependencies.test.tsx |  13 +-
 .../__tests__/TaskDetailModal.test-helpers.ts      |   3 +
 .../components/__tests__/TaskDetailModal.test.tsx  |  58 ++++
 .../__tests__/TaskPlannerChatTab.test.tsx          | 193 ++++++++++++
 .../dashboard/src/__tests__/chat-manager.test.ts   |  65 +++++
 .../dashboard/src/__tests__/chat-routes.test.ts    | 106 +++++++
 packages/dashboard/src/chat.ts                     | 132 ++++++++-
 .../dashboard/src/routes/register-chat-routes.ts   |  68 +++++
 14 files changed, 1181 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-7310

Fusion-Task-Lineage: a276c356-599e-4495-9879-472d157d95e5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 17:20:42 -07:00
gsxdsm
5f67c85fea FN-7285: add workflow icons and trim built-in labels
Adds workflow icon metadata while preserving readable workflow names without built-in suffixes.

- Store and validate compact plain-text workflow icons across core APIs, imports, exports, tools, and analytics.
- Render Fusion marks for built-in workflows and custom text icons beside existing workflow labels on board, switcher, detail, and editor surfaces.
- Update workflow editor creation/copy flows, docs, release notes, and tests for icon metadata and shorter built-in names.

Files changed:
 .changeset/fn-7285-workflow-icons.md               |   7 ++
 docs/dashboard-guide.md                            |  12 +--
 .../cli/skill/fusion/references/extension-tools.md |   2 +
 .../core/src/__tests__/builtin-workflows.test.ts   |   8 +-
 packages/core/src/__tests__/db-migrate.test.ts     |   7 +-
 .../core/src/__tests__/workflow-analytics.test.ts  |  15 +--
 .../__tests__/workflow-definition-store.test.ts    |  31 ++++++
 packages/core/src/builtin-workflows.ts             |  20 ++--
 packages/core/src/db.ts                            |  11 +-
 packages/core/src/index.ts                         |   4 +
 packages/core/src/store.ts                         |  24 ++++-
 packages/core/src/workflow-analytics.ts            |   7 +-
 packages/core/src/workflow-definition-types.ts     |  31 ++++++
 packages/dashboard/app/api/legacy.ts               |   2 +
 packages/dashboard/app/components/Board.tsx        |  18 ++--
 packages/dashboard/app/components/Column.tsx       |   2 +-
 packages/dashboard/app/components/TaskCard.tsx     |   7 +-
 .../dashboard/app/components/TaskDetailModal.tsx   |  20 ++--
 packages/dashboard/app/components/WorkflowIcon.css |  42 ++++++++
 packages/dashboard/app/components/WorkflowIcon.tsx |  49 +++++++++
 .../app/components/WorkflowNodeEditor.css          |  32 ++++++
 .../app/components/WorkflowNodeEditor.tsx          | 113 ++++++++++++++++-----
 .../dashboard/app/components/WorkflowSwitcher.css  |   9 ++
 .../dashboard/app/components/WorkflowSwitcher.tsx  |  15 ++-
 .../dashboard/app/components/WorktreeGroup.tsx     |   2 +-
 .../app/components/__tests__/Board.test.tsx        |  12 +--
 .../app/components/__tests__/Lane.test.tsx         |   6 +-
 .../__tests__/WorkflowNodeEditor.test.tsx          |  57 +++++++++--
 .../components/__tests__/WorkflowSwitcher.test.tsx |  68 ++++++++-----
 .../__tests__/board-mobile-initial-render.test.tsx |   2 +-
 .../__tests__/CommandCenter.test.tsx               |   4 +-
 .../command-center/areas/WorkflowArea.tsx          |   2 +
 .../areas/__tests__/WorkflowArea.test.tsx          |   6 +-
 .../settings/sections/GeneralSection.tsx           |   6 +-
 .../register-command-center-routes.test.ts         |   2 +-
 .../__tests__/workflow-import-export.test.ts       |  32 +++++-
 packages/dashboard/src/routes/board-workflows.ts   |   6 +-
 .../src/routes/register-workflow-routes.ts         |  32 +++++-
 packages/engine/src/__tests__/agent-tools.test.ts  |   4 +-
 packages/engine/src/agent-tools.ts                 |   6 +-
 40 files changed, 590 insertions(+), 145 deletions(-)

Fusion-Task-Id: FN-7285
Fusion-Task-Lineage: 0fa689a2-f19d-4d1b-9a40-cc0b2181200a
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 12:21:25 -07:00
gsxdsm
04f06e6b70 FN-7269: preserve workflow settings and prompts across import
Workflow exports now carry project-specific settings and prompt overrides through import.

- Add settingValues and promptOverrides to workflow export envelopes and client API types.\n- Restore imported setting values and prompt overrides onto the freshly created workflow with validation and rollback on failure.\n- Cover custom and built-in workflow round-trips plus invalid restore-map rejection cases.\n- Document portable workflow exports and add a patch changeset.\n\nFiles changed:\n ...7269-workflow-export-import-settings-prompts.md |   7 ++\n docs/workflow-editor.md                            |   4 +-\n packages/dashboard/app/api/legacy.ts               |  10 +-\n .../__tests__/workflow-import-export.test.ts       | 113 ++++++++++++++++++++-\n .../src/routes/register-workflow-routes.ts         |  86 +++++++++++++++-\n 5 files changed, 210 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-7269

Fusion-Task-Lineage: 718f42d0-c72d-4818-8f8c-979d01e960af

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 01:28:33 -07:00
gsxdsm
b5da5d310a FN-7263: refresh custom provider model lists
Refresh persisted custom-provider model lists from saved endpoints and expose manual refresh controls.

- Add dashboard API helpers and routes to refresh one or all custom-provider model lists while preserving concurrent settings edits.
- Start background model refresh from serve, dashboard, and daemon startup paths after the server begins listening.
- Add Settings UI refresh actions, row-level status messaging, styles, docs, and regression coverage for refresh behavior.

Files changed:
 .changeset/fn-7263-custom-provider-model-refresh.md       |   7 +
 docs/dashboard-guide.md                            |   6 +-
 docs/settings-reference.md                         |   2 +-
 packages/cli/src/commands/__tests__/daemon.test.ts |  59 +++++
 .../cli/src/commands/__tests__/dashboard.test.ts   |  51 ++++
 packages/cli/src/commands/__tests__/serve.test.ts  |  59 ++++-
 packages/cli/src/commands/daemon.ts                |  39 +++-
 packages/cli/src/commands/dashboard.ts             |  10 +
 packages/cli/src/commands/serve.ts                 |  11 +-
 .../app/__tests__/api-custom-providers.test.ts     |  43 ++++
 packages/dashboard/app/api/legacy.ts               |  11 +
 .../app/components/CustomProvidersSection.css      |  41 +++-
 .../app/components/CustomProvidersSection.tsx      |  68 +++++-
 .../__tests__/CustomProvidersSection.test.tsx      | 227 ++++++++++++++++++
 packages/dashboard/src/index.ts                    |   6 +
 .../__tests__/custom-provider-routes.test.ts       | 255 ++++++++++++++++++++
 .../src/routes/__tests__/custom-providers.test.ts  |  12 +
 .../src/routes/register-custom-provider-routes.ts  | 259 ++++++++++++++++-----
 18 files changed, 1101 insertions(+), 65 deletions(-)

Fusion-Task-Id: FN-7263

Fusion-Task-Lineage: 60ee0637-ac85-409f-a376-c01f4bc8e8c5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-30 01:23:09 -07:00
gsxdsm
480d4d03fd FN-7254: add worktree commit history targets
Allow Git Manager users to inspect commits and diffs from registered worktrees without changing mutation targets.

- Add read-only worktreePath targeting to Git commit list and commit diff APIs with registered-worktree validation.
- Add a Commits history target selector and Worktrees "View commits" shortcuts that clear stale diff state when targets change.
- Document the read-only scope and cover API, UI, responsive layout, and mutation-target invariants with tests.

Files changed:
 .changeset/fn-7254-git-manager-worktree-commits.md |   7 +
 .changeset/fn-7254-worktree-commit-target-ui.md    |   7 +
 .changeset/fn-7254-worktree-commits.md             |   7 +
 docs/dashboard-guide.md                            |   6 +-
 packages/dashboard/app/api/legacy.ts               |  15 +-
 .../dashboard/app/components/GitManagerModal.tsx   | 133 ++++++++++++++--
 packages/dashboard/app/components/ScriptsModal.css | 113 ++++++++++++++
 .../components/__tests__/GitManagerModal.test.tsx  | 167 +++++++++++++++++++++
 .../dashboard/src/__tests__/routes-git.test.ts     |  34 +++++
 .../dashboard/src/routes/register-git-github.ts    |  31 +++-
 10 files changed, 497 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-7254

Fusion-Task-Lineage: 37314175-fef4-4f8d-8268-cf27fee09857

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-29 20:24:24 -07:00
gsxdsm
03d4f95e8a FN-7224: separate Anthropic subscription and API-key auth
Separate Claude subscription OAuth from raw Anthropic API-key authentication surfaces.

- Add synthetic Anthropic Subscription and Anthropic API Key provider IDs while preserving upstream credential storage compatibility.\n- Map dashboard auth routes, CLI auth storage, Settings, and onboarding flows so OAuth login/logout and API-key save/clear no longer share one user-facing card.\n- Extend auth tests, docs, icons, and the release changeset for the split Anthropic authentication behavior.\n\nFiles changed:\n .changeset/fn-7224-separate-anthropic-api-key.md   |   7 +\n docs/dashboard-guide.md                            |   2 +-\n docs/settings-reference.md                         |   2 +-\n .../src/commands/__tests__/provider-auth.test.ts   | 233 +++++++++++++++++++--\n packages/cli/src/commands/provider-auth.ts         | 202 +++++++++++++++---\n packages/dashboard/app/api/legacy.ts               |   2 -\n .../app/components/ModelOnboardingModal.tsx        | 146 ++++---------\n packages/dashboard/app/components/ProviderIcon.tsx |   7 +\n .../__tests__/AuthenticationSection.test.tsx       |  89 ++++----\n .../__tests__/SettingsModal.models-auth.test.tsx   |  77 ++++---\n .../components/__tests__/onboarding-flow.test.tsx  |  29 ++-\n .../components/__tests__/settings-mobile.test.tsx  |  17 +-\n .../settings/sections/AuthenticationSection.tsx    |  20 +-\n .../dashboard/src/__tests__/routes-auth.test.ts    | 111 ++++++----\n .../dashboard/src/routes/register-auth-routes.ts   |  93 +++++---\n 15 files changed, 713 insertions(+), 324 deletions(-)

Fusion-Task-Id: FN-7224

Fusion-Task-Lineage: a2db2cf6-3452-4516-81e5-41dcdf47e1d2

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-29 18:32:36 -07:00
gsxdsm
998a7f2745 fix(FN-7226): make plan review the single pre-execution gate
Fusion-Task-Id: FN-7226
2026-06-29 01:48:27 -07:00
gsxdsm
013d50fe8b FN-7206: add Anthropic API-key authentication
Add Anthropic API-key authentication alongside the existing OAuth flow.

- Expose Anthropic as a built-in API-key provider without hiding its OAuth controls.
- Render dual-auth Anthropic cards in Settings and model onboarding with key hints, save, and clear actions.
- Cover API status, CLI provider classification, desktop/mobile settings, and onboarding flows with tests and docs.

Files changed:
 .changeset/fn-7206-anthropic-api-key.md            |   7 +
 docs/dashboard-guide.md                            |   2 +
 docs/settings-reference.md                         |   4 +
 .../src/commands/__tests__/provider-auth.test.ts   |  51 ++++---
 packages/cli/src/commands/provider-auth.ts         |  10 +-
 packages/dashboard/app/api/legacy.ts               |   2 +
 .../app/components/ModelOnboardingModal.tsx        | 121 +++++++++++++++-
 .../__tests__/AuthenticationSection.test.tsx       | 141 +++++++++++++++++++
 .../__tests__/SettingsModal.models-auth.test.tsx   |  51 +++++++
 .../__tests__/SettingsModal.test-harness.tsx       |   2 +
 .../components/__tests__/onboarding-flow.test.tsx  |  28 ++++
 .../components/__tests__/settings-mobile.test.tsx  |  16 ++-
 .../settings/sections/AuthenticationSection.tsx    | 153 ++++++++++-----------
 .../dashboard/src/__tests__/routes-auth.test.ts    |  70 ++++++++++
 .../dashboard/src/routes/register-auth-routes.ts   |  17 ++-
 15 files changed, 569 insertions(+), 106 deletions(-)

Fusion-Task-Id: FN-7206

Fusion-Task-Lineage: 3559b7ea-47c6-4f8c-9aa1-5318f47ce07e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 17:03:11 -07:00
gsxdsm
9050ee1a42 FN-7185: add PR feedback addressing action
Add a dashboard action that starts an AI pass for actionable pull-request review feedback.

- Add a lifecycle route that validates linked PR tasks, seeds a ce-resolve-pr-feedback steering prompt, returns in-review tasks to active work, and wakes assigned agents when needed.
- Add shared PR feedback gating plus task-card and Review tab buttons with loading states, toasts, styling, docs, and translations.
- Cover the route, API client, task card, and Review tab behavior with regression tests.

Files changed:
 .changeset/fn-7185-address-pr-feedback.md          |   7 +
 docs/dashboard-guide.md                            |   1 +
 packages/dashboard/app/__tests__/api-tasks.test.ts |  12 ++
 packages/dashboard/app/api/legacy.ts               |  11 ++
 packages/dashboard/app/components/TaskCard.css     |   7 +-
 packages/dashboard/app/components/TaskCard.tsx     |  44 +++++-
 .../dashboard/app/components/TaskReviewTab.tsx     |  41 ++++-
 .../app/components/__tests__/TaskCard.test.tsx     | 164 +++++++++++++++++++-
 .../components/__tests__/TaskReviewTab.test.tsx    | 127 ++++++++++++++++
 packages/dashboard/app/utils/prFeedback.ts         |  22 +++
 .../dashboard/src/__tests__/routes-tasks.test.ts   | 165 +++++++++++++++++++++
 .../src/routes/register-task-workflow-routes.ts    |  67 +++++++++
 packages/i18n/locales/en/app.json                  |  10 ++
 packages/i18n/locales/es/app.json                  |  22 ++-
 packages/i18n/locales/fr/app.json                  |  22 ++-
 packages/i18n/locales/ko/app.json                  |  22 ++-
 packages/i18n/locales/zh-CN/app.json               |  22 ++-
 packages/i18n/locales/zh-TW/app.json               |  22 ++-
 18 files changed, 764 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-7185

Fusion-Task-Lineage: b2e98163-4fc6-45c9-8ace-a14eeb096e10

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 02:04:31 -07:00
gsxdsm
0956214009 FN-7184: render pull request review context
Render pull-request review details in the task Review tab so PR-backed tasks show actionable context.\n\n- Preserve PR review metadata when mapping legacy review API data.\n- Show PR reviewers, checks, blocking reasons, comment state, author, path, and GitHub links.\n- Add responsive Review-tab styles and coverage for empty, partial, and populated PR review states.\n\nFiles changed:\n packages/dashboard/app/api/legacy.ts               |  51 ++++++--\n .../dashboard/app/components/TaskReviewTab.css     | 101 +++++++++++++++\n .../dashboard/app/components/TaskReviewTab.tsx     |  94 +++++++++++++-\n .../components/__tests__/TaskReviewTab.test.tsx    | 143 ++++++++++++++++++++-\n 4 files changed, 368 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-7184

Fusion-Task-Lineage: 59680355-1afa-44e1-b5e1-33e26335a2c8

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-28 00:02:24 -07:00
gsxdsm
59803c243d FN-7123: use workflow settings for task models
Task model displays now resolve task-scoped workflow settings consistently with execution.

- Add a shared workflow settings overlay helper for stored workflow values and declaration defaults.
- Expose task effective settings through the dashboard API and consume them in TaskDetail model surfaces.
- Cover core overlay behavior, route output, and Workflow tab model rendering with regression tests.
- Document workflow model lane precedence and add a published package changeset.

Files changed:
 .changeset/fn-7123-workflow-tab-project-model.md   |   7 ++
 docs/settings-reference.md                         |  14 ++-
 .../__tests__/effective-settings-overlay.test.ts   |  70 ++++++++++++++
 packages/core/src/effective-settings-overlay.ts    |  27 ++++++
 packages/core/src/index.ts                         |   4 +
 packages/dashboard/app/api/legacy.ts               |   5 +
 .../dashboard/app/components/TaskDetailModal.tsx   |  13 ++-
 ...skDetailModal.models-progress-workflow.test.tsx |  46 +++++++++
 .../__tests__/TaskDetailModal.test-helpers.ts      |   1 +
 .../__tests__/WorkflowResultsTab.test.tsx          |  33 +++++++
 packages/dashboard/app/test/mockApi.ts             |   9 ++
 .../task-effective-settings-route.test.ts          | 107 +++++++++++++++++++++
 .../src/routes/register-task-workflow-routes.ts    |  21 ++++
 packages/engine/src/effective-settings.ts          |  25 ++---
 14 files changed, 355 insertions(+), 27 deletions(-)

Fusion-Task-Id: FN-7123

Fusion-Task-Lineage: 5fa9d338-c886-44aa-bdba-0d361b3602d5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-06-27 12:20:42 -07:00
gsxdsm
7137e36ccb FN-7073: serve file previews inline
File viewer previews now request inline-safe responses while downloads remain attachments.

- Add an inline preview query option to file download URL helpers and preview consumers.
- Serve known media and PDF preview extensions with real MIME types, inline disposition, nosniff, and sandbox CSP headers.
- Keep explicit downloads and unknown file types on attachment/octet-stream behavior.
- Cover preview and download header behavior with dashboard route and component tests.

Files changed:
 .changeset/fn-7073-file-viewer-inline-preview.md   |   7 +
 docs/dashboard-guide.md                            |   2 +-
 packages/dashboard/app/api/legacy.ts               |   9 +-
 .../dashboard/app/components/DockFilesView.tsx     |   2 +-
 .../dashboard/app/components/FileBrowserModal.tsx  |   2 +-
 .../components/__tests__/DockFilesView.test.tsx    |  14 +-
 .../components/__tests__/FileBrowserModal.test.tsx |  12 +-
 .../register-file-workspace-routes.test.ts         | 141 +++++++++++++++++++++
 .../src/routes/register-file-workspace-routes.ts   | 111 +++++++++++-----
 9 files changed, 260 insertions(+), 40 deletions(-)

Fusion-Task-Id: FN-7073
Fusion-Task-Lineage: 922b4aa4-ac6d-4a59-b94f-bab4eeb65530
2026-06-26 14:33:58 -07:00
gsxdsm
3ee47dec86 merge: integrate origin/main into feature/workflow-steps (FN-7039)
Resolve conflicts from 56 upstream commits:
- db.ts: renumber my migrations around main's new migration 130 (columnDwellMs) —
  enable-id normalization 130→131, drop-table 131→132, SCHEMA_VERSION→132.
- index.ts / routes.ts: take main's new MCP exports/imports; keep WORKFLOW_STEP_TEMPLATES
  array removed (kept the WorkflowStepTemplate type).
- merger.ts: keep the legacy post-merge execution path removed (U7c) over main's version.
- ci-workflow.test.ts (from main): add port-4040/process-supervisor allowlist markers to
  the gate-script assertions that reference the checker filenames (pre-existing self-match).

Gate green (engine-core 299, ci-shape 62); boot smoke PASS; migration tests + typecheck clean.
2026-06-26 08:50:22 -07:00
gsxdsm
8131d541ca FN-7038: add live automation run output
Add configurable automation tool access with live manual-run streaming for schedules and routines.

- Add an automation tool allowlist model and dashboard selectors for AI prompt steps.
- Stream manual automation and routine run progress, output, step updates, and tool events over SSE.
- Surface live run transcripts in automation/routine cards and document the operator workflow.
- Cover validation, runner callbacks, API streaming, and UI behavior with targeted tests.

Files changed:
 .changeset/fn-7038-automation-tools-live-output.md |   7 +
 docs/dashboard-guide.md                            |   9 +
 packages/core/src/__tests__/automation.test.ts     |  27 +-
 packages/core/src/automation.ts                    |  18 +
 packages/core/src/index.ts                         |   4 +-
 packages/core/src/types.ts                         |   6 +
 packages/dashboard/app/api/legacy.ts               |  48 +++
 packages/dashboard/app/components/RoutineCard.tsx  |  16 +-
 packages/dashboard/app/components/ScheduleForm.tsx |  53 ++-
 .../app/components/ScheduleStepsEditor.tsx         |  49 ++-
 .../app/components/ScheduledTasksModal.tsx         |  72 +++-
 packages/dashboard/app/components/ScriptsModal.css |  79 ++++
 .../app/components/__tests__/RoutineCard.test.tsx  |  45 +++
 .../app/components/__tests__/ScheduleForm.test.tsx | 100 +++++-
 .../__tests__/ScheduleStepsEditor.test.tsx         |  67 +++-
 .../__tests__/ScheduledTasksModal.test.tsx         |  36 +-
 .../src/__tests__/routes-automation.test.ts        | 151 +++++++-
 packages/dashboard/src/routes.ts                   | 400 ++++++++++++++++++++-
 packages/dashboard/src/server.ts                   |   7 +-
 packages/engine/src/__tests__/cron-runner.test.ts  |  56 ++-
 .../src/__tests__/pi-create-fn-agent.test.ts       |  44 +++
 .../engine/src/__tests__/routine-runner.test.ts    |  28 ++
 packages/engine/src/cron-runner.ts                 |  20 +-
 packages/engine/src/pi.ts                          |  32 +-
 packages/engine/src/routine-runner.ts              |  39 +-
 packages/i18n/locales/en/app.json                  |   9 +
 packages/i18n/src/resources.d.ts                   |  21 ++
 27 files changed, 1374 insertions(+), 69 deletions(-)

Fusion-Task-Id: FN-7038

Fusion-Task-Lineage: 7f5871d0-1de0-4d22-a9c9-ee9418658677
2026-06-26 02:45:29 -07:00
gsxdsm
347842faca refactor(FN-7039): drop the legacy workflow_steps table; remove all table readers
Final cutover — nothing reads workflow_steps at runtime, so migration 131 drops it.

- Removed the merger post-merge execution path entirely (runPostMergeWorkflowSteps,
  hasEnabledPostMergeWorkflowSteps, executePostMerge{Prompt,Script}Step, post-merge
  worktree helpers + call site). Graph owns post-merge.
- Executor recovery no longer reads getWorkflowStep().gateMode; gate-ness comes from the
  recorded WorkflowStepResult.status.
- Removed store CRUD (create/update/deleteWorkflowStep), materializeWorkflowSteps, and
  migrateLegacyWorkflowSteps; selectTaskWorkflow now seeds default-on optional-group node
  ids (consistent with create-time). KEPT the plugin step-template palette (getWorkflowStep
  plugin-only resolver / listWorkflowSteps plugin-only) — never touches the table.
  Removed the dashboard migrate-legacy-steps route + editor migration UI.
- SCHEMA_VERSION 130→131; migration 131 DROP TABLE IF EXISTS workflow_steps; SCHEMA_SQL
  table def removed; historical migrations 77/105/109/130 guarded with tableExists().

Proof nothing stranded: the graph executes IR nodes resolved from workflowId (never
stepIds/compiled rows) — materializeWorkflowSteps writes were vestigial. Full @fusion/core
suite (6290), reliability backstop (154), boot smoke, and a seed-at-130 drop test all pass
with the table gone.

Plan U7c.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 02:29:32 -07:00
gsxdsm
a7eb3c4dd8 refactor(FN-7039): delete WORKFLOW_STEP_TEMPLATES + legacy workflow-step management surface
U6: delete the built-in WORKFLOW_STEP_TEMPLATES catalog + its materializer
(getBuiltInWorkflowTemplate/ensureWorkflowStepForTemplate/toBuiltInWorkflowStep);
inline the browser-verification + code-review name/prompt/toolMode/gateMode into
their optional-group IR builders (node bytes unchanged); simplify
resolveEnabledWorkflowSteps to an identity-stable pass-through (no materialization,
so the optionalGroupIdSet collision guard is no longer needed). Plugin-contributed
step templates are kept as the editor palette.

U5: remove the legacy /api/workflow-steps REST surface (GET/POST/PATCH/DELETE +
/refine + /workflow-step-templates/:id/create), the dead client fns, and the
Settings management UI; GET /api/workflow-step-templates now serves plugin
templates only. The create-time optional-step toggles remain.

Scope: the workflow_steps store CRUD + table are intentionally KEPT — still consumed
by the engine (merger/recovery) and needed by U7's migration; their removal + the
table drop land in U7.

Plan U5 + U6.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 00:06:31 -07:00
gsxdsm
a0954c7f27 FN-6975: make mission planning modal movable and resilient
Make the AI mission planning workspace movable on desktop and safer when streams fail.

- Host the Plan Mission with AI modal in FloatingWindow with desktop drag/resize geometry and mobile full-screen preservation.
- Normalize terminal mission interview stream failures, close SSE/keepalive once, and suppress duplicate late terminal events.
- Cover modal geometry and stream-error behavior with dashboard tests and document the operator-facing behavior.

Files changed:
 .changeset/fn-6975-mission-modal-stream.md         |   7 ++
 docs/dashboard-guide.md                            |   7 ++
 .../api/__tests__/mission-interview-stream.test.ts |  98 ++++++++++++++++++
 packages/dashboard/app/api/legacy.ts               |  66 ++++++++++---
 .../app/components/MissionInterviewModal.css       |  51 ++++++++++
 .../app/components/MissionInterviewModal.tsx       |  37 ++++---
 .../__tests__/MissionInterviewModal.test.tsx       | 110 ++++++++++++++++++++-
 7 files changed, 344 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-6975

Fusion-Task-Lineage: b2ffa558-8b7e-4a46-8882-f2c4f6189831
2026-06-25 16:31:10 -07:00
gsxdsm
e46ea00ff5 FN-6827: add engine status banner
Add project-scoped engine connectivity remediation to the dashboard.

- Add engine status/start API helpers and server routes that can resume paused projects or start missing engines.
- Render a project banner with dashboard-only guidance, polling, disabled starting state, localized copy, and focused tests.
- Document the engine status banner behavior and add a changeset for the published CLI package.

Files changed:
 .changeset/fn-6827-engine-disconnected-banner.md   |   7 +
 docs/dashboard-guide.md                            |   8 +
 packages/dashboard/app/api/legacy.ts               |  20 +++
 .../app/components/EngineStatusBanner.css          |  87 +++++++++++
 .../app/components/EngineStatusBanner.tsx          |  62 ++++++++
 .../__tests__/EngineStatusBanner.test.tsx          | 145 +++++++++++++++++
 .../app/components/dashboard/DashboardBanners.tsx  |   3 +
 .../app/hooks/__tests__/useEngineStatus.test.ts    | 171 +++++++++++++++++++++
 packages/dashboard/app/hooks/useEngineStatus.ts    | 111 +++++++++++++
 packages/dashboard/src/__tests__/server.test.ts    | 129 ++++++++++++++++
 packages/dashboard/src/server.ts                   |  89 +++++++++++
 packages/i18n/locales/en/app.json                  |  10 ++
 packages/i18n/locales/es/app.json                  |  10 ++
 packages/i18n/locales/fr/app.json                  |  10 ++
 packages/i18n/locales/ko/app.json                  |  10 ++
 packages/i18n/locales/zh-CN/app.json               |  10 ++
 packages/i18n/locales/zh-TW/app.json               |  10 ++
 17 files changed, 892 insertions(+)

Fusion-Task-Id: FN-6827

Fusion-Task-Lineage: 56821ca3-04c8-4674-9400-3639f10e463d
2026-06-25 08:35:44 -07:00
gsxdsm
6df4043059 FN-6942: preserve mission workflow selection
Missions now carries the selected header workflow through feature and slice triage so created tasks land in the intended lane.

- Add a reusable header workflow switcher slot and share it between Planning and Missions.
- Thread the selected workflow through mission triage UI, API client calls, routes, and MissionStore task creation.
- Cover mission workflow triage behavior with core, dashboard UI, and route tests.
- Document Missions workflow behavior and add a patch changeset.

Files changed:
 .changeset/fn-6942-mission-workflow-selection.md   |   7 +
 docs/dashboard-guide.md                            |  11 ++
 packages/core/src/__tests__/mission-store.test.ts  | 114 ++++++++++++
 packages/core/src/mission-store.ts                 |   8 +
 packages/dashboard/app/api/legacy.ts               |  10 +-
 .../app/components/HeaderWorkflowSwitcherSlot.tsx  |  99 +++++++++++
 .../dashboard/app/components/MissionManager.tsx    |  23 ++-
 .../components/PlanningWorkflowSwitcherSlot.tsx    |  81 +--------
 .../__tests__/HeaderWorkflowSwitcherSlot.test.tsx  | 124 +++++++++++++
 .../MissionManager.workflow-triage.test.tsx        | 191 +++++++++++++++++++++
 .../app/components/dashboard/MainContent.tsx       |  15 +-
 packages/dashboard/src/mission-routes.ts           |  21 ++-
 .../mission-workflow-triage-route.test.ts          | 149 ++++++++++++++++
 13 files changed, 765 insertions(+), 88 deletions(-)

Fusion-Task-Id: FN-6942

Fusion-Task-Lineage: 53d7b2ea-01cc-4eb6-bdda-988fb684602c
2026-06-25 08:35:44 -07:00
Phil Larson
8cc5fd895e feat(FN-783): add supported overlap blocker repair API 2026-06-25 03:44:23 -07:00
gsxdsm
28ceca2cbd Address PR review feedback (#1747)
- core/store: include workspaceWorktrees in the slim and activity-log-limited
  SELECT lists (rowToTask reads it, but the explicit column lists omitted it, so
  slim/limited reads dropped the field and could misclassify workspace tasks);
  add regression tests for both read surfaces
- dashboard/register-git-github: validate caller-supplied repoPath in resolveGitDir
  via isPathWithin containment check (path-traversal hardening for all git
  endpoints); make loadWorkspaceConfig a static @fusion/core import per AGENTS.md
- dashboard/legacy: preserve repoPath in the string-form pullBranch overload
- dashboard/GitManagerModal: revalidate selectedRepo against the fetched repo list
  so a stale selection can't persist across project switches

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 15:43:12 -07:00
gsxdsm
be2866ee66 feat(git-manager): multi-repo workspace support with repo selector
- Add GET /api/git/workspace-repos endpoint returning sub-repo list
- Add resolveGitDir() helper: resolves repoPath query param to sub-repo dir
- Update all 34 git endpoints to use resolveGitDir for workspace targeting
- Add repoPath param to 30+ frontend git API functions
- GitManagerModal: auto-detect workspace repos on mount, show repo selector
  dropdown at top of sidebar, pass selected repo to all git API calls
- Auto-select first repo when workspace mode is detected
- Repo change triggers data refetch via gitRepoPath dependency
2026-06-24 15:02:12 -07:00
gsxdsm
9e7c85d221 feat(dashboard): workspace detection + task prefix in import wizard
- Add POST /api/projects/detect-workspace endpoint for sub-repo scanning
- Modify POST /api/projects to accept workspaceMode + taskPrefix params
- SetupWizardModal: auto-detect sub-repos when path is entered, show
  workspace mode checkbox with detected repo count, add task prefix field
  auto-derived from project name
- Wire workspaceMode and taskPrefix through registration API call
2026-06-24 14:08:32 -07:00
gsxdsm
90cba95bdd FN-6933: show stopped engine state in footer
Show the dashboard footer when the global AI engine stop control is active.

- Add a stopped executor state derived from globalPause and expose it through the legacy API types.
- Render Stopped with error-red styling and a stop-rectangle icon in the executor status bar.
- Cover stopped state derivation, footer rendering, API responses, and localized labels.

Files changed:
 .../dashboard/app/__tests__/api-projects.test.ts   |  3 ++-
 packages/dashboard/app/api/legacy.ts               | 14 +++++++----
 .../dashboard/app/components/ExecutorStatusBar.tsx | 11 ++++++---
 .../__tests__/ExecutorStatusBar.test.tsx           | 27 ++++++++++++++++++++++
 .../app/hooks/__tests__/useExecutorStats.test.ts   | 22 ++++++++++++++++--
 packages/dashboard/app/hooks/useExecutorStats.ts   | 10 +++++---
 packages/i18n/locales/en/app.json                  |  1 +
 packages/i18n/locales/es/app.json                  |  2 ++
 packages/i18n/locales/fr/app.json                  |  2 ++
 packages/i18n/locales/ko/app.json                  |  2 ++
 packages/i18n/locales/zh-CN/app.json               |  2 ++
 packages/i18n/locales/zh-TW/app.json               |  2 ++
 12 files changed, 85 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-6933

Fusion-Task-Lineage: 1f128b36-105a-4133-87ce-75bb8df8a42f
2026-06-23 00:45:00 -07:00
gsxdsm
a1cac3a6a3 fix(dashboard): replace quick chat with modal chat 2026-06-22 15:23:43 -07:00
gsxdsm
5697d2c98b feat(dashboard): Skills detail renders SKILL.md as markdown + compact file browser
SKILL.md now renders via MailboxMessageContent (markdown + sanitized HTML + mermaid) instead of raw <pre>. Files strip is compact and lists all files; clicking a file loads its content in the detail pane (markdown via MailboxMessageContent, other text via <pre>, binary/oversized notice) with a Back-to-SKILL.md affordance. New GET /api/skills/:id/file endpoint (readSkillFileContent: path-traversal-guarded, 2MB ceiling, binary detection) + fetchSkillFileContent client fn.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 11:49:52 -07:00