Commit Graph

11821 Commits

Author SHA1 Message Date
gsxdsm
3bf7f92be0 refactor: package code organization wave 10 (#2328)
## Summary

Wave 10 of package code organization (plan:
`docs/plans/2026-07-14-001-refactor-package-code-organization-plan.md`),
after #2274.

### Peels

| New module | Parent |
|---|---|
| `types/agents.ts` | `types.ts` (permissions, Agent entity, ratings,
reflections, heartbeat run types) |
| `app/api/missions.ts` | `legacy.ts` (hierarchy, assertions,
validation, autopilot) |
| `app/api/messaging.ts` | `legacy.ts` (mailbox, approvals,
reflections/ratings, budget) |
| `app/api/plugins-and-skills.ts` | `legacy.ts` |
| `app/api/todo.ts` | `legacy.ts` |
| `app/api/insights.ts` | `legacy.ts` |
| `app/api/system-panel.ts` | `legacy.ts` |
| `task-store/workflow-definitions.ts` | rename of `remaining-ops-8` |

Mission interview SSE streams stay in `legacy.ts` until
`createResilientEventSource` is shared.

Public paths stay stable via re-exports.

### LOC

- `types.ts` ~7101 → ~6165
- `legacy.ts` ~10273 → ~8913

### Shims

- `types.ts` → `types/agents.ts` (delete-when: consumers import agents
domain directly)
- `legacy.ts` → peels above (delete-when: dashboard imports domain
modules)
- `remaining-ops-8` → `workflow-definitions` (rename complete)

## Test plan

- [x] `@fusion/core` typecheck
- [x] eslint on peeled dashboard API modules
- [x] `pnpm check:line-count`
- [x] `agent-permissions` + `agent-permission-policy` tests
- [x] `plugin-setup-api` tests
- [ ] CI merge gate

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

* **New Features**
* Added typed dashboard API support for missions, milestones/features,
validation loops, and autopilot.
  * Added insights browsing and management, including run triggering.
* Added messaging/mailboxes and approvals, plus agent reflections,
ratings, and budget controls.
  * Added plugins & skills management and discovery.
  * Added todo lists and items with reordering.
* Added system monitoring controls: rebuilds/restarts, logs, and
research finding promotion.
* **Improvements**
* Centralized agent-related type contracts for safer browser
consumption.
* Enhanced legacy API compatibility and improved AI session deletion
error handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-19 09:47:58 -07:00
gsxdsm
ecffdbb14b fix: isolate test-mode database access
Prevent automated tests from inheriting production PostgreSQL URLs and route global test-mode startups to a dedicated external or embedded test database.
2026-07-19 00:10:02 -07:00
gsxdsm
b4c1a1ac77 fix(FN-8350): keep tasks running through MCP outages
Retry MCP bootstrap with bounded backoff and request deadlines, then continue with healthy servers when an integration remains unavailable.

Exclude definitions with unresolved secrets so graceful degradation never connects a partially authenticated server.
2026-07-18 21:58:29 -07:00
gsxdsm
74de68af72 fix: prevent duplicate diagnostic task creation
Serialize cross-parent diagnostic claims at project scope and reuse a recent active canonical task. Keep ordinary, completed, and path-distinct work independent.
2026-07-18 21:21:55 -07:00
gsxdsm
e30f6d851f FN-8293: add native structure drag-and-draft mail composition
Mail composers can attach native structures by drag-and-drop and generate report narratives with AI.

- Add a shared native-structure drag protocol and attachable previews across Mail source views.
- Add a disposable compose-chat panel that drafts narratives around attached embeds.
- Cover drag behavior and compose-chat session lifecycle, and document the Mail interaction.

Files changed:
 .changeset/fn-8293-mail-drag-compose-chat.md       |   7 ++
 docs/dashboard-guide.md                            |   3 +
 .../dashboard/app/components/ComposeChatPanel.css  |  33 ++++++
 .../dashboard/app/components/ComposeChatPanel.tsx  | 117 +++++++++++++++++++++
 packages/dashboard/app/components/EvalsView.tsx    |   3 +-
 packages/dashboard/app/components/GoalsView.tsx    |   6 ++
 packages/dashboard/app/components/InsightsView.tsx |   8 +-
 .../dashboard/app/components/MessageComposer.css   |  22 ++++
 .../dashboard/app/components/MessageComposer.tsx   |  92 ++++++++++++++--
 .../dashboard/app/components/MissionManager.tsx    |  11 +-
 .../components/__tests__/ComposeChatPanel.test.tsx | 102 ++++++++++++++++++
 .../components/__tests__/MessageComposer.test.tsx  |  25 +++++
 .../utils/__tests__/nativeStructureDrag.test.ts    |  56 ++++++++++
 .../dashboard/app/utils/nativeStructureDrag.ts     |  54 ++++++++++
 14 files changed, 525 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-8293
Fusion-Task-Lineage: 9864e76c-2a0d-41f6-b7f2-de8dd63710b5
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 20:30:42 -07:00
gsxdsm
0dbe67c851 FN-8356: clear stale duplicate decision pauses
Clear inactive duplicate markers so eligible tasks resume planning instead of showing a stranded decision badge.

- Reconcile stale triage-marker duplicate pauses during self-healing and record audit events.
- Clear inactive canonical markers during triage while preserving user and unrelated pauses.
- Cover missing, deleted, completed, and archived canonical states with regression tests.

Files changed:
 .changeset/fn-8356-stale-duplicate-decision.md     |   7 ++
 AGENTS.md                                          |   1 +
 docs/architecture.md                               |   1 +
 .../explicit-duplicate-marker-sweep.test.ts        |  43 ++++++--
 .../self-healing-stale-duplicate-decision.test.ts  | 109 +++++++++++++++++++++
 .../triage-explicit-duplicate-marker.test.ts       |  32 ++++--
 packages/engine/src/run-audit.ts                   |   2 +
 packages/engine/src/self-healing.ts                |  87 ++++++++++++++--
 packages/engine/src/triage.ts                      |  41 ++++++--
 9 files changed, 298 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-8356

Fusion-Task-Lineage: 8df8f0ee-d73e-41d6-8abe-a4b33662c9da

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 20:06:41 -07:00
gsxdsm
d31a43d586 FN-8345: preserve manual live-log scrolling
Keep live workflow output at the tail only while the reader remains pinned.

- Track whether readers remain near the live log tail before following output.
- Observe in-place streamed content growth and resume following after re-pinning.
- Cover desktop and mobile scrolling behavior with workflow log regression tests.

Files changed:
 .changeset/fn-8345-workflow-live-log-scroll.md     |   7 +
 .../app/components/WorkflowResultsTab.tsx          | 113 ++++++++++------
 .../__tests__/WorkflowResultsTab.test.tsx          | 146 ++++++++++++++++++++-
 3 files changed, 225 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-8345

Fusion-Task-Lineage: 44075099-738d-4c61-b482-dd7c500539d3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 20:02:34 -07:00
gsxdsm
996155734a FN-8363: add outer dispatch dependency gate coverage
Add regression coverage for dependency gating before executor dispatch.

- Verify unmet live dependencies requeue before graph, authoritative, and legacy dispatch paths
- Cover satisfied, missing, soft-deleted, shadow-marker, and pre-held-slot dependency cases

Files changed:
 ...executor-outer-dispatch-dependency-gate.test.ts | 241 +++++++++++++++++++++
 1 file changed, 241 insertions(+)

Fusion-Task-Id: FN-8363

Fusion-Task-Lineage: 9528e846-2e9b-4c20-a2a2-7af3bb91b245

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 19:56:24 -07:00
gsxdsm
c8b4e23ca4 FN-8357: show verification videos in the Quality hub
Surface executor-produced task verification videos in the top-level Quality hub.

- Fetch review-artifact settings and video artifacts per selected project.
- Render tokenized inline videos with source-task navigation and responsive states.
- Add host interop aliases, coverage, documentation, and a minor changeset.

Files changed:
 .changeset/FN-8357-quality-verification-videos.md  |   7 +
 docs/settings-reference.md                         |   2 +-
 docs/workflow-steps.md                             |   2 +-
 packages/dashboard/tsconfig.app.json               |   1 +
 packages/dashboard/vite.config.ts                  |   2 +
 packages/dashboard/vitest.config.ts                |   2 +
 plugins/fusion-plugin-quality/package.json         |   1 +
 .../dashboard-view-verification-videos.test.tsx    | 131 ++++++++++++++++++
 .../src/dashboard-interop.d.ts                     |  20 +++
 .../fusion-plugin-quality/src/dashboard-view.css   |  87 ++++++++++++
 .../fusion-plugin-quality/src/dashboard-view.tsx   | 151 +++++++++++++++++++--
 plugins/fusion-plugin-quality/tsconfig.json        |   1 +
 plugins/fusion-plugin-quality/vitest.config.ts     |   8 ++
 pnpm-lock.yaml                                     | 135 +++++++++++++++++-
 14 files changed, 532 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-8357
Fusion-Task-Lineage: 728a5417-87ed-4203-850d-8ee108206766
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 19:51:58 -07:00
gsxdsm
cf3f5e9bf0 FN-8292: embed native structures in mail messages
Embed selected native project structures directly in mailbox messages and drafts.

- Persist native structure embeds in message metadata and expose their shared types.
- Add composer selection, mailbox rendering, previews, and dashboard navigation for linked structures.
- Cover metadata persistence and mailbox embed behavior with core and dashboard tests.

Files changed:
 .changeset/fn-8292-mail-native-structure-embeds.md |  7 ++
 docs/dashboard-guide.md                            |  1 +
 .../message-metadata-native-structures.test.ts     | 25 +++++++
 .../__tests__/postgres/message-store.pg.test.ts    | 21 ++++++
 packages/core/src/index.ts                         |  2 +-
 packages/core/src/types.ts                         | 32 +++++++++
 packages/core/src/types/messages.ts                | 14 ++++
 packages/dashboard/app/components/MailboxModal.css | 29 ++++++++
 packages/dashboard/app/components/MailboxModal.tsx | 13 +++-
 .../components/MailboxNativeStructureEmbeds.tsx    | 37 ++++++++++
 packages/dashboard/app/components/MailboxView.tsx  | 14 +++-
 .../dashboard/app/components/MessageComposer.tsx   | 65 ++++++++++++++++--
 .../app/components/NativeStructurePreview.tsx      |  6 +-
 .../__tests__/MailboxModal.cache.test.tsx          |  8 +--
 .../app/components/__tests__/MailboxModal.test.tsx |  9 +++
 .../MailboxNativeStructureEmbeds.test.tsx          | 42 ++++++++++++
 .../app/components/__tests__/MailboxView.test.tsx  |  9 +++
 .../components/__tests__/MessageComposer.test.tsx  | 25 +++++++
 .../app/components/dashboard/MainContent.tsx       | 78 +++++++++++++++++++++-
 .../MainContent.mailbox-view-task.test.tsx         | 46 ++++++++++++-
 20 files changed, 459 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-8292

Fusion-Task-Lineage: ae6cfb9c-a764-407c-bd45-cfd879ccdd3e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 19:45:08 -07:00
gsxdsm
bc4b679598 FN-8291: add inline native structure previews to chat
Enable chat users to inspect and open referenced native structures inline.

- Render clickable inline previews for native structure references across chat surfaces.
- Route preview actions to their corresponding task, mission, goal, and other dashboard views.
- Add regression coverage, dashboard documentation, and a CLI changeset.

Files changed:
 ...fn-8291-chat-native-structure-inline-preview.md |   7 +
 docs/dashboard-guide.md                            |   5 +-
 packages/dashboard/app/App.tsx                     |  31 +++
 .../app/components/StandardChatSurface.tsx         | 226 ++++++++++++++++--
 ...andardChatSurface.nativeStructureEmbed.test.tsx | 257 +++++++++++++++++++++
 .../__tests__/nativeStructureChatRef.test.ts       |  54 +++++
 .../app/components/nativeStructureChatRef.ts       |  58 +++++
 .../app/components/nativeStructureNavigation.ts    |  21 ++
 8 files changed, 635 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-8291

Fusion-Task-Lineage: 9db2c0fa-494e-4779-93f3-3309eed8565a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 19:36:57 -07:00
gsxdsm
b61311baa8 FN-8305: add durable PostgreSQL symbol locks
Introduce durable project-scoped symbol locks backed by PostgreSQL.

- Add normalized lease-based lock acquisition, renewal, release, and reconciliation APIs with audit events.
- Add PostgreSQL schema migrations and self-healing reconciliation coverage.
- Document the lock model and test migration and lock behavior.

Files changed:
 AGENTS.md                                          |   1 +
 docs/architecture.md                               |   1 +
 docs/storage.md                                    |   7 +
 .../src/__tests__/postgres/schema-applier.test.ts  | 115 +++++++++-
 packages/core/src/__tests__/symbol-locks.test.ts   |  91 ++++++++
 packages/core/src/index.ts                         |  17 ++
 .../core/src/postgres/migrations/0000_initial.sql  |  25 +++
 .../src/postgres/migrations/0025_symbol_locks.sql  |  63 ++++++
 packages/core/src/postgres/schema-applier.ts       |  18 +-
 packages/core/src/postgres/schema/project.ts       |  29 +++
 packages/core/src/store.ts                         |  23 ++
 packages/core/src/symbol-lock-types.ts             |  60 +++++
 packages/core/src/task-store/symbol-locks.ts       | 244 +++++++++++++++++++++
 .../__tests__/symbol-lock-reconciliation.test.ts   |  19 ++
 packages/engine/src/self-healing.ts                |  35 +++
 15 files changed, 745 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-8305

Fusion-Task-Lineage: efd95c73-23e3-4359-8204-dfad374a39bc

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 19:31:30 -07:00
gsxdsm
13540ee9c2 FN-8344: preserve manual planner chat scroll position
Keep Planner Chat pinned to live output only while readers remain near the transcript tail.

- Track user scroll position and distinguish programmatic anchoring.
- Preserve manually unsnapped transcript positions during streamed updates.
- Add scroll-follow regression coverage and a patch changeset.

Files changed:
 .changeset/fn-8344-planner-chat-scroll-follow.md   |   7 ++
 .../app/components/TaskPlannerChatTab.tsx          |  63 +++++++++-
 .../__tests__/TaskPlannerChatTab.test.tsx          | 134 ++++++++++++++++++++-
 3 files changed, 198 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-8344

Fusion-Task-Lineage: fde7965c-cffc-4908-90c1-3df1f3c2af75

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 19:24:52 -07:00
gsxdsm
12aee016ee FN-8352: promote ideation to top-level navigation
Make ideation independently accessible from desktop and mobile navigation.

- Add an Ideation view backed by the Command Center panel and view-state routing.
- Surface Ideation in desktop/sidebar and mobile primary navigation, with coverage for navigation and rendering.
- Document the experimental setting and add a minor changeset.

Files changed:
 .changeset/fn-8352-ideation-top-level-view.md      |  7 ++++
 docs/dashboard-guide.md                            | 14 +++++++
 docs/settings-reference.md                         |  3 +-
 .../src/__tests__/mobile-nav-primary-items.test.ts | 10 ++++-
 packages/core/src/mobile-nav-primary-items.ts      | 17 +++++++-
 packages/dashboard/app/App.tsx                     | 16 ++++++-
 packages/dashboard/app/components/Header.tsx       | 21 +++++++--
 .../dashboard/app/components/LeftSidebarNav.tsx    |  8 +++-
 packages/dashboard/app/components/MobileNavBar.tsx |  2 +
 .../dashboard/app/components/SettingsModal.tsx     |  6 +++
 .../app/components/__tests__/App.test.tsx          | 20 +++++++++
 .../app/components/__tests__/Header.test.tsx       | 15 +++++++
 .../components/__tests__/LeftSidebarNav.test.tsx   |  5 +++
 .../app/components/__tests__/MobileNavBar.test.tsx | 43 +++++++++++++++---
 .../components/command-center/CommandCenter.tsx    | 12 +++---
 .../__tests__/CommandCenter.test.tsx               |  7 ++--
 .../__tests__/IdeationPanel.test.tsx               | 49 ++++++++++++++++++++++
 .../app/components/dashboard/MainContent.tsx       | 13 ++++++
 .../dashboard/app/components/dashboard/types.ts    |  1 +
 .../settings/sections/GeneralSection.tsx           | 10 ++---
 packages/dashboard/app/hooks/useViewState.ts       |  8 +++-
 21 files changed, 256 insertions(+), 31 deletions(-)

Fusion-Task-Id: FN-8352
Fusion-Task-Lineage: e7791119-2fe5-4e68-b669-0e5bd8df9b49
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 19:18:57 -07:00
gsxdsm
482dbe77a4 FN-8340: preserve Quick Chat layout on restore
Keep minimized Quick Chat mounted and layout-stable for instant restores.

- Hide retained floating windows with visibility and disable pointer interaction
- Cover conversation-load, session, and scroll retention across desktop and mobile restores
- Document the retained Quick Chat behavior

Files changed:
 docs/dashboard-guide.md                            |  2 +-
 packages/dashboard/app/components/FloatingWindow.css | 12 +++--
 packages/dashboard/app/components/FloatingWindow.tsx |  9 ++--
 packages/dashboard/app/components/__tests__/FloatingWindow.test.tsx |  4 ++
 packages/dashboard/app/components/__tests__/QuickChat.persist.test.tsx | 58 +++++++++++++++++-----
 5 files changed, 63 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-8340

Fusion-Task-Lineage: 25027098-b89a-481c-bf00-de64cf302628

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 19:11:56 -07:00
gsxdsm
0400c02f08 FN-8355: preserve mobile model list scrolling
Keep filtered mobile model dropdown lists scrollable when the virtual keyboard repositions the viewport.

- Allow the portaled list flex child to shrink and retain overflow ownership.
- Cover desktop and mobile scroll contracts, filtering, keyboard repositioning, and no-result states.
- Add a patch changeset for the mobile dropdown fix.

Files changed:
 .changeset/fn-8355-mobile-model-dropdown-scroll.md |  7 ++
 .../app/components/CustomModelDropdown.css         |  4 ++
 .../__tests__/CustomModelDropdown.test.tsx         | 79 ++++++++++++++++++++++
 3 files changed, 90 insertions(+)

Fusion-Task-Id: FN-8355

Fusion-Task-Lineage: 4e9dff76-f347-45ff-8ef6-abd7eea90d20

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 19:04:07 -07:00
gsxdsm
927f2baf7d FN-8354: add Oh My Pi provider logo
Render the official Oh My Pi mark throughout provider selection and analytics surfaces.

- Add a tokenized OMP SVG icon and provider aliases.
- Infer OMP-tagged model identifiers without misattributing bare models.
- Cover OMP icon rendering and inference with dashboard tests.

Files changed:
 packages/dashboard/app/components/ProviderIcon.tsx | 26 +++++++++++++++++++++-
 .../app/components/__tests__/ProviderIcon.test.tsx | 23 +++++++++++++++++++
 packages/dashboard/app/styles.css                  |  1 +
 .../app/utils/__tests__/providerIconKey.test.ts    |  8 +++++++
 packages/dashboard/app/utils/providerIconKey.ts    |  9 ++++++++
 5 files changed, 66 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-8354

Fusion-Task-Lineage: 71d5638c-b41e-4960-9391-c7a441d04f51

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 18:58:44 -07:00
gsxdsm
0cba6fa56a FN-8351: move org portability controls to Team
Move organization export and import from Overview to the Team section.

- Render the existing portability controls in TeamArea with the established settings refresh flow
- Remove the Overview mount and update focused placement coverage
- Document the Team-tab location and add a patch changeset

Files changed:
 .changeset/fn-8351-org-portability-team-tab.md     |  7 +++
 docs/dashboard-guide.md                            |  3 +-
 .../command-center/CommandCenterControls.tsx       |  6 +-
 .../__tests__/CommandCenterControls.test.tsx       | 15 ++---
 .../components/command-center/areas/TeamArea.tsx   |  8 +++
 .../areas/__tests__/TeamArea.test.tsx              | 66 ++++++++++++++++++++++
 6 files changed, 91 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-8351

Fusion-Task-Lineage: 3877a8ec-f307-4da5-88bb-806e1428d14a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 18:53:02 -07:00
gsxdsm
9f44f26a36 FN-8350: move configuration versions into Settings
Move project configuration revision history and rollback controls from Command Center to Settings.

- Add a Project Settings configuration versions section with rollback handling.
- Remove the Command Center revision card and retain organization portability controls.
- Update translations, dashboard documentation, tests, and release metadata.

Files changed:
 .changeset/fn-8350-config-versions-settings.md     |  7 ++
 docs/dashboard-guide.md                            |  3 +-
 .../dashboard/app/components/SettingsModal.tsx     | 11 ++++
 .../command-center/OrgPortabilityControls.css      | 47 ++------------
 .../command-center/OrgPortabilityControls.tsx      | 55 +---------------
 .../__tests__/CommandCenter.mobile-scroll.test.tsx |  2 +-
 .../__tests__/OrgPortabilityControls.test.tsx      | 37 ++---------
 .../sections/ConfigurationVersionsSection.css      | 56 ++++++++++++++++
 .../sections/ConfigurationVersionsSection.tsx      | 75 ++++++++++++++++++++++
 .../ConfigurationVersionsSection.test.tsx          | 58 +++++++++++++++++
 packages/i18n/locales/en/app.json                  | 29 +++++----
 11 files changed, 238 insertions(+), 142 deletions(-)

Fusion-Task-Id: FN-8350

Fusion-Task-Lineage: a7f68720-038a-42a6-b064-38533c584492

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 18:45:16 -07:00
gsxdsm
38891bfd81 FN-8296: add chat-requested task verification
Enable chat agents to queue and monitor executor-owned verification runs.

- Persist task verification requests through a new PostgreSQL migration.
- Expose action-gated chat request and status tools with executor processing.
- Show verification status in task and Command Center views.
- Advance the schema baseline to migration 0024 and keep chat mocks complete.

Files changed:
 .changeset/fn-8296-feature.md                      |  7 ++
 docs/agent-tool-surface-full-loop.md               | 10 +--
 docs/dashboard-guide.md                            |  4 +
 packages/core/src/index.ts                         |  2 +
 .../core/src/postgres/migrations/0000_initial.sql  | 20 +++++
 .../migrations/0024_task_verification_request.sql  | 20 +++++
 packages/core/src/postgres/schema-applier.ts       | 13 ++-
 packages/core/src/postgres/schema/project.ts       | 25 ++++++
 packages/core/src/store.ts                         | 16 +++-
 packages/core/src/task-store/reads.ts              | 14 +++-
 packages/core/src/task-store/remaining-ops-6.ts    | 49 ++++++++++-
 packages/core/src/types.ts                         | 30 +++++++
 packages/dashboard/app/api/legacy.ts               |  1 +
 packages/dashboard/app/api/task-content.ts         | 10 +++
 .../dashboard/app/components/TaskDetailModal.tsx   | 17 +++-
 .../app/components/TaskVerificationStatus.css      | 94 ++++++++++++++++++++++
 .../app/components/TaskVerificationStatus.tsx      | 39 +++++++++
 .../__tests__/TaskVerificationStatus.test.tsx      | 28 +++++++
 .../components/command-center/CommandCenter.css    | 33 ++++++++
 .../components/command-center/CommandCenter.tsx    | 37 ++++++++-
 packages/dashboard/src/__tests__/chat.test.ts      |  1 +
 packages/dashboard/src/chat.ts                     | 55 +++++++++++++
 .../src/routes/register-command-center-routes.ts   | 20 +++++
 .../src/routes/register-task-workflow-routes.ts    | 17 ++++
 packages/engine/src/executor.ts                    | 51 +++++++++++-
 packages/engine/src/gating-classifications.ts      |  5 ++
 packages/engine/src/index.ts                       |  2 +-
 27 files changed, 605 insertions(+), 15 deletions(-)

Fusion-Task-Id: FN-8296

Fusion-Task-Lineage: f94647cf-c89f-4f0e-b25f-cbf5b56683bc

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 18:38:47 -07:00
gsxdsm
a348428f32 FN-8335: surface settings defaults in help tips
Expose default and inheritance descriptions through consistent Settings help affordances.

- Move report-mode and per-action override descriptions into accessible help tips
- Cover default, override reset, and embedded PostgreSQL connection-cap help text
- Keep the settings-default description inventory aligned with rendered copy

Files changed:
 .../__tests__/SettingsModal.general.test.tsx       | 37 ++++++++++++++++++++++
 .../settings/sections/GeneralSection.tsx           | 28 +++++++++-------
 .../settings-default-descriptions.test.tsx         | 13 ++++----
 3 files changed, 60 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-8335

Fusion-Task-Lineage: 7a8711be-8559-4799-afcd-8f22ac3adc2b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 18:19:12 -07:00
gsxdsm
e2b5532290 FN-8288: add native structure preview foundation
Provide reusable, typed previews for native dashboard structures.

- Define five-kind native structure references and preview payloads.
- Add project-scoped preview resolution API with unavailable states and capped excerpts.
- Add a callback-driven inline preview card, tests, documentation, and release note.

Files changed:
 .changeset/fn-8288-native-structure-preview.md     |   7 ++
 docs/dashboard-guide.md                            |   4 +
 packages/core/src/index.gate.ts                    |   2 +-
 packages/core/src/index.ts                         |   1 +
 packages/core/src/types.ts                         |  54 ++++++++++
 packages/dashboard/app/api/legacy.ts               |   1 +
 packages/dashboard/app/api/task-content.ts         |  13 ++-
 .../app/components/NativeStructurePreview.css      |  61 +++++++++++
 .../app/components/NativeStructurePreview.tsx      | 115 +++++++++++++++++++++
 .../__tests__/NativeStructurePreview.test.tsx      | 102 ++++++++++++++++++
 packages/dashboard/src/native-structure-preview.ts |  88 ++++++++++++++++
 .../native-structure-preview-routes.test.ts        | 102 ++++++++++++++++++
 .../src/routes/register-task-workflow-routes.ts    |  23 +++++
 13 files changed, 571 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-8288

Fusion-Task-Lineage: 1a4ce369-9f9e-4a45-b533-2d53b5f1020c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 18:11:02 -07:00
gsxdsm
ed2ffc4885 FN-8346: preserve manual scroll position in live logs
Preserve the sticky-bottom follow invariant across streamed Dev Server and System Controls output.

- Track pinned-bottom state synchronously for rebuild and system-log streams.
- Follow in-place Dev Server transcript mutations only while the reader is pinned.
- Cover manual unsnapping, stream growth, and re-pinning behavior.
- Add a patch changeset for live-log scrolling.

Files changed:
 .changeset/fn-8346-live-tail-scroll-follow.md      |  7 ++
 .../app/components/DevServerLogViewer.tsx          | 43 ++++++++++--
 .../__tests__/DevServerLogViewer.test.tsx          | 47 +++++++++++++
 .../__tests__/SystemControlsArea.test.tsx          | 81 +++++++++++++++++++++-
 .../command-center/areas/SystemControlsArea.tsx    | 44 ++++++++++--
 5 files changed, 208 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-8346

Fusion-Task-Lineage: c1eeb84d-c0af-473b-99f1-0d8564ac8a24

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 18:04:26 -07:00
gsxdsm
059a71f5e9 fix(FN-8288): fail closed when review contract is unavailable
Fusion-Task-Id: FN-8288
2026-07-18 18:00:52 -07:00
gsxdsm
4cc8002c97 FN-8341: rework planning interviews for reactive validation
Make planning interviews user-controlled and context-aware from validation through task creation.

- Replace fixed-depth and deepening checkpoints with reactive follow-up questions
- Add explicit planning validation and require it before creating or breaking down work
- Expose validation through the API, CLI, routes, types, documentation, and release notes
- Update localized copy and PlanningModeModal mocks and assertions for the revised workflow

Files changed:
 .changeset/fn-8341-deepening-checkpoint-removal.md |   7 +
 .changeset/fn-8341-planning-reactive-backend.md    |   7 +
 docs/dashboard-guide.md                            |   8 +-
 packages/cli/src/commands/task.ts                  |  12 +-
 packages/core/src/index.gate.ts                    |   2 +-
 packages/core/src/index.ts                         |   2 +-
 packages/core/src/types.ts                         |  38 +-
 packages/dashboard/app/api/legacy.ts               |  15 +-
 .../dashboard/app/components/PlanningModeModal.tsx | 192 +-----
 .../__tests__/PlanningModeModal.autosize.test.tsx  |   4 +
 .../__tests__/PlanningModeModal.initial.test.tsx   |  50 +-
 .../PlanningModeModal.planning-flow.test.tsx       | 442 +------------
 .../__tests__/PlanningModeModal.test-helpers.ts    |   1 +
 .../PlanningModeModal.ui-interactions.test.tsx     |   3 +
 .../__tests__/planning-infinite-interview.test.ts  | 221 +++++++
 packages/dashboard/src/planning.ts                 | 711 ++++++---------------
 .../src/routes/register-planning-subtask-routes.ts |  64 +-
 packages/i18n/locales/en/app.json                  |   1 -
 packages/i18n/locales/es/app.json                  |   1 -
 packages/i18n/locales/fr/app.json                  |   1 -
 packages/i18n/locales/ko/app.json                  |   1 -
 packages/i18n/locales/zh-CN/app.json               |   1 -
 packages/i18n/locales/zh-TW/app.json               |   1 -
 23 files changed, 536 insertions(+), 1249 deletions(-)

Fusion-Task-Id: FN-8341

Fusion-Task-Lineage: 102f88af-2675-43f5-8e08-5403a0e17da8

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 17:53:20 -07:00
gsxdsm
358b628b8d fix(FN-8288): preserve approved review and recovery state
Fusion-Task-Id: FN-8288
2026-07-18 17:24:49 -07:00
gsxdsm
b8cd3d21fb fix: surface OMP ACP Internal error details and harden tool MCP spawn
OMP session/new was dying with opaque "Internal error" when fusion-custom-tools
MCP pointed at a missing schema server, or when bare models hit unauthenticated
providers. Prefer data.details in diagnostics, resolve mcp-schema-server.cjs
from multiple package layouts, skip the tool bridge when the asset is missing,
drop stdio MCP entries whose command path does not exist, and forward common
provider env keys (ZAI/MiniMax/Kimi) into the ACP subprocess.
2026-07-18 17:13:57 -07:00
gsxdsm
a3dda8eaff fix(core): prevent concurrent startup database failures (#2330)
## Summary

Concurrent PostgreSQL project initialization no longer causes transient
dashboard failures, including repeated `GET /api/remote/status` 500
responses. The failure was a database deadlock between project-row
identity promotion and schema/plugin DDL, which previously acquired
overlapping locks in inconsistent orders.

This establishes one advisory-lock order across SQLite cutover, project
identity promotion, and schema mutations. Focused regression coverage
proves schema DDL waits behind an active migration transaction and that
identity stamping acquires the migration lock before reading
project-owned tables.

## Validation

- 25 focused unit tests passed.
- 3 focused real-PostgreSQL regression tests passed.
- `@fusion/core` typecheck passed.
- Strict changeset validation passed.
- Fast workspace verification passed, including the CLI build and boot
health check.

---

[![Compound
Engineering](https://img.shields.io/badge/Built_with-Compound_Engineering-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)


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

## Summary by CodeRabbit

* **Bug Fixes**
* Prevented transient dashboard failures caused by PostgreSQL startup
and migration deadlocks.
* Improved serialization when multiple projects initialize or update
database schemas concurrently.
* Ensured migration state updates and schema changes occur in a
consistent order.

* **Tests**
* Added coverage for migration lock ordering, concurrent schema
operations, and recovery after lock contention.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-18 17:12:27 -07:00
gsxdsm
f5c9dc6f91 fix: prevent stuck-kill from stranding approved plans as unplanned (#2326)
## Summary

Fixes a race where a stuck-kill during Plan Review could leave an
approved task stranded in `todo` as **unplanned**, so the scheduler
refused release to `in-progress` for several minutes (observed on
FN-1312: ~6m39s idle after Plan Review APPROVE).

### What went wrong

1. Finalize clears `status` early, then runs Plan Review.
2. Stuck-kill disposes the main triage session near the 30m processing
threshold.
3. Stale eviction only treated the main session as live, so the card
left `processing` while Plan Review / finalize was still running.
4. A second planner claimed `status: "planning"` and rewrote
`PROMPT.md`.
5. The first finalize moved `triage → todo` without clearing planning
statuses.
6. Hold-release saw planning/`needs-replan` and blocked: *“card is
unplanned and cannot enter processing column in-progress”*.

### Fix

In `packages/engine/src/triage.ts`:

- Track **finalizing** handoffs and **live Plan Review subagents** as
live planning work.
- Keep them in `getProcessingTaskIds`, refuse concurrent `specifyTask`,
and skip stale-processing eviction while they are live.
- **Defer** stuck-abort requeue during finalize (bump kill count only;
do not force `needs-replan`).
- Recover approved drafts with `status: null` (post early-clear), not
only `status: "planning"`.
- Re-assert `status: null` after the successful release move to todo.

### Tests

Regression coverage in `triage.test.ts` for eviction retention,
processing-id inclusion, null-status recovery, needs-replan
non-recovery, and deferred stuck-abort during finalize.

## Test plan

- [x] `pnpm --filter @fusion/engine exec vitest run
src/__tests__/triage.test.ts -t "evictStaleProcessing|specified triage
recovery|stuck|recoverApproved|markStuckAborted|defers stuck-abort"`
(related cases green)
- [ ] CI gate on this PR
- [ ] Optional: reproduce stuck-kill mid–Plan Review and confirm todo
releases without a second full replan

## Notes

Secondary report (stuck-kill immediately after all implementation steps
complete, then 16s auto-recovery) is **out of scope** here; existing
recovery already continued by skipping completed steps.


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

* **Bug Fixes**
* Improved recovery for approved tasks when Plan Review has completed,
including correct handling of `null`-status drafts.
* Avoided recovering unplanned seed drafts and tasks that should enter a
replanning flow.
* Refined stuck-abort requeue/cleanup to respect in-progress Plan Review
and finalize handoffs.
* Prevented stale-processing eviction from removing tasks while Plan
Review/subagent finalization is still active.
* Blocked new triage discovery and task specification when finalize/Plan
Review work is ongoing, preventing handoff disruption.
* Preserved durable task state during handoff completion
(approval/failure/replan outcomes).
* **Tests**
* Added expanded triage recovery and stuck-abort/stale-eviction
regression coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-18 17:11:55 -07:00
gsxdsm
a8e1393e3c fix: serialize Anthropic OAuth token refresh
Prevent concurrent Fusion sessions and processes from consuming the same rotating refresh token. Share one refresh lock across legacy and subscription Anthropic credential aliases.
2026-07-18 17:08:35 -07:00
gsxdsm
7e7c3c999b FN-8317: add reviewed report screenshots and activity traces
Capture optional report context while preserving scrubbed text-first filing.\n\n- Add browser screenshot capture, review, validation, and compensating upload cleanup.\n- Include bounded activity traces in report drafts and filing flows.\n- Preserve roadmap deduplication and document report privacy behavior.\n\nFiles changed:\n .changeset/fn-8317-report-context.md               |   7 +
 docs/dashboard-guide.md                            |   4 +-
 packages/dashboard/app/api/report.ts               |  15 +-
 packages/dashboard/app/components/ReportModal.css  |   5 +-
 packages/dashboard/app/components/ReportModal.tsx  |  52 +++----
 .../app/components/__tests__/ReportModal.test.tsx  |  14 ++
 packages/dashboard/app/hooks/useViewState.ts       |   7 +
 .../app/utils/__tests__/report-capture.test.ts     |  17 +++
 packages/dashboard/app/utils/report-capture.ts     |  47 +++++++
 packages/dashboard/package.json                    |   1 -
 .../src/__tests__/report-pipeline.test.ts          | 100 +++++++++++++-
 .../dashboard/src/__tests__/report-routes.test.ts  |  17 +++
 .../dashboard/src/__tests__/report-scrub.test.ts   |   8 ++
 packages/dashboard/src/github.ts                   | 107 +++++++++++++++
 packages/dashboard/src/report-pipeline.ts          | 152 ++++++++++++++++-----
 packages/dashboard/src/report-scrub.ts             |   8 ++
 .../dashboard/src/routes/register-report-routes.ts | 103 ++++++--------
 pnpm-lock.yaml                                     | 129 +++++++++--------
 18 files changed, 590 insertions(+), 203 deletions(-)

Fusion-Task-Id: FN-8317

Fusion-Task-Lineage: 9d200cee-cf69-4827-9e1e-f7789adf09e0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 17:06:34 -07:00
gsxdsm
55101e03cf fix: make OMP chat resolve provider-qualified model selectors
Bare picker ids like MiniMax-M2.5 were ambiguous across omp providers and landed on unauthenticated plan aliases, which broke ACP with Internal error. Prefer `omp models --json` selectors, resolve bare ids before spawn, and copy mcp-schema-server.cjs into dist so the Fusion tool bridge can start.
2026-07-18 17:06:34 -07:00
gsxdsm
3ebac72345 fix(ci): research promote tool inventory + 0023 upgrade seed bookkeeping (#2329)
## Summary
- Heartbeat customTools inventory includes `fn_research_promote_finding`
(64 tools).
- Schema-applier bookkeeping for migration `0023` research feature
provenance.
- Seed upgrade fixtures include `mission_features.slice_id` for the
unique index.

## Evidence
- Full greens earlier this session: **29662309385** (#2323),
**29663526777** (#2325), **29664692957** (#2327).
- Tip red after FN-8297: heartbeat 63→64 + schema upgrade seed.

## Test plan
- [x] heartbeat expected-tools + schema upgrade tests green locally
- [ ] Full Suite all shards green on tip after merge
2026-07-18 16:44:58 -07:00
gsxdsm
0a581f50db FN-8339: preserve manual scroll position during streaming
Keep live chat and log viewers from snapping readers back to the bottom while streamed content grows.

- Track pinned-bottom state synchronously across task chat, general chat, and agent logs.
- Follow streamed DOM and layout growth only when the reader remains at the tail.
- Add regression coverage and a patch changeset.

Files changed:
 .changeset/fn-8339-chat-scroll-follow.md           |  7 +++
 .../dashboard/app/components/AgentLogViewer.tsx    | 52 +++++++++++--------
 packages/dashboard/app/components/ChatView.tsx     |  4 ++
 packages/dashboard/app/components/TaskChatTab.tsx  | 59 ++++++++++++++++------
 .../__tests__/AgentLogViewer.layout.test.tsx       | 58 ++++++++++++++++++++-
 .../__tests__/ChatView.streaming-thread.test.tsx   | 18 ++++++-
 .../app/components/__tests__/TaskChatTab.test.tsx  | 34 +++++++++++++
 7 files changed, 195 insertions(+), 37 deletions(-)

Fusion-Task-Id: FN-8339

Fusion-Task-Lineage: 8f1290ea-de87-4edc-b343-f50c0ba55bad

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 16:23:02 -07:00
gsxdsm
c95e08ea21 FN-8297: add research finding promotion to mission features
Bridge completed research findings into durable mission roadmap features.

- Persist stable finding and citation provenance on mission features
- Add idempotent promotion APIs, dashboard controls, and agent tooling
- Document the promotion flow and cover finding identity and feature synchronization

Files changed:
 .changeset/fn-8297-research-mission-bridge.md      |  7 ++++
 docs/missions.md                                   |  4 +++
 docs/research.md                                   |  4 +++
 .../__tests__/research-finding-identity.test.ts    | 15 +++++++++
 packages/core/src/async-mission-store-queries.ts   | 26 +++++++++++++++
 packages/core/src/async-mission-store.ts           | 16 +++++++++
 packages/core/src/index.gate.ts                    |  3 ++
 packages/core/src/index.ts                         |  3 ++
 packages/core/src/mission-types.ts                 | 13 ++++++++
 .../core/src/postgres/migrations/0000_initial.sql  |  4 +++
 .../0023_research_feature_provenance.sql           |  8 +++++
 packages/core/src/postgres/schema-applier.ts       | 13 +++++++-
 packages/core/src/postgres/schema/project.ts       |  5 +++
 packages/core/src/research-feature-promotion.ts    | 38 ++++++++++++++++++++++
 packages/core/src/research-types.ts                | 21 ++++++++++++
 packages/core/src/types.ts                         |  1 +
 packages/dashboard/app/api/legacy.ts               | 21 ++++++++++++
 packages/dashboard/app/components/ResearchView.tsx | 19 ++++++-----
 packages/dashboard/app/hooks/useResearch.ts        |  3 ++
 packages/dashboard/src/chat.ts                     |  4 +--
 packages/dashboard/src/research-routes.ts          | 37 +++++++++++++++++----
 .../src/__tests__/agent-mission-tools.test.ts      | 14 +++++++-
 .../src/__tests__/mission-feature-sync.test.ts     | 20 ++++++++++++
 packages/engine/src/agent-tools.ts                 | 26 +++++++++++++++
 packages/engine/src/mission-feature-sync.ts        |  1 +
 25 files changed, 308 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-8297

Fusion-Task-Lineage: ffef4d26-1372-466a-8d3d-2b9b5cc9a53b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 16:18:15 -07:00
gsxdsm
de2669fd17 fix(ci): mock createAgentTask for route tests; quarantine merge-reuse slow flake (#2327)
## Summary
- Default `createAgentTask` in dashboard `@fusion/engine` mock so
planning/subtask create routes return 201 (FN-8277).
- Mock `findRecentTasksBySourceParentTaskId` on github/planning route
stores.
- Quarantine `merge-reuse-task-worktree.slow.test.ts` (engine-slow load
flake, run 29663725381).

## Evidence
- Prior full green: Full Suite run **29663526777** on #2325.
- Tip red class: routes-github/planning 500 + engine-slow lease
residual.

## Test plan
- [x] routes subtask create-tasks / shared branch groups tests green
locally
- [ ] Full Suite all 4 shards + engine-slow green on main tip after
merge

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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved task and subtask creation test coverage to correctly handle
parent-scoped duplicate checks.
  * Updated test behavior to return reliable task creation results.

* **Tests**
* Quarantined a flaky integration test from the slow test suite to
improve test run reliability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-18 16:08:14 -07:00
gsxdsm
4a4f231ef4 fix(FN-8277): preserve planning task lineage (#2324)
## Summary

Planning breakdowns now preserve their creating task as durable lineage
and reuse only siblings from that same parent. Identical wording under a
different parent creates a distinct child instead of silently linking
the wrong lineage.

The dashboard planning path now uses the same duplicate-safe creation
contract as agent tools, leaves reused canonical tasks untouched, and
exposes API-created parent links in task details.

Related: FN-8277

## Validation

- Core duplicate guard: 12 tests passed
- Engine task creation: 32 tests passed
- Dashboard planning routes: 4 focused tests passed
- Dashboard task detail provenance: 2 focused tests passed
- Core, engine, dashboard, and CLI typechecks passed
- Lint and strict changeset validation passed


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

## Summary by CodeRabbit

- **New Features**
- Preserved parent-task lineage for subtasks created through planning
breakdowns and API workflows.
- Improved duplicate detection so identical tasks from different parent
tasks can coexist safely.
  - Added parent-task links to API-created task provenance details.
  - Reused existing duplicates only within the same parent-task context.

- **Bug Fixes**
- Prevented duplicate handling from incorrectly archiving or skipping
tasks belonging to other parents.
  - Improved dependency handling when creating planned subtasks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-18 15:35:26 -07:00
gsxdsm
569abcc258 fix(ci): quarantine CLI bundle-output and dist-barrel load flakes (#2325)
## Summary
Quarantine `bundle-output.test.ts` and `extension-dist-barrel.test.ts`
after tip Full Suite shard 4 (run 29662476909) hit package-lane-only
desktop build ENOENT + 10s beforeAll timeout. Prior green Full Suite:
run 29662309385 on #2323.

## Test plan
- [ ] Full Suite all 4 shards green on main after merge
2026-07-18 15:29:02 -07:00
gsxdsm
cf1a5991aa fix: stop processing before returning tasks to Todo (#2322)
## Summary

Moving an active task back to Todo could update the board before its
agent and subprocesses had stopped, leaving a Todo card that was still
processing. User-initiated in-progress-to-Todo moves now wait for every
executor cancellation surface before the new column is persisted or
returned to the dashboard. Cancellation is fail-closed and bounded: a
wedged shutdown leaves the task in Progress, releases its lock for
recovery, and fences late cleanup from replacement execution
generations. Engine-driven recovery moves and other transitions retain
their existing behavior.

## Validation

- Confirmed with PostgreSQL-backed symptom tests that the durable row
stays in Progress while cancellation is pending and that a timeout
releases the task lock without publishing Todo.
- Verified multi-executor ownership and replacement-generation fencing
across focused core and engine tests: 18 tests passed.
- Core build, engine typecheck, targeted lint, and strict changeset
validation passed.

---

[![Compound
Engineering](https://img.shields.io/badge/Built_with-Compound_Engineering-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)
2026-07-18 14:54:54 -07:00
gsxdsm
6268433d37 fix(ci): parent-task uniqueness mocks, roadmap search index, flake quarantine (#2323)
## Summary
- FN-8277 parent-scoped uniqueness: mock
`findRecentTasksBySourceParentTaskId` in heartbeat/triage/split suites.
- FN-8326: index `reportRoadmapDedup` in Settings search.
- Quarantine re-flaked `dev-server-process` under full-suite API load
(run 29661202279).

## Test plan
- [x] Targeted createTask / search-index tests green locally
- [ ] Full Suite all 4 shards green on main after merge
2026-07-18 14:49:24 -07:00
gsxdsm
ca7bc3e46e refactor: package code organization wave 9 (#2274)
## Summary

Wave 9 of package code organization (plan:
`docs/plans/2026-07-14-001-refactor-package-code-organization-plan.md`),
after #2252.

### Peels
| New module | Parent |
|---|---|
| `app/api/global-and-pi-settings.ts` | `legacy.ts` |
| `app/api/task-content.ts` | `legacy.ts`
(attachments/logs/comments/docs/artifacts) |
| `types/messages.ts` | `types.ts` |
| `merger-diff-volume-gate` helpers | `merger.ts` |

Public paths stay stable via re-exports.

### LOC
- `legacy.ts` ~10561 → ~10269
- `types.ts` ~6998 → ~6937
- `merger.ts` ~11223 → ~11208

## Test plan
- [x] core/engine/dashboard typecheck (app)
- [x] eslint on peeled modules
- [x] api-tasks + memory/agent-log focused tests
- [ ] CI merge gate

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

* **New Features**
* Added dashboard API endpoints for global and project-scoped settings,
PI configuration, notification testing, and PI package
install/reinstall.
* Added task content APIs covering attachments, agent logs, session
files, task comments, task documents, artifacts, and project markdown
files.
* Added structured messaging contracts and participant/message
normalization.
* Added diff-volume gate settings resolution and formatted findings
output.
* **Refactor**
* Organized messaging and dashboard API surface into dedicated modules
via re-exports.
  * Removed a deprecated verification-output alias.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-18 14:42:59 -07:00
gsxdsm
1215c76d9a FN-8326: add roadmap report deduplication
Add an optional public-roadmap source for report deduplication.

- Add project settings and localized controls for roadmap matching.
- Resolve roadmap entries through the plugin API and stop strong duplicate reports before filing.
- Cover report pipeline, route, UI, and roadmap store behavior with tests.

Files changed:
 .changeset/fn-8326-roadmap-report-dedup.md         |  7 +++
 docs/dashboard-guide.md                            |  2 +
 docs/settings-reference.md                         |  1 +
 .../core/src/__tests__/settings-parity.test.ts     |  3 +
 packages/core/src/settings-schema.ts               |  1 +
 packages/core/src/types.ts                         |  6 ++
 packages/dashboard/app/components/ReportModal.tsx  | 11 +++-
 .../app/components/__tests__/ReportModal.test.tsx  | 14 +++++
 .../__tests__/SettingsModal.general.test.tsx       |  2 +
 .../settings/sections/GeneralSection.tsx           | 10 ++++
 .../settings-default-descriptions.test.tsx         |  1 +
 .../src/__tests__/report-pipeline.test.ts          | 31 +++++++++++
 .../src/__tests__/report-roadmap-source.test.ts    | 32 +++++++++++
 .../dashboard/src/__tests__/report-routes.test.ts  | 27 +++++++--
 packages/dashboard/src/index.ts                    |  1 +
 packages/dashboard/src/report-pipeline.ts          | 36 +++++++++++-
 packages/dashboard/src/report-roadmap-source.ts    | 64 ++++++++++++++++++++++
 .../dashboard/src/routes/register-report-routes.ts |  3 +
 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 +++-
 .../src/__tests__/roadmap-store-factory.test.ts    | 25 +++++++++
 .../src/routes/roadmap-routes.ts                   | 24 +-------
 plugins/fusion-plugin-roadmap/src/server/index.ts  | 34 ++++++++++++
 27 files changed, 360 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-8326

Fusion-Task-Lineage: e9731c3f-dd92-44ac-910b-0e0efbaaf288

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 14:23:14 -07:00
gsxdsm
589e2503a9 docs(FN-8280): index agent tool-surface audit 2026-07-18 14:21:41 -07:00
gsxdsm
7b1a89d1bc fix(core): join running embedded Postgres correctly
Read the live port from PostgreSQL's actual postmaster.pid field so extension TaskStore boot reuses the existing server instead of wedging on a colliding start.
2026-07-18 14:21:41 -07:00
gsxdsm
9bc0eb6943 fix(FN-8277): prevent replayed duplicate follow-up tasks (#2319)
## Summary

Repeated review and executor sessions could replay a follow-up creation
step and produce another live task whenever the wording changed. In the
incident behind this fix, 21 creation calls for three intended
follow-ups left 18 duplicate tasks.

Agent-created tasks now retain their parent and agent provenance across
step sessions, heartbeats, and the published CLI surface. Same-parent
paraphrases converge on the existing task through a serialized pre-check
and a database-backed intent claim, while distinct sibling actions
remain separate. Candidate lookup is parent-indexed, uniqueness failures
abort creation, and canonical reuse no longer emits misleading creation
audit events or workflow claims.

Related: FN-8277

## Validation

- Core duplicate guard and intake: 24 tests passed
- Engine task creation and heartbeat: 154 tests passed
- CLI extension: 66 tests passed, 95 skipped
- Core, engine, and CLI typechecks passed
- Core, engine, and CLI builds passed before rebase; the rebase was
conflict-free
- Scoped lint, strict changeset validation, and diff checks passed


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

* **Bug Fixes**
* Prevented retried agent steps from creating duplicate follow-up tasks.
* Improved parent-scoped deduplication for paraphrased follow-ups while
preserving distinct sibling actions.
  * Preserved parent-task and agent context for created follow-ups.
* Concurrent follow-up requests are now serialized/deduplicated so
duplicates link to the existing task instead of showing as newly
created.
* Updated agent follow-up/heartbeat activity so reused follow-ups no
longer appear in run results as fresh creations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-18 14:18:25 -07:00
gsxdsm
89b42ed1d6 fix(ci): ideation heartbeat tools, review-artifact i18n, tab-persist quarantine (#2321)
## Summary
- Heartbeat customTools inventory includes FN-8295 ideation tools (63
total).
- Non-en i18n parity for FN-8286 `reviewArtifacts` Command Center +
settings keys.
- Quarantine `TaskDetailModal.tab-persistence.test.tsx` (CI load flake;
green focused thrice).

## Test plan
- [x] heartbeat expected-tools case green
- [x] i18n-gate-coverage + parity green
- [ ] Full Suite all 4 shards green on main after merge
2026-07-18 14:13:28 -07:00
gsxdsm
bcdad279d7 FN-8289: add feature-video review artifacts
Add gated local feature-video capture to completed user-facing deliverables.

- Capture loopback scenario WebM recordings through the existing artifact registry.
- Keep recording failures non-blocking and cover gated, unsafe, and failed capture paths.
- Document the scenario contract and package the Playwright runtime dependency.

Files changed:
 .changeset/fn-8289-feature-video.md                |   7 +
 docs/workflow-steps.md                             |   8 +
 packages/cli/package.json                          |   3 +-
 packages/cli/tsup.config.ts                        |   7 +
 packages/engine/package.json                       |   3 +-
 .../__tests__/executor-review-artifacts.test.ts    |  44 ++++
 packages/engine/src/executor.ts                    |  33 +++
 .../src/review-artifacts/feature-video.test.ts     |  75 +++++++
 .../engine/src/review-artifacts/feature-video.ts   | 226 +++++++++++++++++++++
 packages/engine/src/review-artifacts/index.ts      |  10 +
 pnpm-lock.yaml                                     |   6 +
 11 files changed, 420 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-8289

Fusion-Task-Lineage: 8a34675a-2417-4669-a14a-b74c4aa99331

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 13:53:58 -07:00
gsxdsm
02ee8a4fd5 fix: hide stale task-card oversight icons (#2318)
## Summary

Task cards now remove the overseer eye as soon as their workflow's
effective oversight becomes `off`, instead of reusing an active value
cached before the setting changed.

The invalidation covers card remounts as well as mounted cards, and
authoritative writes from the dashboard, agents, and configuration
rollback reach the board through the existing project-scoped SSE stream.
Older in-flight responses cannot restore the eye after a newer `off`
value wins, while unrelated workflow-setting saves leave active
indicators undisturbed.

## Validation

- 99 focused dashboard regression tests passed across selected and
aggregate cards, desktop and mobile, SSE delivery, and out-of-order
responses
- Core and dashboard typechecks passed
- `pnpm lint` and `pnpm check:changesets` passed
- `pnpm verify:fast` passed production builds and the CLI/server boot
smoke


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

## Summary by CodeRabbit

- **Bug Fixes**
- Planner-overseer eye badges now disappear immediately when workflow
oversight is turned off.
- Prevented stale or out-of-order updates from displaying incorrect
oversight status.
- Oversight indicators now remain hidden when the effective setting
cannot be confirmed.
- Live workflow setting changes now update task cards without requiring
a page refresh.

- **Documentation**
- Clarified eye badge visibility rules, tooltip meaning, and active
oversight states in the dashboard guide.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-18 13:50:58 -07:00
gsxdsm
795d7454ec fix(ci): sync TaskDetail lucide mock and ideation schema bookkeeping (#2320)
## Summary
- Extend shared TaskDetailModal lucide mock for FN-8286
ArtifactsGallery/TaskReviewTab icons.
- Update schema-applier bookkeeping for FN-8295 ideation (93 project
tables, version 0022).
- Seed historical 0000 upgrade fixtures with missions/mission_features
stubs so ideation FKs apply after ownership rewrite.

## Test plan
- [x] TaskDetail modal suites + mock-coverage green locally
- [x] Full schema-applier suite (59 tests) green locally
- [ ] Full Suite all 4 shards green on main after merge
2026-07-18 13:45:44 -07:00
gsxdsm
e0d2fd6085 FN-8332: preserve planning session progress after reload
Restore persisted Planning Mode sessions without starting a new generation.

- Limit automatic retries to generations started by the current mounted UI
- Render saved questions, summaries, thinking, and errors with manual retry after reload or resume
- Cover desktop, mobile, stream, and polling recovery paths and document the behavior
- Add a patch changeset for the published package

Files changed:
 .changeset/fn-8332-planning-reload-resume.md       |   7 +
 docs/dashboard-guide.md                            |   4 +-
 .../dashboard/app/components/PlanningModeModal.tsx |  36 ++++-
 .../PlanningModeModal.planning-flow.test.tsx       | 175 +++++++++++++++++----
 4 files changed, 180 insertions(+), 42 deletions(-)

Fusion-Task-Id: FN-8332

Fusion-Task-Lineage: 6b128dc3-a091-4e81-bc6a-9c541d8e4cf5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 13:32:33 -07:00