Commit Graph

3443 Commits

Author SHA1 Message Date
Fusion
9b53fa46e8 feat(FN-2975): merge fusion/fn-2975
- Stabilize QuickChatFAB search refresh lifecycle to prevent redundant or stale queries (`useTasks.ts`, `QuickChatFAB.tsx`)
- Add unit tests for QuickChatFAB component and `useTasks` hook
- Refactor QuickChatFAB styles and component structure

Commits merged:
- feat(FN-2975): complete Step 2 — stabilize search refresh lifecycle
- feat(FN-2972): merge fusion/fn-2972

Files changed:
packages/dashboard/app/components/QuickChatFAB.css | 60 ++++++++++++++++----
 packages/dashboard/app/components/QuickChatFAB.tsx | 65 +++++++++++-----------
 .../app/components/__tests__/QuickChatFAB.test.tsx | 32 +++++++++++
 .../dashboard/app/hooks/__tests__/useTasks.test.ts | 48 ++++++++++++++++
 packages/dashboard/app/hooks/useTasks.ts           |  4 +-
 5 files changed, 165 insertions(+), 44 deletions(-)

Fusion-Task-Id: FN-2975
2026-04-29 19:43:50 -07:00
Fusion
e5157a96f8 feat(FN-2972): merge fusion/fn-2972
- `FileBrowserModal`: adds full file browser to modal view with multi-select, row/grid/list view toggle, sorting, path breadcrumb navigation, and inline path editing; wires it into `TaskDetailModal` attachment panel
- `TaskDetailModal`: adds attachment management tab with drag-and-drop file picker backed by the new FileBrowserModal; includes responsive CSS reflow for attachment list
- `QuickChatFAB`: restyles the FAB toggle and collapse animation; adds compact header control variant with consistent icon/button sizing
- `TaskDetailModal.css`, `QuickChatFAB.css`, `FileBrowser.css`: sizing and alignment refinements across header controls and FAB transitions
- `task.ts`: adds `getFilesDiff()` helper exported for use by the dashboard attachment panel
- Tests added for `FileBrowserModal`, `QuickChatFAB`, and `TaskDetailModal` attachment flow; `task.test.ts` covers the new `getFilesDiff()` function
- Minor `docs/cli-reference.md` update

Commits merged:
- feat(FN-2972): complete Step 3 — align header control sizing
- fix(FN-2972): complete Step 2 — align header toggle control sizing
- test(FN-2972): complete Step 3 — cover compact header controls
- feat(FN-2972): complete Step 2 — compact quick chat header controls
- feat(FN-2972): complete Step 1 — move mode toggle into header actions
- feat(FN-2973): merge fusion/fn-2973
- feat(FN-2924): merge fusion/fn-2924

Files changed:
docs/cli-reference.md                              |   3 +-
 packages/cli/src/commands/__tests__/task.test.ts   |  44 ++++-
 packages/cli/src/commands/task.ts                  |  55 ++++++
 packages/dashboard/app/components/FileBrowser.css  |  65 +++++--
 .../dashboard/app/components/FileBrowserModal.tsx  | 106 ++++++++++-
 packages/dashboard/app/components/QuickChatFAB.css |  60 +++++--
 packages/dashboard/app/components/QuickChatFAB.tsx |  65 +++----
 .../dashboard/app/components/TaskDetailModal.css   |  40 +++++
 .../dashboard/app/components/TaskDetailModal.tsx   |  82 ++++++++-
 .../components/__tests__/FileBrowserModal.test.tsx | 195 +++++++++++++++++++++
 .../app/components/__tests__/QuickChatFAB.test.tsx |  32 ++++
 .../components/__tests__/TaskDetailModal.test.tsx  |  81 ++++++++-
 12 files changed, 761 insertions(+), 67 deletions(-)

Fusion-Task-Id: FN-2972
2026-04-29 19:15:23 -07:00
Fusion
182f0a4db3 feat(FN-2973): merge fusion/fn-2973
- Add resizable split pane to desktop sidebar with drag handle and resize state management
- Style the desktop sidebar resize handle using CSS design tokens
- Add keyboard resize support to both desktop sidebar and file browser modal (arrow keys, Page Up/Down)
- Tokenize FileBrowser styles following the dashboard CSS architecture; replace hardcoded values with CSS variables
- Add accessibility handling for resize handles including focus states and keyboard interactions
- Add FileBrowserModal tests covering keyboard resize behavior and accessibility patterns

Commits merged:
- test(FN-2973): complete Step 3 — cover keyboard resize and handle accessibility
- feat(FN-2973): complete Step 2 — tokenized file browser styles and handle focus state
- feat(FN-2973): complete Step 1 — add keyboard resize support
- test(FN-2973): complete Step 3 — add resizable split coverage
- feat(FN-2973): complete Step 2 — style desktop sidebar resize handle
- feat(FN-2973): complete Step 1 — add desktop sidebar resize state and handle

Files changed:
packages/dashboard/app/components/FileBrowser.css  |  65 +++++--
 .../dashboard/app/components/FileBrowserModal.tsx  | 106 ++++++++++-
 .../components/__tests__/FileBrowserModal.test.tsx | 195 +++++++++++++++++++++
 3 files changed, 352 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-2973
2026-04-29 19:09:55 -07:00
Fusion
2fb18eac1f feat(FN-2924): merge fusion/fn-2924
- Add task provenance display to TaskDetailModal, surfacing AI-generated merge commit summaries so users understand when and why tasks landed
- New `ai-summarize` module in core with structured commit summarization logic and tests
- Extend CLI `fn task show` with provenance output
- Refactor merger to produce cleaner merge commit messages with task context
- Update SettingsModal to expose AI summarization toggle (hidden behind feature flag)
- Adjust QuickChatFAB styling for theme compatibility
- Update scheduler and node-routing policy tests to match new behavior
- Add changeset for `@runfusion/fusion` minor release

Commits merged:
- feat(FN-2924): display task provenance in dashboard and cli
- feat(FN-2971): merge fusion/fn-2971
- feat(FN-2947): merge fusion/fn-2947
- feat(FN-2970): merge fusion/fn-2970
- feat(FN-2956): merge fusion/fn-2956

Files changed:
.changeset/add-ai-merge-commit-summary.md          |   5 +
 docs/cli-reference.md                              |   3 +-
 docs/settings-reference.md                         |   3 +
 packages/cli/src/commands/__tests__/task.test.ts   |  44 ++++-
 packages/cli/src/commands/task.ts                  |  55 +++++++
 packages/core/src/__tests__/ai-summarize.test.ts   |  64 ++++++++
 packages/core/src/ai-summarize.ts                  | 114 +++++++++++++
 packages/core/src/index.ts                         |   3 +
 packages/core/src/settings-schema.ts               |   1 +
 packages/core/src/types.ts                         |   4 +
 packages/dashboard/app/components/QuickChatFAB.css |  17 +-
 packages/dashboard/app/components/QuickChatFAB.tsx |   2 +-
 .../dashboard/app/components/SettingsModal.css     |  11 +-
 .../dashboard/app/components/SettingsModal.tsx     |  22 ++-
 .../dashboard/app/components/TaskDetailModal.css   |  40 +++++
 .../dashboard/app/components/TaskDetailModal.tsx   |  82 +++++++++-
 .../__tests__/SettingsModalNodeRouting.test.tsx    |  12 +-
 .../components/__tests__/TaskDetailModal.test.tsx  |  81 ++++++++-
 packages/engine/src/__tests__/merger.test.ts       |  75 +++++++++
 .../src/__tests__/node-routing-policy.test.ts      |  25 ++-
 .../src/__tests__/scheduler-node-routing.test.ts   |  18 +-
 packages/engine/src/merger.ts                      | 181 +++++++++------------
 packages/engine/src/scheduler.ts                   |   8 +-
 23 files changed, 723 insertions(+), 147 deletions(-)

Fusion-Task-Id: FN-2924
2026-04-29 18:01:59 -07:00
Fusion
ab80d5f022 feat(FN-2971): merge fusion/fn-2971
- Add AI-generated merge commit summaries to the CLI via a new `ai-summarize.ts` module with configurable summarization settings
- Add node routing policy routes for task workflow automation and planning subtasks in the dashboard API
- Add SettingsModal improvements: tab-based navigation, node routing policy settings, and a new AI summarization section
- Update SettingsModal CSS with scoped styles and update QuickChatFAB and ModelOnboardingModal CSS
- Add `AgentHeartbeatMonitor` budget override and improve agent heartbeat handling; update scheduler with new node routing checks
- Improve merger logic with new merge policy helpers, PR comment handlers, and routine runner integration
- Add extensive test coverage across engine (agent-tools, scheduler-node-routing, node-routing-policy, merger, cron-runner), core (ai-summarize), and dashboard (routes, api)
- Minor improvements to agent delegation tools, triage, executor, project-engine, and various dashboard components (TodoView, useTaskHandlers, onboarding-flow)

Commits merged:
- fix(FN-2971): complete Step 1 — scope attach button sizing
- feat(FN-2947): merge fusion/fn-2947
- feat(FN-2970): merge fusion/fn-2970
- feat(FN-2956): merge fusion/fn-2956
- feat(FN-2923): merge fusion/fn-2923
- feat(FN-2945): merge fusion/fn-2945

Files changed:
.changeset/add-ai-merge-commit-summary.md          |   5 +
 docs/settings-reference.md                         |   3 +
 packages/cli/src/__tests__/task-plan.test.ts       |   1 +
 packages/cli/src/commands/__tests__/task.test.ts   |  15 +-
 packages/cli/src/commands/task.ts                  |  15 +-
 packages/cli/src/extension.ts                      |   9 +
 packages/core/src/__tests__/ai-summarize.test.ts   |  64 ++++++++
 packages/core/src/ai-summarize.ts                  | 114 +++++++++++++
 packages/core/src/index.ts                         |   3 +
 packages/core/src/settings-schema.ts               |   1 +
 packages/core/src/types.ts                         |   4 +
 .../app/__tests__/agent-css-classes.test.ts        |   3 +-
 packages/dashboard/app/__tests__/api.test.ts       |  13 ++
 packages/dashboard/app/api/legacy.ts               |   2 +
 packages/dashboard/app/components/AgentsView.css   |  22 +--
 .../app/components/ModelOnboardingModal.tsx        |   5 +-
 packages/dashboard/app/components/QuickChatFAB.css |  17 +-
 packages/dashboard/app/components/QuickChatFAB.tsx |   2 +-
 .../dashboard/app/components/SettingsModal.css     |  11 +-
 .../dashboard/app/components/SettingsModal.tsx     |  22 ++-
 packages/dashboard/app/components/TodoView.tsx     |   2 +
 .../__tests__/ModelOnboardingModal.test.tsx        |   4 +-
 .../app/components/__tests__/QuickChatFAB.test.tsx |  14 +-
 .../__tests__/SettingsModalNodeRouting.test.tsx    |  12 +-
 .../app/components/__tests__/TodoView.test.tsx     |   4 +-
 .../__tests__/agents-view-mobile.test.tsx          |   5 +-
 .../components/__tests__/onboarding-flow.test.tsx  |   2 +-
 .../app/hooks/__tests__/useTaskHandlers.test.ts    |   4 +-
 packages/dashboard/app/hooks/useTaskHandlers.ts    |   4 +-
 packages/dashboard/src/__tests__/routes.test.ts    |  14 ++
 packages/dashboard/src/routes.ts                   |   4 +
 .../dashboard/src/routes/register-git-github.ts    |  12 ++
 .../src/routes/register-planning-subtask-routes.ts |   3 +
 .../src/routes/register-task-workflow-routes.ts    |   7 +
 .../engine/src/__tests__/agent-heartbeat.test.ts   |  10 ++
 .../src/__tests__/agent-tools-delegation.test.ts   |   2 +
 packages/engine/src/__tests__/agent-tools.test.ts  |  37 +++++
 packages/engine/src/__tests__/cron-runner.test.ts  |   4 +
 packages/engine/src/__tests__/merger.test.ts       |  75 +++++++++
 .../src/__tests__/node-routing-policy.test.ts      |  25 ++-
 .../src/__tests__/pr-comment-handler.test.ts       |   8 +
 .../src/__tests__/scheduler-node-routing.test.ts   |  18 +-
 packages/engine/src/__tests__/triage.test.ts       |   2 +
 packages/engine/src/agent-heartbeat.ts             |  13 +-
 packages/engine/src/agent-tools.ts                 |  13 +-
 packages/engine/src/cron-runner.ts                 |   7 +-
 packages/engine/src/executor.ts                    |   2 +-
 packages/engine/src/merger.ts                      | 181 +++++++++------------
 packages/engine/src/mission-execution-loop.ts      |   8 +
 packages/engine/src/pr-comment-handler.ts          |   5 +
 packages/engine/src/project-engine.ts              |   8 +
 packages/engine/src/routine-runner.ts              |   4 +
 packages/engine/src/scheduler.ts                   |   8 +-
 packages/engine/src/triage.ts                      |   4 +
 54 files changed, 673 insertions(+), 183 deletions(-)

Fusion-Task-Id: FN-2971
2026-04-29 17:49:08 -07:00
Fusion
5c82c3f34a feat(FN-2947): merge fusion/fn-2947
- Add AI-powered merge commit summarization with toggle in Settings (`packages/core/src/ai-summarize.ts`, `packages/dashboard/app/components/SettingsModal.tsx`, `packages/engine/src/merger.ts`)
- Introduce `generateMergeCommitSummary` utility in `@fusion/core` that calls the configured model with a diff prompt; results appear in the commit log for merge commits
- Add `aiMergeSummaryEnabled` project setting and `useAiMergeSummaryEnabled` hook in dashboard
- Update `@runfusion/fusion` CLI extension to surface the new setting
- Add `POST /api/tasks/:id/workflow/pre-merge` and `POST /api/tasks/:id/planning-subtask` routes (`packages/dashboard/src/routes/`)
- Rework InsightsView with two-pane layout for better readability (`packages/dashboard/app/components/InsightsView.tsx`, `packages/dashboard/app/components/InsightsView.css`)
- Fix `task plan` command to surface errors when planning fails (`packages/cli/src/commands/task.ts`)
- Add tests for `ai-summarize`, `agent-heartbeat`, `agent-tools`, and dashboard API routes; refresh onboarding and agents-view mobile tests
- Minor CSS polish: reduce AgentsView panel hover gap, improve CommitDiffTab layout, add ScriptsModal styles
- Changelog and version bumps for `@runfusion/fusion` v0.9.1, CLI alias, and all workspace packages

Commits merged:
- feat(FN-2947): complete Step 7 — add changeset and docs deliverables
- fix(FN-2947): clean unused aiSummary path
- test(FN-2947): complete Step 5 — cover AI merge summary flow
- feat(FN-2947): complete Step 4 — add merge summary settings toggle
- feat(FN-2947): complete Step 3 — wire AI merge summaries into merger
- feat(FN-2947): complete Step 2 — add merge summary setting
- feat(FN-2947): complete Step 1 — add merge commit summarizer
- feat(FN-2970): merge fusion/fn-2970
- feat(FN-2956): merge fusion/fn-2956
- feat(FN-2923): merge fusion/fn-2923
- feat(FN-2945): merge fusion/fn-2945
- chore(release): v0.9.1
- fix(FN-XXX): improve git manager diff layout
- fix(dashboard): rework Insights view with two-pane layout
- fix(FN-XXX): keep experimental views off by default

Files changed:
.changeset/active-agents-no-stuck-connecting.md    |  13 --
 .changeset/active-agents-panel-hoist-heartbeat.md  |  13 --
 .changeset/add-ai-merge-commit-summary.md          |   5 +
 .changeset/fix-agent-heartbeat-terminal-links.md   |   5 -
 .changeset/show-planning-tasks-immediately.md      |   5 -
 CHANGELOG.md                                       |  92 ++++++++++
 docs/settings-reference.md                         |   3 +
 package.json                                       |   2 +-
 packages/cli-alias/CHANGELOG.md                    |  15 ++
 packages/cli-alias/package.json                    |   2 +-
 packages/cli/CHANGELOG.md                          |  12 ++
 packages/cli/package.json                          |   2 +-
 packages/cli/src/__tests__/task-plan.test.ts       |   1 +
 packages/cli/src/commands/__tests__/task.test.ts   |  15 +-
 packages/cli/src/commands/task.ts                  |  15 +-
 packages/cli/src/extension.ts                      |   9 +
 packages/core/CHANGELOG.md                         |   7 +
 packages/core/package.json                         |   2 +-
 packages/core/src/__tests__/ai-summarize.test.ts   |  64 +++++++
 packages/core/src/ai-summarize.ts                  | 114 ++++++++++++
 packages/core/src/index.ts                         |   3 +
 packages/core/src/settings-schema.ts               |   1 +
 packages/core/src/types.ts                         |   4 +
 packages/dashboard/CHANGELOG.md                    |  14 ++
 packages/dashboard/app/App.tsx                     |  28 ++-
 .../app/__tests__/agent-css-classes.test.ts        |   3 +-
 packages/dashboard/app/__tests__/api.test.ts       |  13 ++
 packages/dashboard/app/api/legacy.ts               |   2 +
 packages/dashboard/app/components/AgentsView.css   |  22 +--
 .../dashboard/app/components/CommitDiffTab.tsx     |   2 +-
 .../dashboard/app/components/GitManagerModal.tsx   |  71 ++++----
 packages/dashboard/app/components/InsightsView.css | 200 ++++++++++++++++++---
 packages/dashboard/app/components/InsightsView.tsx | 111 ++++++++----
 .../app/components/ModelOnboardingModal.tsx        |   5 +-
 packages/dashboard/app/components/ScriptsModal.css |  89 +++++++++
 .../dashboard/app/components/SettingsModal.css     |  11 +-
 .../dashboard/app/components/SettingsModal.tsx     |  22 ++-
 .../dashboard/app/components/TaskDetailModal.css   |   5 +
 packages/dashboard/app/components/TodoView.tsx     |   2 +
 .../app/components/__tests__/App.test.tsx          |  33 ++++
 .../app/components/__tests__/InsightsView.test.tsx |  25 ++-
 .../__tests__/ModelOnboardingModal.test.tsx        |   4 +-
 .../app/components/__tests__/QuickChatFAB.test.tsx |  14 +-
 .../__tests__/SettingsModalNodeRouting.test.tsx    |  12 +-
 .../app/components/__tests__/TodoView.test.tsx     |   4 +-
 .../__tests__/agents-view-mobile.test.tsx          |   5 +-
 .../components/__tests__/onboarding-flow.test.tsx  |   2 +-
 .../app/hooks/__tests__/useAppSettings.test.ts     |   1 +
 .../app/hooks/__tests__/useTaskHandlers.test.ts    |   4 +-
 packages/dashboard/app/hooks/useAppSettings.ts     |  12 ++
 packages/dashboard/app/hooks/useTaskHandlers.ts    |   4 +-
 packages/dashboard/package.json                    |   2 +-
 packages/dashboard/src/__tests__/routes.test.ts    |  14 ++
 packages/dashboard/src/routes.ts                   |   4 +
 .../dashboard/src/routes/register-git-github.ts    |  12 ++
 .../src/routes/register-planning-subtask-routes.ts |   3 +
 .../src/routes/register-task-workflow-routes.ts    |   7 +
 packages/desktop/CHANGELOG.md                      |   7 +
 packages/desktop/package.json                      |   2 +-
 packages/engine/CHANGELOG.md                       |  11 ++
 packages/engine/package.json                       |   2 +-
 .../engine/src/__tests__/agent-heartbeat.test.ts   |  10 ++
 .../src/__tests__/agent-tools-delegation.test.ts   |   2 +
 packages/engine/src/__tests__/agent-tools.test.ts  |  37 ++++
 packages/engine/src/__tests__/cron-runner.test.ts  |   4 +
 packages/engine/src/__tests__/merger.test.ts       |  75 ++++++++
 .../src/__tests__/node-routing-policy.test.ts      |  25 ++-
 .../src/__tests__/pr-comment-handler.test.ts       |   8 +
 .../src/__tests__/scheduler-node-routing.test.ts   |  18 +-
 packages/engine/src/__tests__/triage.test.ts       |   2 +
 packages/engine/src/agent-heartbeat.ts             |  13 +-
 packages/engine/src/agent-tools.ts                 |  13 +-
 packages/engine/src/cron-runner.ts                 |   7 +-
 packages/engine/src/executor.ts                    |   2 +-
 packages/engine/src/merger.ts                      | 181 ++++++++-----------
 packages/engine/src/mission-execution-loop.ts      |   8 +
 packages/engine/src/pr-comment-handler.ts          |   5 +
 packages/engine/src/project-engine.ts              |   8 +
 packages/engine/src/routine-runner.ts              |   4 +
 packages/engine/src/scheduler.ts                   |   8 +-
 packages/engine/src/triage.ts                      |   4 +
 packages/mobile/CHANGELOG.md                       |   7 +
 packages/mobile/package.json                       |   2 +-
 packages/pi-claude-cli/CHANGELOG.md                |   7 +
 packages/pi-claude-cli/package.json                |   2 +-
 packages/plugin-sdk/CHANGELOG.md                   |  10 ++
 packages/plugin-sdk/package.json                   |   2 +-
 .../examples/fusion-plugin-auto-label/CHANGELOG.md |   8 +
 .../examples/fusion-plugin-auto-label/package.json |   2 +-
 .../examples/fusion-plugin-ci-status/CHANGELOG.md  |   8 +
 .../examples/fusion-plugin-ci-status/package.json  |   2 +-
 .../fusion-plugin-notification/CHANGELOG.md        |   8 +
 .../fusion-plugin-notification/package.json        |   2 +-
 .../fusion-plugin-settings-demo/CHANGELOG.md       |   8 +
 .../fusion-plugin-settings-demo/package.json       |   2 +-
 plugins/fusion-plugin-hermes-runtime/CHANGELOG.md  |   8 +
 plugins/fusion-plugin-hermes-runtime/package.json  |   2 +-
 .../fusion-plugin-openclaw-runtime/CHANGELOG.md    |   8 +
 .../fusion-plugin-openclaw-runtime/package.json    |   2 +-
 .../fusion-plugin-paperclip-runtime/CHANGELOG.md   |   8 +
 .../fusion-plugin-paperclip-runtime/package.json   |   2 +-
 101 files changed, 1388 insertions(+), 334 deletions(-)

Fusion-Task-Id: FN-2947
2026-04-29 17:38:25 -07:00
Fusion
883560776d feat(FN-2970): merge fusion/fn-2970
- CSS: fix margin on the node routing description in SettingsModal (`SettingsModal.css`)
- Dashboard: add CSS regression test for node routing description alignment (`SettingsModalNodeRouting.test.tsx`)
- Engine: update node routing policy and scheduler logic for improved routing behavior (`scheduler.ts`)
- Engine: update node routing policy tests and scheduler routing tests to cover new behavior

Commits merged:
- test(FN-2970): add CSS regression test for node routing description
- fix(FN-2970): fix settings node routing description margin
- feat(FN-2956): merge fusion/fn-2956

Files changed:
.../dashboard/app/components/SettingsModal.css     | 11 +++++++++-
 .../__tests__/SettingsModalNodeRouting.test.tsx    | 12 +++++++++--
 .../src/__tests__/node-routing-policy.test.ts      | 25 +++++++++++++++++++---
 .../src/__tests__/scheduler-node-routing.test.ts   | 18 ++++++++--------
 packages/engine/src/scheduler.ts                   |  8 ++++---
 5 files changed, 56 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-2970
2026-04-29 17:34:26 -07:00
Fusion
8a92042fc5 feat(FN-2956): merge fusion/fn-2956
- **FN-2956: Node routing policy guard** — `scheduler.ts` and `agent-heartbeat.ts` now enforce unavailable-node dispatch prevention; adds policy-matrix unit tests (`node-routing-policy.test.ts`) and integration tests (`scheduler-node-routing.test.ts`)
- **Agent delegation tools** — `agent-tools.ts` gains delegation functionality; `agent-heartbeat.ts` updated with monitoring hooks; 37 new lines of test coverage in `agent-tools.test.ts`
- **Dashboard route registration** — New routes added for git/github registration (`register-git-github.ts`), planning subtasks, and task workflows; test coverage in `routes.test.ts`
- **CLI task planning** — `task.ts` and `extension.ts` updated to support task planning flow; task-plan test extended
- **Engine integrations** — `cron-runner.ts`, `pr-comment-handler.ts`, `triage.ts`, `mission-execution-loop.ts`, `project-engine.ts`, and `routine-runner.ts` all updated with expanded tests and feature hooks
- **Dashboard UI/hooks** — `useTaskHandlers.ts` and related tests updated; `ModelOnboardingModal.tsx` and `TodoView.tsx` refined; CSS adjustments in `AgentsView.css`
- Includes merged work from `fusion/fn-2923` and `fusion/fn-2945`

Commits merged:
- test(FN-2956): complete Step 4 — align scheduler routing policy integration tests
- test(FN-2956): complete Step 3 — expand policy matrix unit coverage
- feat(FN-2956): complete Step 2 — enforce unavailable-node policy dispatch guard
- feat(FN-2923): merge fusion/fn-2923
- feat(FN-2945): merge fusion/fn-2945

Files changed:
packages/cli/src/__tests__/task-plan.test.ts       |  1 +
 packages/cli/src/commands/__tests__/task.test.ts   | 15 +++++++--
 packages/cli/src/commands/task.ts                  | 15 ++++++++-
 packages/cli/src/extension.ts                      |  9 ++++++
 .../app/__tests__/agent-css-classes.test.ts        |  3 +-
 packages/dashboard/app/__tests__/api.test.ts       | 13 ++++++++
 packages/dashboard/app/api/legacy.ts               |  2 ++
 packages/dashboard/app/components/AgentsView.css   | 22 ++++++-------
 .../app/components/ModelOnboardingModal.tsx        |  5 ++-
 packages/dashboard/app/components/TodoView.tsx     |  2 ++
 .../__tests__/ModelOnboardingModal.test.tsx        |  4 +--
 .../app/components/__tests__/QuickChatFAB.test.tsx | 14 ++------
 .../app/components/__tests__/TodoView.test.tsx     |  4 +--
 .../__tests__/agents-view-mobile.test.tsx          |  5 ++-
 .../components/__tests__/onboarding-flow.test.tsx  |  2 +-
 .../app/hooks/__tests__/useTaskHandlers.test.ts    |  4 +--
 packages/dashboard/app/hooks/useTaskHandlers.ts    |  4 +--
 packages/dashboard/src/__tests__/routes.test.ts    | 14 ++++++++
 packages/dashboard/src/routes.ts                   |  4 +++
 .../dashboard/src/routes/register-git-github.ts    | 12 +++++++
 .../src/routes/register-planning-subtask-routes.ts |  3 ++
 .../src/routes/register-task-workflow-routes.ts    |  7 ++++
 .../engine/src/__tests__/agent-heartbeat.test.ts   | 10 ++++++
 .../src/__tests__/agent-tools-delegation.test.ts   |  2 ++
 packages/engine/src/__tests__/agent-tools.test.ts  | 37 ++++++++++++++++++++++
 packages/engine/src/__tests__/cron-runner.test.ts  |  4 +++
 .../src/__tests__/node-routing-policy.test.ts      | 25 +++++++++++++--
 .../src/__tests__/pr-comment-handler.test.ts       |  8 +++++
 .../src/__tests__/scheduler-node-routing.test.ts   | 18 +++++------
 packages/engine/src/__tests__/triage.test.ts       |  2 ++
 packages/engine/src/agent-heartbeat.ts             | 13 ++++++--
 packages/engine/src/agent-tools.ts                 | 13 ++++++--
 packages/engine/src/cron-runner.ts                 |  7 +++-
 packages/engine/src/executor.ts                    |  2 +-
 packages/engine/src/mission-execution-loop.ts      |  8 +++++
 packages/engine/src/pr-comment-handler.ts          |  5 +++
 packages/engine/src/project-engine.ts              |  8 +++++
 packages/engine/src/routine-runner.ts              |  4 +++
 packages/engine/src/scheduler.ts                   |  8 +++--
 packages/engine/src/triage.ts                      |  4 +++
 40 files changed, 280 insertions(+), 62 deletions(-)

Fusion-Task-Id: FN-2956
2026-04-29 17:30:39 -07:00
Fusion
b0cda2398b feat(FN-2923): merge fusion/fn-2923
- Add task `source` provenance field tracking how tasks enter the system (e.g. `"manual"`, `"heartbeat"`, `"executor"`, `"triage"`, `"cron"`, `"routine"`)
- Wire `source` into shared create-task tools, executor agent, triage agent, cron runner, and routine runner
- Add `source` to heartbeat task creation in `agent-heartbeat.ts` and mission execution loop in `mission-execution-loop.ts`
- Wire `source` field into dashboard routes (`register-planning-subtask-routes.ts`, `register-task-workflow-routes.ts`) and GitHub integration (`register-git-github.ts`)
- Add `source` to the API layer and task store handlers in the dashboard
- Expose `source` in the `fn` CLI task command and `task-plan` extension tool
- Add integration tests for provenance across engine (agent-tools, agent-heartbeat, cron-runner, triage, pr-comment-handler) and dashboard routes
- Update existing tests to assert the correct source values
- Bulk-revert stale changeset files that were superseded by the v0.9.1 release commit

Commits merged:
- test(FN-2923): complete Step 14 — align tests with task source provenance
- test(FN-2923): complete Steps 12-13 — update and add provenance tests
- feat(FN-2923): complete Step 10 — wire CLI task provenance
- feat(FN-2923): complete Step 9 — wire dashboard UI and API source fields
- feat(FN-2923): complete Step 8 — wire dashboard route provenance
- feat(FN-2923): complete Step 7 — wire remaining engine provenance
- feat(FN-2923): complete Step 6 — add routine create-task provenance
- feat(FN-2923): complete Step 5 — add cron create-task provenance
- feat(FN-2923): complete Step 4 — add triage subtask source
- feat(FN-2923): complete Step 3 — add executor create-task source
- feat(FN-2923): complete Step 2 — add heartbeat task provenance
- feat(FN-2923): complete Step 1 — add provenance to shared create-task tools
- feat(FN-2945): merge fusion/fn-2945
- chore(release): v0.9.1

Files changed:
.changeset/active-agents-no-stuck-connecting.md    | 13 ---
 .changeset/active-agents-panel-hoist-heartbeat.md  | 13 ---
 .changeset/fix-agent-heartbeat-terminal-links.md   |  5 --
 .changeset/fix-experimental-defaults.md            |  5 --
 .changeset/improve-git-manager-diff-pane.md        |  5 --
 .changeset/insights-two-pane-layout.md             |  5 --
 .changeset/show-planning-tasks-immediately.md      |  5 --
 CHANGELOG.md                                       | 92 ++++++++++++++++++++++
 package.json                                       |  2 +-
 packages/cli-alias/CHANGELOG.md                    | 15 ++++
 packages/cli-alias/package.json                    |  2 +-
 packages/cli/CHANGELOG.md                          | 12 +++
 packages/cli/package.json                          |  2 +-
 packages/cli/src/__tests__/task-plan.test.ts       |  1 +
 packages/cli/src/commands/__tests__/task.test.ts   | 15 +++-
 packages/cli/src/commands/task.ts                  | 15 +++-
 packages/cli/src/extension.ts                      |  9 +++
 packages/core/CHANGELOG.md                         |  7 ++
 packages/core/package.json                         |  2 +-
 packages/dashboard/CHANGELOG.md                    | 14 ++++
 .../app/__tests__/agent-css-classes.test.ts        |  3 +-
 packages/dashboard/app/__tests__/api.test.ts       | 13 +++
 packages/dashboard/app/api/legacy.ts               |  2 +
 packages/dashboard/app/components/AgentsView.css   | 22 +++---
 .../app/components/ModelOnboardingModal.tsx        |  5 +-
 packages/dashboard/app/components/TodoView.tsx     |  2 +
 .../__tests__/ModelOnboardingModal.test.tsx        |  4 +-
 .../app/components/__tests__/QuickChatFAB.test.tsx | 14 +---
 .../app/components/__tests__/TodoView.test.tsx     |  4 +-
 .../__tests__/agents-view-mobile.test.tsx          |  5 +-
 .../components/__tests__/onboarding-flow.test.tsx  |  2 +-
 .../app/hooks/__tests__/useTaskHandlers.test.ts    |  4 +-
 packages/dashboard/app/hooks/useTaskHandlers.ts    |  4 +-
 packages/dashboard/package.json                    |  2 +-
 packages/dashboard/src/__tests__/routes.test.ts    | 14 ++++
 packages/dashboard/src/routes.ts                   |  4 +
 .../dashboard/src/routes/register-git-github.ts    | 12 +++
 .../src/routes/register-planning-subtask-routes.ts |  3 +
 .../src/routes/register-task-workflow-routes.ts    |  7 ++
 packages/desktop/CHANGELOG.md                      |  7 ++
 packages/desktop/package.json                      |  2 +-
 packages/engine/CHANGELOG.md                       | 11 +++
 packages/engine/package.json                       |  2 +-
 .../engine/src/__tests__/agent-heartbeat.test.ts   | 10 +++
 .../src/__tests__/agent-tools-delegation.test.ts   |  2 +
 packages/engine/src/__tests__/agent-tools.test.ts  | 37 +++++++++
 packages/engine/src/__tests__/cron-runner.test.ts  |  4 +
 .../src/__tests__/pr-comment-handler.test.ts       |  8 ++
 packages/engine/src/__tests__/triage.test.ts       |  2 +
 packages/engine/src/agent-heartbeat.ts             | 13 ++-
 packages/engine/src/agent-tools.ts                 | 13 ++-
 packages/engine/src/cron-runner.ts                 |  7 +-
 packages/engine/src/executor.ts                    |  2 +-
 packages/engine/src/mission-execution-loop.ts      |  8 ++
 packages/engine/src/pr-comment-handler.ts          |  5 ++
 packages/engine/src/project-engine.ts              |  8 ++
 packages/engine/src/routine-runner.ts              |  4 +
 packages/engine/src/triage.ts                      |  4 +
 packages/mobile/CHANGELOG.md                       |  7 ++
 packages/mobile/package.json                       |  2 +-
 packages/pi-claude-cli/CHANGELOG.md                |  7 ++
 packages/pi-claude-cli/package.json                |  2 +-
 packages/plugin-sdk/CHANGELOG.md                   | 10 +++
 packages/plugin-sdk/package.json                   |  2 +-
 .../examples/fusion-plugin-auto-label/CHANGELOG.md |  8 ++
 .../examples/fusion-plugin-auto-label/package.json |  2 +-
 .../examples/fusion-plugin-ci-status/CHANGELOG.md  |  8 ++
 .../examples/fusion-plugin-ci-status/package.json  |  2 +-
 .../fusion-plugin-notification/CHANGELOG.md        |  8 ++
 .../fusion-plugin-notification/package.json        |  2 +-
 .../fusion-plugin-settings-demo/CHANGELOG.md       |  8 ++
 .../fusion-plugin-settings-demo/package.json       |  2 +-
 plugins/fusion-plugin-hermes-runtime/CHANGELOG.md  |  8 ++
 plugins/fusion-plugin-hermes-runtime/package.json  |  2 +-
 .../fusion-plugin-openclaw-runtime/CHANGELOG.md    |  8 ++
 .../fusion-plugin-openclaw-runtime/package.json    |  2 +-
 .../fusion-plugin-paperclip-runtime/CHANGELOG.md   |  8 ++
 .../fusion-plugin-paperclip-runtime/package.json   |  2 +-
 78 files changed, 499 insertions(+), 115 deletions(-)

Fusion-Task-Id: FN-2923
2026-04-29 17:23:22 -07:00
Fusion
8a1dabb81e feat(FN-2945): merge fusion/fn-2945
- Fix org chart connector alignment in `AgentsView.css` — connectors now properly align with their target nodes
- Update `agent-css-classes.test.ts` and `agents-view-mobile.test.tsx` to reflect CSS class changes

Commits merged:
- fix(FN-2945): complete Step 2 — pass lint test typecheck build gates
- fix(FN-2945): complete Step 1 — align org chart connector geometry
- fix(FN-2945): complete Step 1 — align org chart connectors

Files changed:
.../app/__tests__/agent-css-classes.test.ts        |  3 ++-
 packages/dashboard/app/components/AgentsView.css   | 22 +++++++++++-----------
 .../__tests__/agents-view-mobile.test.tsx          |  5 ++---
 3 files changed, 15 insertions(+), 15 deletions(-)

Fusion-Task-Id: FN-2945
2026-04-29 16:55:20 -07:00
gsxdsm
93b639f6a5 chore(release): v0.9.1
Version bump via changesets.
2026-04-29 16:29:16 -07:00
gsxdsm
94edc2176c fix(FN-XXX): improve git manager diff layout 2026-04-29 16:26:53 -07:00
gsxdsm
64d0f258ae fix(dashboard): rework Insights view with two-pane layout
- Categories list in a left sidebar; insights for the selected category
  render in a scrollable right pane (mobile collapses sidebar to a
  horizontal chip rail and keeps the header on a single row).
- Removed -webkit-line-clamp on insight content so full text shows.
- Fixed scroll: added min-height: 0 to flex containers.
- Larger icons (20px) inside per-insight action buttons; close button
  switched off the invisible btn-icon styling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 16:25:30 -07:00
gsxdsm
4c5173410b fix(FN-XXX): keep experimental views off by default 2026-04-29 16:11:59 -07:00
gsxdsm
fb309e5eea fix(FN-XXX): show planning-created tasks without refresh 2026-04-29 15:25:06 -07:00
gsxdsm
2febbc9d3a fix(merger): build commit messages from actual content, not branch range
The merge commit message was built from `commitLog`/`diffStat` computed
against `merge-base(branch, main)`. Under squash-merge workflows, when an
earlier task is squash-merged onto main first, branches that forked off
the pre-squash main no longer share ancestry with it — `merge-base`
resolves to a point before the earlier task, and the message describes
work already merged via the prior squash. FN-2952's commit body claimed
11 files / 557 insertions when the actual diff was 2 files / 55 lines.

Subject was also a generic `merge <branch>` regardless of content.

- packages/engine/src/merger.ts: new `computeActualMergeCommitContext`
  helper that derives commitLog/diffStat from the actual integration
  delta (`git diff --cached <integrationTarget> --stat`), filtering
  branch commits by patch-id against the target's recent history to
  drop already-squashed siblings. Wired into both commit-finalization
  sites (`commitOrAmendMergeWithFixes` uses `preAttemptHeadSha`; the
  final amend in `runMergeAttempt` uses `HEAD~1`). Agent-context use of
  the wide range is unchanged.
- packages/engine/src/merger.ts: `buildDeterministicMergeMessage` now
  generates subject and body in parallel via `Promise.all`. Subject is
  composed as `feat(taskId): <ai summary>`, capped at 72 chars, with
  fallback to the legacy `merge <branch>` form on any AI failure.
- packages/core/src/ai-summarize.ts: new `summarizeCommitSubject` and
  `sanitizeCommitSubject` mirroring the body summarizer's structure.
  Same title-summarizer lane, 15s timeout. Sanitizer strips quotes,
  bullets, re-added conventional-commit prefixes, and trailing periods;
  hard-caps at 60 chars.
- packages/core/src/__tests__/ai-summarize.test.ts: 9 tests covering
  the sanitizer's behavior.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 15:22:20 -07:00
Fusion
4c82399a6a feat(FN-2952): validate unavailableNodePolicy in PUT /settings
Adds server-side validation for the `unavailableNodePolicy` field on the
PUT /api/settings route. Accepts only `block` or `fallback-local`;
rejects unknown strings and non-string values with 400.

- packages/dashboard/src/routes/register-settings-memory-routes.ts:
  call `validateUnavailableNodePolicy` and throw `badRequest` on invalid input
- packages/dashboard/src/__tests__/routes.test.ts: cover accept,
  invalid-value, and non-string cases

Fusion-Task-Id: FN-2952
2026-04-29 14:58:10 -07:00
Fusion
8793d4761e feat(FN-2943): merge fusion/fn-2943
- **Active Agents panel overhaul**: Hoisted above the main agent list with a new `ActiveAgentsPanel.css` stylesheet; shows next heartbeat ETA and prevents cards from getting stuck in "Connecting..." state
- **Node routing policy**: Scheduler now enforces unavailable-node scheduling rules and routes tasks to eligible nodes more reliably (`packages/engine/src/scheduler.ts`, `node-routing-policy.ts`)
- **Task card merge timer**: Keeps the card timer live while a task is actively merging rather than resetting on merge start
- **Settings modal scroll**: Scrolls to top when auth actions succeed, with regression tests added
- **Task steps reset**: Resets steps when reopening a task that returns to todo or triage (FN-2966)
- **Core store additions**: New `packages/core/src/store.ts` test coverage for task state mutations
- **Dashboard SSE bus**: New `sse-bus.ts` for event bus communication in the dashboard
- **Version bumps**: `v0.9.0` release across all packages; `cli-alias`, `dashboard`, `engine`, `plugin-sdk`, and plugin changelogs updated
- **Changeset cleanup**: Removed 20 stale changeset files consumed by the v0.9.0 release; added two new ones for Active Agents panel fixes

Commits merged:
- test(FN-2943): complete Step 3 — add auth scroll-to-top regressions
- feat(FN-2943): complete Step 2 — scroll on successful auth actions
- feat(FN-2943): complete Step 1 — add settings content scroll ref
- feat(FN-2951): enforce unavailable-node scheduling and improve active agents panel
- chore: add changeset for Active Agents panel hoist + heartbeat ETA
- feat(dashboard): hoist Active Agents panel above main list, show next heartbeat
- fix(dashboard): add top margin between agent list and Active Agents panel
- fix(dashboard): unstick Active Agents panel cards from "Connecting..."
- chore(release): v0.9.0
- chore: add changeset for live merge timer on task card
- fix(dashboard): keep card timer live while task is actively merging
- feat(FN-2966): reset task steps when reopening to todo or triage

Files changed:
.changeset/active-agents-live-status-and-logs.md   |  13 -
 .changeset/active-agents-no-stuck-connecting.md    |  13 +
 .changeset/active-agents-panel-hoist-heartbeat.md  |  13 +
 .changeset/dashboard-merge-base-diff.md            |  13 -
 .changeset/dashboard-task-changed-files-only.md    |  13 -
 .changeset/engine-concurrency-races.md             |  13 -
 .changeset/fix-agent-heartbeat-scheduling.md       |   5 -
 .changeset/memory-dream-session-state.md           |  13 -
 .changeset/merger-ai-summarized-commits.md         |  13 -
 .changeset/multi-node-routing.md                   |  21 -
 .changeset/pluggable-notification-providers.md     |   4 -
 .changeset/pr-mode-push-branch-and-cleanup.md      |  16 -
 .../recover-mergeable-respects-merge-settings.md   |  13 -
 .changeset/remote-tailscale-qr-tui.md              |   7 -
 .changeset/require-pr-approval-setting.md          |  17 -
 .changeset/respec-from-in-review.md                |  13 -
 .changeset/restore-task-card-fallbacks.md          |  13 -
 .changeset/tui-log-copy-feedback.md                |  13 -
 .changeset/tui-wide-stats-stack.md                 |  13 -
 CHANGELOG.md                                       | 449 +++++++++++++++++++++
 package.json                                       |   2 +-
 packages/cli-alias/CHANGELOG.md                    |  60 +++
 packages/cli-alias/package.json                    |   2 +-
 packages/cli/CHANGELOG.md                          |  44 ++
 packages/cli/package.json                          |   2 +-
 packages/core/CHANGELOG.md                         |  41 ++
 packages/core/package.json                         |   2 +-
 packages/core/src/__tests__/store.test.ts          | 127 ++++++
 packages/core/src/store.ts                         |  35 +-
 packages/dashboard/CHANGELOG.md                    |  63 +++
 .../dashboard/app/components/ActiveAgentsPanel.css |  29 ++
 .../dashboard/app/components/ActiveAgentsPanel.tsx |  35 +-
 packages/dashboard/app/components/AgentsView.tsx   |   5 +-
 .../dashboard/app/components/SettingsModal.tsx     |  13 +-
 packages/dashboard/app/components/TaskCard.tsx     |  30 +-
 .../__tests__/ActiveAgentsPanel.test.tsx           |  42 ++
 .../app/components/__tests__/AgentsView.test.tsx   |  11 +-
 .../components/__tests__/SettingsModal.test.tsx    |  68 ++++
 .../app/components/__tests__/TaskCard.test.tsx     |  36 ++
 packages/dashboard/app/sse-bus.ts                  |  13 +
 packages/dashboard/package.json                    |   2 +-
 packages/desktop/CHANGELOG.md                      |  41 ++
 packages/desktop/package.json                      |   2 +-
 packages/engine/CHANGELOG.md                       |  59 +++
 packages/engine/package.json                       |   2 +-
 .../src/__tests__/node-routing-policy.test.ts      | 102 +++--
 .../src/__tests__/scheduler-node-routing.test.ts   |  43 +-
 packages/engine/src/index.ts                       |   1 +
 packages/engine/src/node-routing-policy.ts         |  41 +-
 packages/engine/src/scheduler.ts                   |  48 +--
 packages/mobile/CHANGELOG.md                       |  41 ++
 packages/mobile/package.json                       |   2 +-
 packages/pi-claude-cli/CHANGELOG.md                |  41 ++
 packages/pi-claude-cli/package.json                |   2 +-
 packages/plugin-sdk/CHANGELOG.md                   |  57 +++
 packages/plugin-sdk/package.json                   |   2 +-
 .../examples/fusion-plugin-auto-label/CHANGELOG.md |  21 +
 .../examples/fusion-plugin-auto-label/package.json |   2 +-
 .../examples/fusion-plugin-ci-status/CHANGELOG.md  |  21 +
 .../examples/fusion-plugin-ci-status/package.json  |   2 +-
 .../fusion-plugin-notification/CHANGELOG.md        |  21 +
 .../fusion-plugin-notification/package.json        |   2 +-
 .../fusion-plugin-settings-demo/CHANGELOG.md       |  21 +
 .../fusion-plugin-settings-demo/package.json       |   2 +-
 plugins/fusion-plugin-hermes-runtime/CHANGELOG.md  |  21 +
 plugins/fusion-plugin-hermes-runtime/package.json  |   2 +-
 .../fusion-plugin-openclaw-runtime/CHANGELOG.md    |  21 +
 .../fusion-plugin-openclaw-runtime/package.json    |   2 +-
 .../fusion-plugin-paperclip-runtime/CHANGELOG.md   |  21 +
 .../fusion-plugin-paperclip-runtime/package.json   |   2 +-
 70 files changed, 1617 insertions(+), 378 deletions(-)

Fusion-Task-Id: FN-2943
2026-04-29 14:43:10 -07:00
Fusion
8f057a75d0 feat(FN-2943): improve auth UX, agent panel status, and task lifecycle handling
- Add settings content scroll refs and trigger scroll-to-top after successful sign-in and sign-up flows with regression coverage
- Keep task card merge timers live during active merges and add SSE support for task timing refresh
- Hoist Active Agents panel above the main list, add next-heartbeat visibility, and fix stale "Connecting..." card states
- Enforce unavailable-node scheduling guards and reset task steps when reopening tasks to triage or todo

Fusion-Task-Id: FN-2943
2026-04-29 14:41:28 -07:00
Fusion
7cb9d20125 feat(FN-2951): enforce unavailable-node scheduling and improve active agents panel
- Enforce unavailable-node routing policy in the scheduler and wire policy integration through engine startup
- Expand scheduler and node-routing policy test coverage for unavailable-node handling and policy integration behavior
- Hoist the Active Agents panel above the main agents list and display next-heartbeat ETA details
- Fix Active Agents panel UI issues by resolving stuck "Connecting..." cards and adding spacing adjustments
- Add changesets covering Active Agents panel hoist/heartbeat ETA and connecting-state fixes

Fusion-Task-Id: FN-2951
2026-04-29 14:36:50 -07:00
gsxdsm
d6c8073ad1 chore: add changeset for Active Agents panel hoist + heartbeat ETA
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 14:34:16 -07:00
gsxdsm
71a069e3d3 feat(dashboard): hoist Active Agents panel above main list, show next heartbeat
Move ActiveAgentsPanel between AgentMetricsBar and the main agent
collection so live work is visible without scrolling past the whole
agent directory. Add a "Next heartbeat in Xs" line to each card
footer (or "Heartbeat overdue" when negative), driven by
runtimeConfig.heartbeatIntervalMs with the dashboard default fallback.
Give cards a pointer cursor + hover/focus styling so the existing
click-to-select behavior is discoverable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 14:26:58 -07:00
gsxdsm
661d9bca8a fix(dashboard): add top margin between agent list and Active Agents panel
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 14:24:16 -07:00
gsxdsm
c31090efb5 fix(dashboard): unstick Active Agents panel cards from "Connecting..."
Agents in `active` state without a current taskId had no SSE to attach
to, but the card still rendered "Connecting..." — implying a network
state that never resolves. Branch on taskId first: idle agents show
"Idle — no task assigned"; running-without-task shows "Starting...".

Also fix a related SSE multiplexer race: subscribers joining a channel
that had already opened never got an onOpen callback (EventSource only
fires `open` once), so they sat at isConnected=false forever whenever
another component was already streaming the same URL. Fire onOpen on a
microtask for late-joiners.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 14:23:58 -07:00
gsxdsm
3460977be3 chore(release): v0.9.0
Version bump via changesets.
2026-04-29 14:04:09 -07:00
gsxdsm
6f5e2a843f chore: add changeset for live merge timer on task card
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 14:02:50 -07:00
gsxdsm
7c59d9b7e0 fix(dashboard): keep card timer live while task is actively merging
The in-review timer chip was driven by per-step instrumented duration,
which is frozen during a merge (the merge phase isn't tracked as a
workflow step). A stuck merge could read "3m" indefinitely. While
status is "merging"/"merging-pr", show live elapsed since updatedAt
(set by the merger at status flip) with a "Merging Nm" tooltip.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 14:02:24 -07:00
Fusion
4cc495375c feat(FN-2966): reset task steps when reopening to todo or triage
- Reset all task step statuses to pending and set currentStep to 0 when moving from in-progress, in-review, or done back to todo/triage
- Reset checked boxes in PROMPT.md on reopen so execution checklists match the reset step state
- Keep reopen cleanup scoped to reopen transitions while preserving existing behavior for non-reopen moves
- Add targeted store tests covering reopen paths, prompt checkbox reset, and no-op behavior for tasks without steps

Fusion-Task-Id: FN-2966
2026-04-29 13:59:43 -07:00
Fusion
7392688db1 feat(FN-2920): merge fusion/fn-2920
- Add cloudflared binary detection to the remote-access routes, surfaced in the Settings modal with install/uninstall UX states
- Update `SettingsModal.tsx` with new cloudflared status UI and install prompt flows; add co-located CSS in `SettingsModal.css`
- Add `SettingsModal.test.tsx` covering the new cloudflared states and API interactions
- Extend `remote-access-routes.test.ts` with detection and install/uninstall coverage
- Document the new cloudflared detection UX in `docs/remote-access.md` and `docs/settings-reference.md`
- Minor `server.test.ts` fixture update to align with the new server contract

Commits merged:
- docs(FN-2920): complete Step 7 — document cloudflared detection UX
- test(FN-2920): complete Step 6 — update server contract expectations
- feat(FN-2920): complete Step 5 — add cloudflared detection and install coverage

Files changed:
docs/remote-access.md                              |   2 +
 docs/settings-reference.md                         |   2 +
 packages/dashboard/app/api/legacy.ts               |   7 ++
 .../dashboard/app/components/SettingsModal.css     |  42 ++++++++
 .../dashboard/app/components/SettingsModal.tsx     | 112 ++++++++++++++++-----
 .../components/__tests__/SettingsModal.test.tsx    |  66 ++++++++++++
 .../src/__tests__/remote-access-routes.test.ts     | 107 +++++++++++++++++++-
 packages/dashboard/src/__tests__/server.test.ts    |   4 +-
 .../src/routes/register-settings-memory-routes.ts  |  59 ++++++++++-
 9 files changed, 372 insertions(+), 29 deletions(-)

Fusion-Task-Id: FN-2920
2026-04-29 13:57:41 -07:00
gsxdsm
d86fb19eac fix(remote): query tailscaled directly when no funnel URL was captured
When the tunnel was started before parseReadiness flipped to URL-required
(or by an external invocation), the manager's status URL stays null and
buildRemoteLoginUrlForTokenType used to fall back to a constructed
http://<configured-hostname>:<port> URL — which the user saw encoded
into the QR as e.g. "fusionstudio:4040".

Add a tailscale status --json fallback that recovers the public tailnet
DNS name and reconstructs the funnel URL (https://<machine>.<tailnet>.ts.net/).
If both sources fail, surface REMOTE_URL_NOT_READY rather than emitting a
non-public URL into the auth/QR payload.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 13:51:36 -07:00
Fusion
01cf62b002 feat(FN-2920): improve remote tunnel setup and heartbeat scheduling
- Add cloudflared install/detection support in remote settings API, UI, and route tests
- Surface Cloudflare tunnel prerequisites in Settings modal with remote access docs updates
- Harden heartbeat runtime scheduling by avoiding stale timeout state and simplifying runtime timeout handling
- Expand CLI/core/dashboard/engine coverage for task lifecycle, agent health, and runtime heartbeat behavior
- Add changesets for heartbeat scheduling fixes and PR approval setting updates

Fusion-Task-Id: FN-2920
2026-04-29 13:49:35 -07:00
gsxdsm
8fdadb0795 fix(cli): push per-task branch to origin before creating PR; drop dead autoCreatePr
In PR-mode, processPullRequestMergeTask called gh pr create --head
fusion/<task-id> without ever pushing the branch to origin. PR creation
failed and the task stalled in in-review — and combined with the
recover-mergeable-review sweep bug, the stalled task got force-merged
locally instead. Push the branch via git push -u origin <branch>
immediately before createPr (skipped when an existing PR already covers
the branch).

Also remove the dead autoCreatePr setting: defined as a default in the
schema and Settings type but never read anywhere.

Related to https://github.com/Runfusion/Fusion/issues/21

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 13:42:17 -07:00
gsxdsm
66d2c86265 fix(remote): derive tailscale target port from server-side request
Override the stored tailscale targetPort in the start handler using the
actual port the start request landed on (req.socket.localPort), instead
of trusting a value the browser supplied. window.location.port can be
wrong behind a reverse proxy, ssh forward, or split deployment, and
silently funneling the wrong process is worse than the prior
"port-not-configured" error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 13:39:08 -07:00
gsxdsm
f9260f2c65 feat(dashboard): auto-detect tailscale target port; clearer scan block
* Drop the Target port field from Settings — the dashboard already knows
  what port it's serving on, so use window.location.port (falling back
  to 80/443 by protocol). A user-overridable port adds no value and a
  stale stored value silently misroutes the funnel.
* Restructure the running-tunnel scan block to show three rows: the
  raw tailnet URL, the remote access code (rt= token, separate), and
  the QR image. Previously the auth URL was rendered as one long string
  that read as "the bare hostname" when truncated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 13:33:13 -07:00
Fusion
c9cdef720d feat(FN-2932): improve active agent visibility and grouped tool-call UX
- Preserve and emphasize active agent card highlights across hover and modal states, with dedicated CSS updates and regression tests
- Expand dashboard and TUI activity surfaces for grouped tool-call and live agent status/log visibility, including Quick Chat and chat view refinements
- Add route and runtime updates for agent/settings flows plus self-healing coverage for merge recovery behavior
- Include accompanying changesets and test stabilizations for mission activity assertions and active highlight hooks

Fusion-Task-Id: FN-2932
2026-04-29 13:29:00 -07:00
Fusion
07ca2ae668 feat(FN-2926): merge fusion/fn-2926
- Chat grouped tool calls refactored out of `ChatToolCalls.tsx` into inline rendering in `ChatView.tsx`, with updated styling and new tests; summary/expand logic for grouped calls updated
- New `QuickChatFAB` component added with styles, replacing the old `ChatToolCalls` inline callout with a persistent quick-access button
- Settings modal enhanced with agent runtime routes (register/unregister, run management) and memory settings routes (export, update limits)
- Remote access provider adapters updated to support real QR codes and live Tailscale URL sharing in TUI dashboard
- TUI dashboard app/controller/state updated to surface remote node status and shortcut hints
- `AgentsView` component updated with new layout and styling, plus comprehensive tests
- Route registration and agent runs tests updated to match new runtime API shape
- `surface-hover` fallback assertion aligned across tests
- Bundled dependency updates in `pnpm-lock.yaml`

Commits merged:
- test(FN-2926): align surface-hover fallback assertion
- feat(FN-2926): complete Steps 2-4 — inline grouped tool-call rendering and tests
- feat(FN-2926): complete Step 3 — refine grouped tool-call styles
- feat(FN-2926): complete Step 1 — update grouped tool call summary logic
- feat(remote): real QR codes, live tailscale URL, TUI status & shortcut
- feat(FN-2931): merge fusion/fn-2931
- feat(FN-2925): merge fusion/fn-2925
- feat(FN-2903): merge fusion/fn-2903

Files changed:
.../commands/dashboard-tui/__tests__/app.test.tsx  |   9 +-
 packages/cli/src/commands/dashboard-tui/app.tsx    |  97 +++++++++++--
 .../cli/src/commands/dashboard-tui/controller.ts   |  31 ++++
 packages/cli/src/commands/dashboard-tui/state.ts   |   9 +-
 packages/cli/src/commands/dashboard.ts             |   3 +-
 .../app/__tests__/status-colors-theme.test.ts      |   4 +-
 packages/dashboard/app/components/AgentsView.css   |  20 ++-
 packages/dashboard/app/components/AgentsView.tsx   |  11 +-
 .../dashboard/app/components/ChatToolCalls.tsx     | 160 ---------------------
 packages/dashboard/app/components/ChatView.css     |  53 +++----
 packages/dashboard/app/components/ChatView.tsx     | 131 ++++++++++++++++-
 packages/dashboard/app/components/QuickChatFAB.css |  87 ++++++-----
 packages/dashboard/app/components/QuickChatFAB.tsx | 124 +++++++++++++++-
 .../dashboard/app/components/SettingsModal.css     |  21 +++
 .../dashboard/app/components/SettingsModal.tsx     |  72 +++++++++-
 .../app/components/__tests__/AgentsView.test.tsx   |  37 +++++
 .../app/components/__tests__/ChatView.test.tsx     |  83 +++++++++--
 .../app/components/__tests__/QuickChatFAB.test.tsx |  68 ++++++---
 .../components/__tests__/SettingsModal.test.tsx    |  12 +-
 packages/dashboard/package.json                    |   2 +
 .../src/__tests__/routes-agent-runs.test.ts        |  13 +-
 .../src/routes/register-agent-runtime-routes.ts    |  49 ++++---
 .../src/routes/register-settings-memory-routes.ts  |  36 ++++-
 packages/engine/src/project-engine.ts              |   4 +-
 .../engine/src/remote-access/provider-adapters.ts  |  14 +-
 pnpm-lock.yaml                                     | 113 +++++++++++++++
 26 files changed, 933 insertions(+), 330 deletions(-)

Fusion-Task-Id: FN-2926
2026-04-29 13:26:25 -07:00
gsxdsm
d6556e6f1f chore: add changeset for remote tailscale QR/TUI overhaul
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 13:26:07 -07:00
gsxdsm
9dde067573 fix(engine): respect autoMerge and mergeStrategy in recover-mergeable-review sweep
The periodic maintenance job `recover-mergeable-review` was silently merging
in-review tasks regardless of `autoMerge` and `mergeStrategy` settings,
defeating the PR-based review flow for users with `autoMerge: false` and
`mergeStrategy: "pull-request"`.

Gate the sweep on `settings.autoMerge` (and globalPause/enginePaused for
consistency with other merge entry points) and route through the engine's
merge queue via the existing `enqueueMerge` callback so `mergeStrategy ===
"pull-request"` is honored. Falls back to the direct `store.mergeTask` path
only when no enqueue callback is wired (standalone/tests).

Closes https://github.com/Runfusion/Fusion/issues/21

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 13:26:05 -07:00
Fusion
f50c2ce46f feat(FN-2926): enhance grouped tool-call UX across dashboard and TUI
- Inline grouped tool-call rendering in chat surfaces and update summary logic for clearer aggregation
- Refine chat, quick FAB, settings, and agents UI styles/behavior with matching test coverage updates
- Extend dashboard TUI state/controller flow with status and shortcut improvements
- Update engine and dashboard route handling related to agent runs, settings memory sync, and remote access adapters

Fusion-Task-Id: FN-2926
2026-04-29 13:23:31 -07:00
gsxdsm
8bbd956fa5 feat(remote): real QR codes, live tailscale URL, TUI status & shortcut
* Replace placeholder /remote/qr SVG (URL drawn as text) with real QR
  rendered via the qrcode package; add format=terminal returning ASCII
  QR for the TUI.
* Resolve the public tailscale funnel URL from captured CLI output
  instead of constructing http://<hostname>:<port> from a configured
  hostname label — that label was never used by `tailscale funnel` and
  produced a non-public URL in the auth/QR link.
* Drop hostname requirement from engine + UI; only target port matters.
* Tighten tailscale parseReadiness to require a URL on the matched line
  so the tunnel manager doesn't lock in `running` before the URL line.
* TUI: poll remote status, show ● tunnel indicator + URL in MainHeader,
  bind Ctrl+Q to a global QR overlay (terminal ASCII), and switch the
  in-Settings K shortcut to render the same ASCII QR.
* Auto-poll remote status in the dashboard while in `starting`/`stopping`
  so the UI flips to running without reopening the modal.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 13:20:03 -07:00
Fusion
72ae0b46bf feat(FN-2931): merge fusion/fn-2931
- **New node routing policy engine** (`packages/engine/src/node-routing-policy.ts`, `scheduler.ts`): introduces configurable routing rules for assigning tasks to specific nodes, with a new test suite covering policy matching, node priority, and capacity constraints
- **Agent run route decoupling** (`register-agent-runtime-routes.ts`): routes now respond before heartbeat side effects complete, improving latency and reducing 503s under load; tests updated to handle async state transitions
- **Scheduler node routing** (`scheduler-node-routing.test.ts`): 131-line test expansion covering task-to-node assignment with routing policies
- **Dashboard UI polish** (AgentsView, QuickChatFAB, SettingsModal): CSS refinements and component adjustments from FN-2903
- **Reviewer and triage refinements** (`reviewer.ts`, `triage.ts`): logic improvements for async execution paths
- **Remote access adapter** (`provider-adapters.ts`): extended from FN-2950
- **Settings memory routes** (`register-settings-memory-routes.ts`): from FN-2925
- **Docs** (`architecture.md`, `settings-reference.md`): updated for new routing policy and settings features

Commits merged:
- test(FN-2931): complete Step 2 — update async state route assertions
- feat(FN-2931): complete Step 1 — respond before heartbeat side effects
- feat(FN-2925): merge fusion/fn-2925
- feat(FN-2903): merge fusion/fn-2903
- feat(FN-2950): merge fusion/fn-2950

Files changed:
docs/architecture.md                               |  19 +--
 docs/settings-reference.md                         |   2 +-
 packages/dashboard/app/components/AgentsView.css   |  20 +++-
 packages/dashboard/app/components/AgentsView.tsx   |  11 +-
 packages/dashboard/app/components/QuickChatFAB.css |  32 ++++-
 .../dashboard/app/components/SettingsModal.css     |  21 ++++
 .../dashboard/app/components/SettingsModal.tsx     |  58 ++++++++-
 .../app/components/__tests__/AgentsView.test.tsx   |  37 ++++++
 .../app/components/__tests__/QuickChatFAB.test.tsx |  18 +--
 .../components/__tests__/SettingsModal.test.tsx    |   2 +-
 packages/dashboard/package.json                    |   2 +
 .../src/__tests__/routes-agent-runs.test.ts        |  13 +-
 .../src/routes/register-agent-runtime-routes.ts    |  49 ++++----
 .../src/routes/register-settings-memory-routes.ts  |   8 +-
 .../src/__tests__/node-routing-policy.test.ts      |  78 ++++++++++++
 packages/engine/src/__tests__/reviewer.test.ts     |  19 ++-
 .../src/__tests__/scheduler-node-routing.test.ts   | 131 ++++++++++++++++++++-
 packages/engine/src/__tests__/triage.test.ts       |  16 +--
 packages/engine/src/node-routing-policy.ts         |  45 +++++++
 .../engine/src/remote-access/provider-adapters.ts  |  14 ++-
 packages/engine/src/reviewer.ts                    |  33 ++++--
 packages/engine/src/scheduler.ts                   |  44 ++++++-
 packages/engine/src/triage.ts                      |  48 ++++----
 pnpm-lock.yaml                                     | 113 ++++++++++++++++++
 24 files changed, 721 insertions(+), 112 deletions(-)

Fusion-Task-Id: FN-2931
2026-04-29 12:56:56 -07:00
Fusion
87d9c1c380 feat(FN-2925): merge fusion/fn-2925
- Mobile header row polish: finalize QuickChatFAB CSS for mobile viewport handling, apply visual viewport height to quick chat panel, remove duplicate keyboard overlap subtraction
- Add `node-routing-policy.ts` with routing logic for mesh network nodes; expand scheduler node-routing tests with new policy coverage
- Improve reviewer decision logic and add reviewer test cases for changed behavior
- Refactor triage module (48 lines changed) with updated agent selection logic
- Update `AgentsView` component and styles; add `AgentsView.test.tsx` integration test
- Simplify `QuickChatFAB.test.tsx` test by removing CSS class permutation coverage
- Update architecture docs and settings reference to reflect new routing capabilities

Commits merged:
- fix(FN-2925): remove duplicate keyboard overlap subtraction
- feat(FN-2925): complete Step 5 — finalize mobile header row polish
- fix(FN-2925): apply visual viewport height to mobile quick chat panel
- feat(FN-2903): merge fusion/fn-2903
- feat(FN-2950): merge fusion/fn-2950

Files changed:
docs/architecture.md                               |  19 +--
 docs/settings-reference.md                         |   2 +-
 packages/dashboard/app/components/AgentsView.css   |  20 +++-
 packages/dashboard/app/components/AgentsView.tsx   |  11 +-
 packages/dashboard/app/components/QuickChatFAB.css |  32 ++++-
 .../dashboard/app/components/SettingsModal.tsx     |   4 +-
 .../app/components/__tests__/AgentsView.test.tsx   |  37 ++++++
 .../app/components/__tests__/QuickChatFAB.test.tsx |  18 +--
 .../src/__tests__/node-routing-policy.test.ts      |  78 ++++++++++++
 packages/engine/src/__tests__/reviewer.test.ts     |  19 ++-
 .../src/__tests__/scheduler-node-routing.test.ts   | 131 ++++++++++++++++++++-
 packages/engine/src/__tests__/triage.test.ts       |  16 +--
 packages/engine/src/node-routing-policy.ts         |  45 +++++++
 packages/engine/src/reviewer.ts                    |  33 ++++--
 packages/engine/src/scheduler.ts                   |  44 ++++++-
 packages/engine/src/triage.ts                      |  48 ++++----
 16 files changed, 473 insertions(+), 84 deletions(-)

Fusion-Task-Id: FN-2925
2026-04-29 12:53:10 -07:00
gsxdsm
ad58a1d445 feat(FN-2903): merge fusion/fn-2903 2026-04-29 12:31:09 -07:00
Fusion
fd4353f026 feat(FN-2950): merge fusion/fn-2950
- Updated routing policy documentation in `docs/architecture.md` and `docs/settings-reference.md`
- Revised docs reflect the latest routing configuration options and behavior

Commits merged:
- feat(FN-2950): complete Step 6 — update routing policy documentation

Files changed:
docs/architecture.md       | 19 ++++++++++---------
 docs/settings-reference.md |  2 +-
 2 files changed, 11 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-2950
2026-04-29 12:17:18 -07:00
Fusion
8dd4999f11 feat(FN-2953): merge fusion/fn-2953
Commits merged:
- merge fusion/fn-2953

Fusion-Task-Id: FN-2953
2026-04-29 12:12:05 -07:00
gsxdsm
822bde7829 test(FN-2360): harden test isolation around repo fusion state 2026-04-29 12:02:56 -07:00
gsxdsm
cecf14a4f1 feat(FN-2922): merge fusion/fn-2922 2026-04-29 12:01:13 -07:00
gsxdsm
8796a32401 fix(dashboard): prefill Tailscale hostname from window.location
Empty hostname triggered provider_not_configured even though the field
was labeled "(optional)". Drop the misleading label and default to the
browser's current hostname so the start action succeeds out of the box.
Also drop the legacy MediaQueryList.addListener fallback to clear the
deprecation warning.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 11:57:38 -07:00
gsxdsm
a6a8862986 chore: backfill changesets for recent commits
Add changesets covering recent fix/feat commits since v0.8.4 that did
not yet have one: TUI wide layout, TUI log copy feedback, dashboard
merge-base diff, dashboard task-only file diffs, engine concurrency
races, memory dream session-state read, AI-summarized merge commits,
and the FN-2877 task card fallbacks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 11:53:42 -07:00
gsxdsm
627d1c9606 feat(core,dashboard): allow tasks to be respec'd from in-review
Add `triage` to VALID_TRANSITIONS["in-review"] so the dashboard's
`Request AI Revision` and `Rebuild Spec` actions work for in-review
tasks. moveTask now applies the same full reset on in-review → triage
as on in-review → todo (clears branch/baseBranch/baseCommitSha/summary/
recovery metadata and workflowStepResults) so the respec'd task starts
from scratch. The in-review task card's Move menu also gains Planning
as a destination.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 11:53:35 -07:00