Commit Graph

445 Commits

Author SHA1 Message Date
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
13f936eb7b FN-8286: add review artifact controls and galleries
Add configurable review-deliverable policies and surface eligible artifacts in review workflows.

- Add project and PROMPT.md review-artifact modes with task eligibility enforcement.
- Display video and live-demo deliverables in Task Review and Command Center galleries.
- Document, localize, and test the new review-artifact controls.

Files changed:
 .changeset/fn-8286-review-artifacts.md             |  7 ++
 docs/settings-reference.md                         |  1 +
 .../core/src/__tests__/review-artifacts.test.ts    | 53 +++++++++++++++
 .../core/src/__tests__/settings-parity.test.ts     |  5 ++
 packages/core/src/index.ts                         |  4 +-
 packages/core/src/settings-schema.ts               |  1 +
 packages/core/src/types.ts                         | 75 ++++++++++++++++++++++
 packages/core/src/types/execution-and-ui.ts        |  8 +++
 .../dashboard/app/components/TaskReviewTab.tsx     | 28 +++++++-
 .../__tests__/SettingsModal.general.test.tsx       |  8 +++
 .../components/__tests__/TaskReviewTab.test.tsx    | 27 ++++++++
 .../components/command-center/CommandCenter.tsx    |  5 ++
 .../command-center/areas/ReviewArtifactsArea.tsx   | 59 +++++++++++++++++
 .../areas/__tests__/ReviewArtifactsArea.test.tsx   | 39 +++++++++++
 .../app/components/settings/section-keys.ts        |  1 +
 .../settings/sections/GeneralSection.tsx           | 20 ++++++
 .../settings-default-descriptions.test.tsx         |  1 +
 .../src/__tests__/agent-artifact-tools.test.ts     | 19 +++++-
 packages/engine/src/agent-tools.ts                 | 26 ++++++++
 packages/i18n/locales/en/app.json                  |  7 ++
 packages/i18n/src/resources.d.ts                   |  7 ++
 21 files changed, 397 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-8286
Fusion-Task-Lineage: 357ccbe3-510d-4ffd-ba7c-6bf79fe40a09
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 13:09:38 -07:00
gsxdsm
551074537f FN-8331: require planning interview before summaries
Ensure Planning Mode collects mandatory user context before it can generate a plan.

- Reject and re-prompt first-turn completion responses until a clarifying question is available.
- Preserve the interview invariant for streaming sessions and legacy session rehydration.
- Update Planning Mode defaults, documentation, regression coverage, and release metadata.

Files changed:
 .changeset/fn-8331-planning-interview.md           |   7 +
 docs/dashboard-guide.md                            |   2 +-
 docs/settings-reference.md                         |   2 +-
 .../dashboard/app/components/PlanningModeModal.tsx |  10 +-
 .../PlanningModeModal.planning-flow.test.tsx       |   4 +-
 .../src/__tests__/routes-planning.test.ts          | 120 ++++++++++++++++-
 packages/dashboard/src/planning.ts                 | 145 ++++++++++++++-------
 7 files changed, 233 insertions(+), 57 deletions(-)

Fusion-Task-Id: FN-8331

Fusion-Task-Lineage: 6fc98f2e-f263-4830-b88c-e52d1ba6551f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 13:01:35 -07:00
gsxdsm
d5db5fd58d FN-8304: detect foreign issue-form content for translation
Recognize foreign GitHub and GitLab issue-form prose so import translation remains available.

- Remove issue-form scaffolding before content-language scoring.
- Identify Czech as unsupported foreign Latin content and offer translation.
- Cover automatic and manual translation paths with issue-form fixtures.
- Document the expanded import translation behavior and add a patch changeset.

Files changed:
 .changeset/fn-8304-issue-form-translation.md       |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 docs/settings-reference.md                         |   2 +-
 packages/core/src/detect-content-language.ts       |  66 ++++++++++--
 .../__tests__/GitHubImportAutoTranslate.test.tsx   |  42 +++++++-
 .../utils/__tests__/detectContentLanguage.test.ts  | 120 +++++++++++++++++++++
 .../src/__tests__/import-translate-service.test.ts |  56 ++++++++++
 7 files changed, 284 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-8304

Fusion-Task-Lineage: ef6ca70c-aa67-40ff-a23a-077940b5a5f0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 12:32:07 -07:00
gsxdsm
d593d87686 feat(FN-8064): make proactive task chat optional
Fusion-Task-Id: FN-8064
2026-07-18 12:21:08 -07:00
gsxdsm
e8c37b076e FN-8277: add in-app agentic reporting
Add guided in-app reporting that safely files or endorses GitHub issues and discussions.

- Add report actions, modal UI, API routes, and configurable per-action filing modes.
- Scrub report payloads, self-check Help requests, and deduplicate before filing or endorsing.
- Extend GitHub discussion support and cover the report pipeline with tests and documentation.

Files changed:
 .changeset/fn-8277-agentic-reports.md              |   7 +
 docs/dashboard-guide.md                            |   8 +
 docs/settings-reference.md                         |   2 +
 .../core/src/__tests__/settings-parity.test.ts     |   9 +
 packages/core/src/index.gate.ts                    |   2 +-
 packages/core/src/index.ts                         |   2 +-
 packages/core/src/settings-schema.ts               |   2 +
 packages/core/src/types.ts                         |  10 +
 packages/dashboard/app/api.ts                      |   1 +
 packages/dashboard/app/api/report.ts               |  11 +
 packages/dashboard/app/components/Header.tsx       |  30 +++
 .../dashboard/app/components/ReportActionMenu.css  |   6 +
 .../dashboard/app/components/ReportActionMenu.tsx  |  22 ++
 packages/dashboard/app/components/ReportModal.css  |   6 +
 packages/dashboard/app/components/ReportModal.tsx  |  81 ++++++++
 .../app/components/__tests__/Header.test.tsx       |   7 +-
 .../components/__tests__/ReportActionMenu.test.tsx |  18 ++
 .../app/components/__tests__/ReportModal.test.tsx  |  94 +++++++++
 .../__tests__/SettingsModal.general.test.tsx       |  15 ++
 .../settings/sections/GeneralSection.tsx           |  31 ++-
 .../src/__tests__/report-pipeline.test.ts          | 127 ++++++++++++
 .../dashboard/src/__tests__/report-routes.test.ts  |  51 +++++
 .../dashboard/src/__tests__/report-scrub.test.ts   |  47 +++++
 packages/dashboard/src/github.ts                   | 151 +++++++++++++-
 packages/dashboard/src/index.ts                    |   3 +
 packages/dashboard/src/report-help-selfcheck.ts    |  13 ++
 packages/dashboard/src/report-pipeline.ts          | 225 +++++++++++++++++++++
 packages/dashboard/src/report-scrub.ts             |  66 ++++++
 packages/dashboard/src/routes.ts                   |   2 +
 .../dashboard/src/routes/register-report-routes.ts | 118 +++++++++++
 30 files changed, 1156 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-8277
Fusion-Task-Lineage: d50dc1da-7534-4324-ab05-1f8a0ad77c6a
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 10:55:50 -07:00
gsxdsm
7c23771433 FN-8265: add task follow-up proposal creation
Enable configured ephemeral workers to propose and create follow-up tasks from mailbox messages.

- Add persisted task-proposal claim state, migrations, and async messaging APIs.
- Register task-proposal creation routes, SSE events, agent tool support, and CLI integration.
- Add mailbox creation controls, settings, documentation, localization, and regression coverage.

Files changed:
 .changeset/fn-8265-task-follow-up-policy.md        |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 docs/settings-reference.md                         |  12 ++-
 packages/cli/src/extension.ts                      |  34 ++++---
 .../src/__tests__/postgres/sqlite-migrator.test.ts |  14 ++-
 .../postgres/task-proposal-claim.pg.test.ts        |  51 +++++++++++
 packages/core/src/async-message-store.ts           |  39 ++++++++
 packages/core/src/index.gate.ts                    |   4 +-
 packages/core/src/index.ts                         |   4 +-
 packages/core/src/message-store.ts                 |  46 ++++++++++
 .../core/src/postgres/migrations/0000_initial.sql  |   2 +
 .../migrations/0020_task_proposal_claim.sql        |   4 +
 packages/core/src/postgres/schema-applier.ts       |  13 ++-
 packages/core/src/postgres/schema/project.ts       |   3 +
 packages/core/src/settings-schema.ts               |  19 +++-
 packages/core/src/task-store/async-persistence.ts  |   2 +-
 packages/core/src/task-store/persistence.ts        |   4 +-
 packages/core/src/task-store/serialization.ts      |   1 +
 packages/core/src/task-store/task-creation.ts      |  51 +++++++++++
 packages/core/src/task-store/task-row-mappers.ts   |   2 +-
 packages/core/src/types.ts                         |  56 +++++++++++-
 packages/dashboard/app/api/legacy.ts               |   5 +
 packages/dashboard/app/components/MailboxModal.tsx |   4 +
 .../app/components/MailboxTaskProposal.css         |   3 +
 .../app/components/MailboxTaskProposal.tsx         |  33 +++++++
 packages/dashboard/app/components/MailboxView.tsx  |   4 +
 .../__tests__/MailboxTaskProposal.test.tsx         |  43 +++++++++
 .../app/components/settings/section-keys.ts        |   2 +-
 .../settings/sections/GeneralSection.search.ts     |  13 ++-
 .../settings/sections/GeneralSection.tsx           |  22 +++--
 .../settings-default-descriptions.test.tsx         |   4 +-
 .../routes/__tests__/task-proposal-routes.test.ts  |  99 ++++++++++++++++++++
 .../src/routes/register-messaging-scripts.ts       | 101 +++++++++++++++++++++
 packages/dashboard/src/sse.ts                      |   7 ++
 packages/engine/src/agent-tools.ts                 |  30 ++++--
 packages/engine/src/executor.ts                    |   9 +-
 packages/engine/src/step-session-executor.ts       |   8 +-
 packages/i18n/locales/en/app.json                  |   5 +
 38 files changed, 696 insertions(+), 66 deletions(-)

Fusion-Task-Id: FN-8265

Fusion-Task-Lineage: 4e864a2f-3485-4a54-8be7-1699b5479a94

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-18 03:48:38 -07:00
gsxdsm
44c784264a FN-8237: refine mobile footer quick actions
Make mobile footer quick actions configurable, reorderable, and immediately applied.

- Expand the selectable quick-action universe and preserve valid configured items.
- Add General settings controls for reordering, adding, and removing footer actions.
- Wire updated navigation settings through the dashboard and document the behavior.

Files changed:
 .../fn-8237-mobile-nav-quick-actions-refinement.md |   7 +
 docs/dashboard-guide.md                            |   2 +-
 docs/settings-reference.md                         |   2 +-
 .../src/__tests__/mobile-nav-primary-items.test.ts |  17 +-
 packages/core/src/mobile-nav-primary-items.ts      |  44 ++-
 packages/dashboard/app/App.tsx                     |   4 +-
 packages/dashboard/app/components/AppModals.tsx    |   2 +
 packages/dashboard/app/components/MobileNavBar.tsx | 319 ++++-----------------
 .../dashboard/app/components/SettingsModal.tsx     |   4 +
 .../app/components/__tests__/MobileNavBar.test.tsx |  18 +-
 .../__tests__/SettingsModal.general.test.tsx       |  20 ++
 .../dashboard/app/components/dashboard/MainContent.tsx |   2 +
 .../dashboard/app/components/dashboard/types.ts    |   1 +
 .../settings/sections/GeneralSection.tsx           |  75 ++---
 packages/dashboard/app/hooks/useAppSettings.ts     |  11 +
 packages/i18n/locales/en/app.json                  |   5 +-
 16 files changed, 220 insertions(+), 313 deletions(-)

Fusion-Task-Id: FN-8237

Fusion-Task-Lineage: cff91b30-7ef9-4557-8880-cc71ed74dafb

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-17 13:45:41 -07:00
gsxdsm
2f7da57601 FN-8230: translate GitHub import issues across pages
GitHub import auto-translation now covers every reachable issue page within the fetch cap.

- Translate and retain per-page results while invalidating changed or reloaded issues
- Raise the translation budget for a 300-issue traversal and cover pagination regressions
- Document the GitHub-only pagination behavior and add a patch changeset

Files changed:
 .changeset/fn-8230-import-translate-pagination.md  |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 docs/settings-reference.md                         |   4 +-
 .../dashboard/app/components/GitHubImportModal.tsx |  33 ++++++---
 .../components/GitHubImportTranslateControls.tsx   |  80 ++++++++++++---------
 .../__tests__/GitHubImportAutoTranslate.test.tsx   |  66 ++++++++++++-----
 .../__tests__/GitHubImportModal.test.tsx           |  32 +++++++++
 .../dashboard/src/__tests__/ai-translate.test.ts   |  20 ++++++
 packages/dashboard/src/ai-translate.ts             |   6 +-
 packages/dashboard/src/import-translate-service.ts | Bin 11109 -> 11099 bytes
 10 files changed, 186 insertions(+), 64 deletions(-)

Fusion-Task-Id: FN-8230

Fusion-Task-Lineage: 2c3ce6f6-a8f3-46a9-b93a-0192f0cdaf54

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-17 13:31:42 -07:00
gsxdsm
67fac31f5c FN-8202: prevent mDNS hostname conflicts
Prevent self-conflicting mDNS advertisements and allow automatic LAN discovery to be disabled.

- Advertise a Fusion-owned DNS-SD hostname derived from the node ID.
- Add a global automatic LAN discovery opt-out for dashboard and serve.
- Cover hostname isolation and discovery startup behavior with tests and documentation.

Files changed:
 .changeset/fn-8202-mdns-hostname-fix.md            |  7 +++++
 docs/settings-reference.md                         |  1 +
 docs/shared-mesh-protocol.md                       |  2 +-
 .../cli/src/commands/__tests__/dashboard.test.ts   | 24 ++++++++++++++++
 packages/cli/src/commands/__tests__/serve.test.ts  | 12 ++++++++
 packages/cli/src/commands/dashboard.ts             | 24 +++++++++++-----
 packages/cli/src/commands/serve.ts                 | 24 +++++++++++-----
 packages/core/src/__tests__/node-discovery.test.ts | 32 +++++++++++++++++++++-
 .../core/src/__tests__/settings-defaults.test.ts   |  8 ++++++
 packages/core/src/node-discovery.ts                | 31 +++++++++++++++++++++
 packages/core/src/settings-schema.ts               |  5 ++++
 packages/core/src/types.ts                         |  2 ++
 12 files changed, 156 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-8202

Fusion-Task-Lineage: c1d6e36b-bda7-4968-b40c-c14e16ebda28

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-17 09:54:44 -07:00
gsxdsm
d6860b5b76 FN-8204: add configurable mobile footer quick actions
Add an ordered project setting for mobile footer quick-action destinations.

- Render selected destinations as primary mobile tabs and retain omitted choices in More.
- Provide settings controls, validation, translations, documentation, and regression coverage.
- Add a minor changeset for the published CLI package.

Files changed:
 .changeset/fn-8204-mobile-nav-primary-items.md     |   7 +
 docs/dashboard-guide.md                            |   4 +
 docs/settings-reference.md                         |   4 +
 .../src/__tests__/mobile-nav-primary-items.test.ts |  23 +++
 packages/core/src/index.ts                         |   9 ++
 packages/core/src/mobile-nav-primary-items.ts      |  55 +++++++
 packages/core/src/settings-schema.ts               |   1 +
 packages/core/src/types.ts                         |   7 +
 packages/dashboard/app/App.tsx                     |   2 +
 .../mobile-feature-access-regression.test.tsx      |  19 +++
 packages/dashboard/app/components/MobileNavBar.tsx | 159 +++++----------------
 .../app/components/__tests__/MobileNavBar.test.tsx |  16 +++
 .../app/components/settings/section-keys.ts        |   1 +
 .../settings/sections/GeneralSection.search.ts     |   9 ++
 .../settings/sections/GeneralSection.tsx           |  45 ++++++
 .../settings-default-descriptions.test.tsx         |   1 +
 packages/dashboard/app/hooks/useAppSettings.ts     |   5 +
 packages/i18n/locales/en/app.json                  |   4 +
 18 files changed, 244 insertions(+), 127 deletions(-)

Fusion-Task-Id: FN-8204

Fusion-Task-Lineage: 077de4c4-d281-401d-bddd-e5ce8e91d4ab

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-17 09:27:33 -07:00
gsxdsm
5f70447a62 FN-8108: require resolution for triage duplicate tasks
Require explicit resolution for triage-detected duplicate tasks.

- Add configurable prompt, keep, and delete handling for explicit duplicate markers.
- Surface linked duplicate decisions in task details and scheduling settings.
- Preserve task failure provenance and strengthen lifecycle recovery coverage.

Files changed:
 .changeset/blocked-park-survives-graph-teardown.md |   7 +
 .changeset/failure-provenance-promoter-marker.md   |   7 +
 .changeset/fn-8108-triage-duplicate-resolution.md  |   7 +
 .changeset/veto-progressing-does-not-clear.md      |   7 +
 docs/settings-reference.md                         |   2 +
 .../completed-promotion-failure-provenance.test.ts |  31 +++
 .../core/src/__tests__/duplicate-intake.test.ts    |  11 ++
 .../src/completed-promotion-failure-provenance.ts  |  38 +++-
 packages/core/src/duplicate-intake.ts              |  29 +++
 packages/core/src/index.gate.ts                    |   1 +
 packages/core/src/index.ts                         |   3 +-
 packages/core/src/settings-schema.ts               |   1 +
 packages/core/src/types.ts                         |   6 +
 .../dashboard/app/components/TaskDetailModal.tsx   |  38 +++-
 .../__tests__/TaskDetailModal.rendering.test.tsx   |  26 +++
 .../settings/sections/SchedulingSection.search.ts  |   9 +
 .../settings/sections/SchedulingSection.tsx        |  15 ++
 .../__tests__/routes-tasks-near-duplicate.test.ts  |  31 +++
 .../src/routes/register-task-workflow-routes.ts    |  19 ++
 .../__tests__/executor-task-done-blocked.test.ts   | 212 ++++++++++++++++++++-
 packages/engine/src/__tests__/merger-ai.test.ts    |  56 +++++-
 .../__tests__/overseer-noop-finalize-veto.test.ts  |  64 ++++++-
 .../explicit-duplicate-marker-sweep.test.ts        |  19 +-
 packages/engine/src/__tests__/self-healing.test.ts |  53 ++++++
 .../triage-explicit-duplicate-marker.test.ts       |  22 ++-
 packages/engine/src/executor.ts                    |  30 +++
 packages/engine/src/merger-ai.ts                   |   5 +-
 packages/engine/src/overseer-noop-finalize-veto.ts | 148 ++++++++++----
 packages/engine/src/self-healing.ts                |  29 ++-
 packages/engine/src/triage.ts                      |  58 +++---
 packages/i18n/locales/en/app.json                  |  15 +-
 packages/i18n/src/resources.d.ts                   |  13 +-
 32 files changed, 897 insertions(+), 115 deletions(-)

Fusion-Task-Id: FN-8108

Fusion-Task-Lineage: 8e732bad-d418-426e-85e1-903a7f990fba

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 22:11:35 -07:00
gsxdsm
e72629c251 FN-8126: add per-task merger model controls
Enable Quick Add and task editing to select merger models and thinking levels.

- Persist merger model and thinking overrides through task APIs, storage, and PostgreSQL migrations.
- Add merger-lane selection controls to Quick Add and model settings interfaces.
- Apply task merger settings to merger and PR fallback sessions, with regression coverage.
- Document the merger lane and include a release changeset.

Files changed:
 .changeset/fn-8126-quick-add-merger-lane.md        |   7 ++
 docs/dashboard-guide.md                            |   2 +
 docs/settings-reference.md                         |   7 +-
 .../core/src/__tests__/model-resolution.test.ts    |   9 ++
 packages/core/src/index.gate.ts                    |   1 +
 packages/core/src/index.ts                         |   1 +
 packages/core/src/model-resolution.ts              |  20 ++++
 .../core/src/postgres/migrations/0000_initial.sql  |   3 +
 .../migrations/0017_task_merger_model_lane.sql     |   4 +
 packages/core/src/postgres/schema-applier.ts       |  14 ++-
 packages/core/src/postgres/schema/project.ts       |   3 +
 packages/core/src/store.ts                         |   2 +-
 .../core/src/task-store/archive-lifecycle-2.ts     |   6 ++
 packages/core/src/task-store/persistence.ts        |   6 ++
 packages/core/src/task-store/remaining-ops-2.ts    |   4 +-
 packages/core/src/task-store/remaining-ops-6.ts    |   2 +-
 packages/core/src/task-store/serialization.ts      |   6 ++
 packages/core/src/task-store/task-creation.ts      |   6 ++
 packages/core/src/task-store/task-row-mappers.ts   |   4 +-
 packages/core/src/task-store/task-update.ts        |   6 ++
 packages/core/src/types.ts                         |  18 ++++
 packages/dashboard/app/api/tasks.ts                |  13 +++
 .../dashboard/app/components/InlineCreateCard.tsx  |  33 ++++++-
 .../app/components/ModelSelectionModal.tsx         |  29 ++++++
 .../dashboard/app/components/ModelSelectorTab.tsx  | 101 +++++++++++++++++++--
 .../dashboard/app/components/QuickEntryBox.tsx     |  44 +++++++--
 .../__tests__/ModelSelectionModal.test.tsx         |  20 ++++
 .../components/__tests__/ModelSelectorTab.test.tsx |  37 +++++++-
 .../src/routes/register-task-workflow-routes.ts    |  27 +++++-
 .../src/__tests__/agent-session-helpers.test.ts    |   8 ++
 packages/engine/src/agent-session-helpers.ts       |  16 +++-
 packages/engine/src/merger-ai.ts                   |  14 +--
 packages/engine/src/merger.ts                      |  35 ++++---
 packages/engine/src/pr-response-run-ops.ts         |   7 +-
 34 files changed, 451 insertions(+), 64 deletions(-)

Fusion-Task-Id: FN-8126

Fusion-Task-Lineage: 3fc81801-6d77-4e11-9cf0-3af37313930e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 21:07:06 -07:00
gsxdsm
c449379d00 FN-8172: persist import translations across restarts
Persist GitHub and GitLab import translation caches across application restarts.

- Normalize cache ownership scope for reads, writes, pruning, and PostgreSQL RLS
- Add forward migration 0016 to repair existing cache table partitioning
- Cover durable cache reuse and migration behavior with PostgreSQL and service tests

Files changed:
 .changeset/github-translation-cache-persistence.md |   7 ++
 docs/settings-reference.md                         |   2 +-
 .../postgres/import-translation-cache.pg.test.ts   | 105 +++++++++++++++++++++
 .../src/__tests__/postgres/schema-applier.test.ts  |  84 +++++++++++++++--
 .../migrations/0010_import_translation_cache.sql   |   6 +-
 .../0016_import_translation_cache_scope_fix.sql    |  50 ++++++++++
 packages/core/src/postgres/schema-applier.ts       |  29 +++++-
 packages/core/src/postgres/schema/project.ts       |   8 +-
 packages/core/src/task-store/remaining-ops-8.ts    |  21 +++--
 .../src/__tests__/import-translate-service.test.ts |  32 ++++++-
 packages/dashboard/src/import-translate-service.ts | Bin 10392 -> 11109 bytes
 11 files changed, 323 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-8172

Fusion-Task-Lineage: b3d18f58-dc0b-47e4-a1bf-acb8b2360869

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 18:46:36 -07:00
gsxdsm
fd036665ae FN-8123: add agent clarification notifications
Add agent clarification notices with ntfy delivery and mailbox support.

- Add configurable clarification ntfy topics and notification settings
- Route agent clarification requests to ntfy and the planning mailbox
- Update planning dialogs, translations, documentation, and regression tests

Files changed:
 .changeset/fn-8123-agent-clarification.md          |   7 +
 docs/dashboard-guide.md                            |   6 +
 docs/settings-reference.md                         |   1 +
 .../core/src/__tests__/global-settings.test.ts     |  11 +
 packages/core/src/settings-schema.ts               |   2 +
 packages/core/src/types.ts                         |   6 +
 .../app/__tests__/settings-save-split.test.ts      |  13 ++
 packages/dashboard/app/api/legacy.ts               |   3 +-
 .../dashboard/app/components/PlanningModeModal.tsx |  29 ++-
 .../dashboard/app/components/SettingsModal.tsx     |   1 +
 .../__tests__/PlanningModeModal.initial.test.tsx   |  17 +-
 .../app/components/settings/save-split.ts          |   1 +
 .../settings/sections/NotificationsSection.tsx     |  11 +
 .../src/__tests__/routes-planning.test.ts          |   7 +-
 packages/dashboard/src/planning.ts                 | 228 ++++++++++++++++-----
 .../src/routes/register-planning-subtask-routes.ts |  59 +++++-
 packages/i18n/locales/en/app.json                  |   4 +
 packages/i18n/src/resources.d.ts                   |   4 +
 18 files changed, 346 insertions(+), 64 deletions(-)

Fusion-Task-Id: FN-8123

Fusion-Task-Lineage: cf397749-01c6-44d6-8d12-8ce7f5627c29

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 16:51:19 -07:00
gsxdsm
c6be0b158b FN-8129: centralize database backup settings
Move database backup policy and scheduling to shared global configuration.

- Split project memory backups from cluster-wide database backup settings.
- Migrate legacy backup values and routines safely into central global storage.
- Schedule and dispatch one shared PostgreSQL backup routine across project engines.

Files changed:
 .changeset/fn-8129-backup-settings-scope-split.md  |   7 +
 docs/dashboard-guide.md                            |   2 +
 docs/settings-reference.md                         |  10 +-
 packages/cli/src/commands/backup.ts                |   3 +-
 .../__tests__/backup-settings-migration.test.ts    |  50 ++++++
 .../src/__tests__/backup-settings-scope.test.ts    |  27 +++
 packages/core/src/backup-settings-migration.ts     | 188 +++++++++++++++++++++
 packages/core/src/backup.ts                        |  77 +++++----
 packages/core/src/global-routine-store.ts          | 104 ++++++++++++
 packages/core/src/index.gate.ts                    |   6 +-
 packages/core/src/index.ts                         |   6 +-
 .../core/src/postgres/migrations/0000_initial.sql  |  19 +++
 .../postgres/migrations/0015_global_routines.sql   |  19 +++
 packages/core/src/postgres/schema-applier.ts       |  19 ++-
 packages/core/src/postgres/schema/central.ts       |  21 ++-
 packages/core/src/postgres/startup-factory.ts      |  11 ++
 packages/core/src/settings-schema.ts               |  14 +-
 packages/core/src/types.ts                         |  31 +++-
 .../dashboard/app/components/SettingsModal.tsx     |  10 +-
 .../settings/__tests__/section-keys.test.ts        |   1 +
 .../app/components/settings/save-split.ts          |   2 +
 .../search/__tests__/settings-search-index.test.ts |   1 +
 .../settings/search/entries.ts                     |   2 +
 .../app/components/settings/section-keys.ts        |   4 -
 .../settings/sections/BackupsSection.search.ts     |  40 -----
 .../settings/sections/BackupsSection.tsx           | 112 +-----------
 .../sections/DatabaseBackupsSection.search.ts      |  51 ++++++
 .../settings/sections/DatabaseBackupsSection.tsx   | 142 ++++++++++++++++
 .../settings-default-descriptions.test.tsx         |   1 +
 packages/dashboard/src/routes.ts                   |  12 +-
 .../src/routes/register-settings-memory-routes.ts  |  41 ++---
 .../engine/src/__tests__/routine-scheduler.test.ts |  55 +++++-
 packages/engine/src/cron-runner.ts                 |   4 +-
 packages/engine/src/routine-runner.ts              |  67 +++++---
 packages/engine/src/routine-scheduler.ts           |  35 +++-
 35 files changed, 929 insertions(+), 265 deletions(-)

Fusion-Task-Id: FN-8129

Fusion-Task-Lineage: af17f39a-7f1c-40ff-8a4a-cd63895cd532

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 16:34:09 -07:00
gsxdsm
edc64138e0 feat(worktrees): task-pinned worktrees under worktreeNaming "task-id" (#2233)
## Summary

Adds **task-pinned worktrees** for `worktreeNaming: "task-id"`. Under
task-id naming, a task is pinned to exactly one derivable directory
`<worktreesDir>/<lowercased-task-id>` (e.g. `.worktrees/fn-7996`) for
its entire lifecycle — removing the ambiguity that let stale/foreign
`task.worktree` pointers strand a task (the FN-7996 shape).

`recycleWorktrees` stays fully functional and is **mutually exclusive**
with task-id pinning: the two can't be enabled together.

## Behavior

- **Pinned acquisition (`worktreeNaming: "task-id"`, recycling off):**
`acquireTaskWorktree` runs **derive → validate → reuse-or-recreate** at
the derived path — warm-reuse when the dir is a registered, usable
worktree on the task's own branch; otherwise reclaim-in-place
(`removeWorktree` + recreate at the SAME path, never a sibling name). A
disagreeing `task.worktree` cache self-corrects and emits a new
`worktree:pin-rederived` audit event, without consuming worktree-session
retries. The recycle pool is never consulted in pinned mode.
- **Mutual exclusivity:** enabling both `recycleWorktrees` and
`worktreeNaming: "task-id"` is rejected at the settings-write boundary —
HTTP 400 at `PUT /settings`, and an `Error` backstop in
`store.updateSettings` covering the CLI and every other writer
(`assertWorktreeNamingRecycleExclusive`). The runtime also gates pinned
mode on `!recycleWorktrees`, so a legacy on-disk config carrying both
degrades safely to recycling.
- **Settings UI:** the Settings → Worktrees panel enforces the
exclusivity bidirectionally — the *Recycle worktrees* toggle is disabled
while naming is *Task ID*, and the naming select is disabled while
recycling is on — so the conflicting state is unreachable, with help
text explaining why.
- **Byte-inert for the rest:** `random`/`task-title` naming and the
recycle pool (incl. `merger.ts` release) are unchanged;
worktrunk-managed layouts bypass pinning.

## Acceptance criteria (from the plan)

1. ✅ Pinned task dispatched N times only ever touches
`<worktreesDir>/<task-id>` on its own branch
2. ✅ No code path can hand task A's dir to task B (pool bypassed; path
derived from task id)
3. ✅ FN-7996 stale/foreign `task.worktree` self-corrects at next
dispatch (`worktree:pin-rederived`) without consuming session retries
4. ✅ Non-pinned modes with `recycleWorktrees: true|false` are
byte-identical (existing pool tests pass unchanged)
5. ✅ Stale same-name dir (crash leftover / archive→restore) reclaimed in
place, never suffixed
6. ✅ Docs updated (settings-reference, architecture, `worktreeNaming`
type doc); changeset (`minor`, `feature`); FNXC comments encode the
invariant

## Files

- `packages/engine/src/worktree-pinning.ts` — new pure helpers
(`isTaskPinnedWorktreeNaming`, `pinnedWorktreePathForTask`)
- `packages/engine/src/worktree-acquisition.ts` — pinned branch +
branch-match reclaim-in-place
- `packages/engine/src/run-audit.ts` — `worktree:pin-rederived` audit
type
- `packages/core/src/settings-validation.ts` (+ `index.ts`,
`task-store/settings-ops.ts`) — mutual-exclusion validator + wiring
- `packages/dashboard/src/routes/register-settings-memory-routes.ts` —
400 on conflict
-
`packages/dashboard/app/components/settings/sections/WorktreesSection.tsx`
(+ `packages/i18n/locales/en/app.json`) — bidirectional UI exclusivity
- `packages/core/src/types.ts`, `docs/*`, `.changeset/*`

## Verification

- New tests: engine `worktree-pinning` (5) +
`worktree-acquisition-pinned` (7); core
`worktree-naming-recycle-exclusive` (2); dashboard settings-route 400
(3) + WorktreesSection UI exclusivity (3)
- Regression sweep green: 194 engine
worktree/acquisition/pool/executor/merger-release tests, core settings
tests, dashboard i18n/settings-section tests
- `tsc --noEmit` clean for `@fusion/core` and `@fusion/engine`; changed
source files clean; eslint clean
- `pnpm verify:fast` PASS (build + scoped typecheck + boot smoke)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

## Summary by CodeRabbit

* **New Features**
* Added Task ID worktree naming, providing each task with a stable,
deterministic worktree directory.
* Automatically reuses valid pinned worktrees and recreates stale or
conflicting ones at the same path.
* Added clear settings controls and validation for incompatible Task ID
naming and worktree recycling options.

* **Documentation**
* Updated worktree architecture, settings reference, and in-app guidance
to explain pinned worktrees and configuration constraints.

* **Bug Fixes**
* Improved recovery from stale or incorrect worktree assignments without
consuming session retries.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 15:37:42 -07:00
gsxdsm
d870878a23 FN-7998: add executor alternate model escalation
Add opt-in executor escalation after same-model tool-failure retries are exhausted.

- Persist escalation settings and one-shot task state across SQLite and PostgreSQL stores.
- Retry once on a configured alternate model or scheduler node and audit escalation outcomes.
- Expose escalation controls, documentation, translations, migration, and regression coverage.

Files changed:
 .changeset/fn-7998-executor-escalation.md          |   7 ++
 AGENTS.md                                          |   1 +
 docs/settings-reference.md                         |  13 ++-
 .../core/src/__tests__/settings-defaults.test.ts   |  23 ++++-
 packages/core/src/in-review-stall.ts               |  29 ++++++
 packages/core/src/index.gate.ts                    |   3 +-
 packages/core/src/index.ts                         |   3 +-
 packages/core/src/manual-retry-reset.ts            |   1 +
 .../0014_executor_escalation_attempt.sql           |   2 +
 packages/core/src/postgres/schema-applier.ts       |  17 ++++
 packages/core/src/postgres/schema/project.ts       |   1 +
 packages/core/src/settings-schema.ts               |   4 +
 packages/core/src/store.ts                         |   2 +-
 packages/core/src/task-store/persistence.ts        |   2 +
 packages/core/src/task-store/remaining-ops-2.ts    |   2 +-
 packages/core/src/task-store/remaining-ops-3.ts    |   2 +-
 packages/core/src/task-store/remaining-ops-6.ts    |   2 +-
 packages/core/src/task-store/serialization.ts      |   1 +
 packages/core/src/task-store/task-update.ts        |   2 +
 packages/core/src/types.ts                         |  13 +++
 .../dashboard/app/components/SettingsModal.tsx     |  12 +++
 .../app/components/settings/section-keys.ts        |   4 +
 .../settings/sections/SchedulingSection.search.ts  |  36 +++++++
 .../settings/sections/SchedulingSection.tsx        |   6 ++
 .../settings-default-descriptions.test.tsx         |   4 +
 .../__tests__/executor-tool-failure-retry.test.ts  |  91 +++++++++++++++++-
 packages/engine/src/executor.ts                    | 104 +++++++++++++++++++--
 packages/i18n/locales/en/app.json                  |   8 ++
 28 files changed, 376 insertions(+), 19 deletions(-)

Fusion-Task-Id: FN-7998

Fusion-Task-Lineage: bbce767d-c61a-4667-be62-abc0cc54d8be

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 14:31:59 -07:00
gsxdsm
60b6e3e048 FN-7996: add configurable executor tool-failure retries
Add bounded, durable same-model retry handling for qualifying consecutive executor tool errors.
- Persist retry claims, cursors, and audit markers with PostgreSQL migrations.
- Expose project retry count, backoff, and failure threshold settings in the dashboard.
- Cover retry, exhaustion, reset, and stale-run safety behavior with tests.

Files changed:
 .changeset/fn-7996-executor-tool-failure-retry.md  |   7 +
 AGENTS.md                                          |   1 +
 docs/architecture.md                               |   1 +
 docs/settings-reference.md                         |  10 ++
 .../executor-tool-failure-retry-claim.test.ts      |  17 +++
 .../core/src/__tests__/manual-retry-reset.test.ts  |   3 +
 .../core/src/__tests__/settings-defaults.test.ts   |  15 +-
 packages/core/src/in-review-stall.ts               |  20 +++
 packages/core/src/index.gate.ts                    |   6 +
 packages/core/src/index.ts                         |   6 +
 packages/core/src/manual-retry-reset.ts            |   3 +
 .../0013_executor_tool_failure_retry.sql           |   4 +
 packages/core/src/postgres/schema-applier.ts       |  17 +++
 packages/core/src/postgres/schema/project.ts       |   3 +
 packages/core/src/settings-schema.ts               |   3 +
 packages/core/src/store.ts                         |  10 +-
 packages/core/src/task-store/persistence.ts        |   7 +
 packages/core/src/task-store/remaining-ops-2.ts    |   2 +-
 packages/core/src/task-store/remaining-ops-3.ts    |   2 +-
 packages/core/src/task-store/remaining-ops-6.ts    |  65 ++++++++-
 packages/core/src/task-store/serialization.ts      |   3 +
 packages/core/src/task-store/task-update.ts        |   6 +
 packages/core/src/types.ts                         |  16 +++
 .../dashboard/app/components/SettingsModal.tsx     |  15 ++
 .../app/components/settings/section-keys.ts        |   3 +
 .../settings/sections/SchedulingSection.search.ts  |  27 ++++
 .../settings/sections/SchedulingSection.tsx        |   4 +
 .../settings-default-descriptions.test.tsx         |   3 +
 .../__tests__/executor-tool-failure-retry.test.ts  | 160 +++++++++++++++++++++
 packages/engine/src/executor.ts                    |  87 ++++++++++-
 packages/i18n/locales/en/app.json                  |   6 +
 31 files changed, 523 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-7996
Fusion-Task-Lineage: d1682ef8-534c-410e-b74c-1f2cf176eac2
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 13:41:14 -07:00
gsxdsm
d4914eb8b3 FN-8127: fix embedded PostgreSQL backups
Enable backup managers to resolve active embedded PostgreSQL runtime URLs safely.

- Track embedded backend URLs with generation-aware lifecycle leases.
- Keep backup resolution current through owner shutdown and joiner release.
- Document PostgreSQL client-tool requirements and add regression coverage.

Files changed:
 .changeset/fn-8127-embedded-backup.md              |   7 ++
 docs/settings-reference.md                         |   3 +
 packages/core/src/__tests__/backup.test.ts         | 115 ++++++++++++++++++++
 packages/core/src/backup.ts                        |  17 ++-
 packages/core/src/index.gate.ts                    |   9 ++
 packages/core/src/index.ts                         |   9 ++
 .../core/src/postgres/active-backend-registry.ts   | 119 +++++++++++++++++++++
 packages/core/src/postgres/embedded-lifecycle.ts   |   5 +
 packages/core/src/postgres/index.ts                |   9 ++
 packages/core/src/postgres/startup-factory.ts      | 118 +++++++++++++++++---
 10 files changed, 389 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-8127

Fusion-Task-Lineage: 6125be5c-d1d5-4228-a6b1-290311de70d9

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 13:09:48 -07:00
gsxdsm
1a337df5e9 FN-8098: add executor model fallback
Add workflow-specific executor fallback configuration and bounded recovery.

- Add executor fallback provider, model, and thinking settings across core schemas and settings UI.
- Route executor, heartbeat, child, and workflow-step sessions through the executor fallback resolver.
- Retry the primary model after fallback failure before reporting terminal exhaustion.
Files changed:

 .changeset/fn-8098-model-fallback.md               |  7 +++
 docs/settings-reference.md                         |  7 ++-
 .../core/src/__tests__/model-resolution.test.ts    | 13 ++++
 .../core/src/__tests__/settings-parity.test.ts     |  5 ++
 packages/core/src/builtin-workflow-settings.ts     | 24 +++++++
 packages/core/src/index.gate.ts                    |  1 +
 packages/core/src/index.ts                         |  1 +
 packages/core/src/model-resolution.ts              | 21 +++++++
 packages/core/src/settings-schema.ts               |  3 +
 packages/core/src/types.ts                         | 11 ++++
 .../app/components/WorkflowSettingsPanel.tsx       |  8 +++
 .../settings/sections/ProjectModelsSection.tsx     | 10 ++-
 packages/engine/src/__tests__/pi.test.ts           | 14 ++++-
 packages/engine/src/agent-session-helpers.ts       |  7 ++-
 packages/engine/src/executor.ts                    | 48 +++++++-------
 packages/engine/src/pi.ts                          | 73 ++++++++--------------
 packages/engine/src/step-session-executor.ts       |  8 ++-
 17 files changed, 180 insertions(+), 81 deletions(-)

Fusion-Task-Id: FN-8098

Fusion-Task-Lineage: 61b3103b-357b-431a-8d58-411e7806b87b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 08:33:57 -07:00
gsxdsm
f63818a6e9 FN-8072: add critical-action confirmation skip setting
Add a global operator preference that bypasses centralized critical-action confirmation dialogs.

- Add a global-only skipConfirmationDialogs setting and Settings toggle
- Return primary/default confirmation results without rendering dialogs when enabled
- Route task reset actions through the centralized confirmation seam and add coverage
- Document the setting and add a minor changeset

Files changed:
 .changeset/fn-8072-skip-confirmation-dialogs.md    |  7 +++++
 docs/settings-reference.md                         |  1 +
 .../core/src/__tests__/settings-defaults.test.ts   | 12 ++++++++-
 packages/core/src/settings-schema.ts               |  5 ++++
 packages/core/src/types.ts                         |  5 ++++
 packages/dashboard/app/App.tsx                     | 11 ++++----
 packages/dashboard/app/components/ListView.tsx     | 20 +++++++++++----
 packages/dashboard/app/components/TaskCard.tsx     | 22 +++++++++++-----
 .../dashboard/app/components/TaskDetailModal.tsx   | 26 +++++++++++--------
 .../app/components/__tests__/ListView.test.tsx     | 13 ++++++++++
 .../__tests__/SettingsModal.general.test.tsx       | 19 ++++++++++++++
 .../app/components/__tests__/TaskCard.test.tsx     | 17 ++++++++++++
 .../components/__tests__/TaskDetailModal.test.tsx  | 25 ++++++++++++++++++
 .../app/components/settings/save-split.ts          |  1 +
 .../sections/GlobalGeneralSection.search.ts        | 10 ++++++++
 .../settings/sections/GlobalGeneralSection.tsx     | 10 ++++++++
 .../settings-default-descriptions.test.tsx         |  1 +
 .../app/hooks/__tests__/useConfirm.test.ts         | 30 ++++++++++++++++++++++
 packages/dashboard/app/hooks/useAppSettings.ts     |  4 +++
 packages/dashboard/app/hooks/useConfirm.ts         | 21 ++++++++++++++-
 packages/i18n/locales/en/app.json                  |  4 ++-
 21 files changed, 235 insertions(+), 29 deletions(-)

Fusion-Task-Id: FN-8072

Fusion-Task-Lineage: bab4b8f2-5996-4161-8733-8e03bb6a7024

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 05:42:04 -07:00
gsxdsm
19ab7a9e93 FN-8068: add input-language task definitions
Add an opt-in setting that localizes planner-authored task-definition prose.

- Detect confident Spanish, French, Korean, and Chinese input before instructing triage localization.
- Expose and persist the project-level task-definition language toggle with translations and search support.
- Preserve English structural markers, code, and unsupported or uncertain input for deterministic parsing.

Files changed:
 .../fn-8068-task-definition-input-language.md      |  7 +++
 docs/settings-reference.md                         |  1 +
 packages/core/src/settings-schema.ts               |  7 +++
 packages/core/src/types.ts                         | 10 ++++
 .../app/__tests__/settings-sections.test.tsx       | 18 ++++++
 .../dashboard/app/components/SettingsModal.tsx     |  4 ++
 .../__tests__/SettingsModal.mobileClose.test.tsx   | 12 ++++
 .../__tests__/SettingsModal.models-auth.test.tsx   | 11 ++++
 .../app/components/settings/section-keys.ts        |  1 +
 .../sections/ProjectModelsSection.search.ts        | 10 ++++
 .../settings/sections/ProjectModelsSection.tsx     | 17 ++++++
 .../settings-default-descriptions.test.tsx         |  1 +
 packages/engine/src/__tests__/triage.test.ts       | 64 ++++++++++++++++++++++
 packages/engine/src/triage.ts                      | 29 +++++++++-
 packages/i18n/locales/en/app.json                  |  2 +
 packages/i18n/locales/es/app.json                  |  2 +
 packages/i18n/locales/fr/app.json                  |  2 +
 packages/i18n/locales/ko/app.json                  |  2 +
 packages/i18n/locales/zh-CN/app.json               |  2 +
 packages/i18n/locales/zh-TW/app.json               |  2 +
 packages/i18n/src/resources.d.ts                   |  2 +
 21 files changed, 205 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-8068

Fusion-Task-Lineage: fe0102f5-68cb-443c-8512-2ffa5fe0e2f8

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 05:18:30 -07:00
gsxdsm
5b4ec4c08f FN-8042: add merger fallback model lane
Add configurable project fallback models for AI merger retries.

- Resolve complete project merger fallback pairs before the shared global fallback.
- Expose merger fallback model and thinking controls in Project Models with reset-aware persistence.
- Apply the fallback lane across merger, review, PR-response, and recovery sessions with tests and documentation.

Files changed:
 .changeset/fn-8042-merger-fallback-model.md        |  7 +++
 docs/settings-reference.md                         |  4 +-
 .../core/src/__tests__/model-resolution.test.ts    | 24 ++++++++++
 .../core/src/__tests__/settings-parity.test.ts     |  3 ++
 packages/core/src/index.gate.ts                    |  1 +
 packages/core/src/index.ts                         |  1 +
 packages/core/src/model-resolution.ts              | 22 +++++++++
 packages/core/src/settings-schema.ts               |  4 ++
 packages/core/src/types.ts                         | 13 ++++++
 .../app/__tests__/settings-save-split.test.ts      | 41 +++++++++++++++++
 .../app/__tests__/settings-sections.test.tsx       | 36 +++++++++++++++
 .../app/components/settings/save-split.ts          |  7 +--
 .../settings/sections/ProjectModelsSection.tsx     | 53 +++++++++++++++++++++-
 .../settings-default-descriptions.test.tsx         |  3 ++
 .../src/__tests__/agent-session-helpers.test.ts    |  1 +
 .../__tests__/mcp-pr-response-forwarding.test.ts   |  1 +
 packages/engine/src/agent-session-helpers.ts       | 10 +++-
 packages/engine/src/merger-ai.ts                   | 17 +++++--
 packages/engine/src/merger.ts                      | 43 +++++++++++++-----
 packages/engine/src/pr-response-run-ops.ts         | 11 +++--
 20 files changed, 276 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-8042

Fusion-Task-Lineage: 31762a72-461e-438c-a12d-2816580283fd

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 04:29:17 -07:00
gsxdsm
90ce57f127 FN-8070: preserve task title input language
Ensure auto-generated task titles use the task description's language.

- Detect description language and add a confident language hint to title prompts
- Cover multilingual title generation and stale-model fallback behavior
- Document the language-preserving title-summary setting and add a patch changeset

Files changed:
 .changeset/fn-8070-title-summary-input-language.md |  7 ++
 docs/settings-reference.md                         |  2 +-
 packages/core/src/__tests__/ai-summarize.test.ts   | 87 ++++++++++++++++++----
 packages/core/src/ai-summarize.ts                  | 18 +++++
 4 files changed, 98 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-8070

Fusion-Task-Lineage: e003e2e0-eb0c-487e-83de-8a9b37ee1c02

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 03:23:25 -07:00
gsxdsm
274318aebf FN-8056: enforce task token budgets
Enforce configured task token budgets whenever session usage is persisted.

- Apply soft alerts and hard pauses atomically from all executor persistence paths.
- Exclude cache-read tokens from budget usage and dispatch budget notifications once.
- Document budget semantics and add regression coverage.

Files changed: .changeset/fn-8056-token-budget-enforcement.md     |   7 ++
 docs/settings-reference.md                         |   2 +
 packages/core/src/types.ts                         |   4 +-
 .../src/__tests__/session-token-usage.test.ts      | 101 ++++++++++++++++++++-
 .../src/__tests__/token-budget-enforcer.test.ts    |  81 ++++++++++-------
 packages/engine/src/executor.ts                    |  22 ++++-
 packages/engine/src/session-token-usage.ts         |   8 +-
 packages/engine/src/token-budget-enforcer.ts       |  98 +++++++++++++++++---
 8 files changed, 262 insertions(+), 61 deletions(-)

Fusion-Task-Id: FN-8056

Fusion-Task-Lineage: 5f5ed522-f950-42ce-b4fd-e0b1d45b5815

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 01:52:10 -07:00
gsxdsm
e46ffebde1 FN-7985: surface review budget exhaustion and configure replan cap
Expose exhausted Plan Review replan budgets for operator approval and allow workflows to configure the cap.

- Add validated numeric workflow setting support and a Plan Review replan-cap setting.
- Route configured cap exhaustion with a distinct approval reason and preserve fallback behavior.
- Display the budget-exhaustion state across task cards, lists, and details.
- Add tests, localized copy, documentation, and a minor changeset.

Files changed:
 .changeset/fn-7985-review-budget-approval.md       |  7 ++++
 docs/settings-reference.md                         |  9 +++--
 docs/workflow-steps.md                             |  2 +-
 .../builtin-workflow-settings-triage.test.ts       | 27 +++++++++++++--
 packages/core/src/builtin-workflow-settings.ts     | 17 ++++++++++
 packages/core/src/index.gate.ts                    |  1 +
 packages/core/src/index.ts                         |  1 +
 packages/core/src/workflow-ir-types.ts             |  4 +++
 packages/core/src/workflow-ir.ts                   | 27 +++++++++++++++
 packages/core/src/workflow-settings-resolver.ts    |  1 +
 packages/core/src/workflow-settings.ts             |  6 ++++
 packages/dashboard/app/components/ListView.css     | 19 +++++++++++
 packages/dashboard/app/components/ListView.tsx     | 22 +++++++++---
 packages/dashboard/app/components/TaskCard.css     | 18 ++++++++++
 packages/dashboard/app/components/TaskCard.tsx     |  6 ++--
 .../dashboard/app/components/TaskDetailModal.tsx   |  4 +--
 .../app/components/__tests__/ListView.test.tsx     | 30 +++++++++++++++++
 .../app/components/__tests__/TaskCard.test.tsx     | 17 ++++++++--
 .../app/components/workflow-setting-display.ts     | 11 ++++++
 .../dashboard/app/utils/reviewBudgetApproval.ts    | 11 ++++++
 .../triage-plan-review-replan-cap.test.ts          | 39 +++++++++++++++++++---
 packages/engine/src/triage.ts                      | 21 ++++++++----
 packages/i18n/locales/en/app.json                  |  2 +-
 packages/i18n/src/resources.d.ts                   | 19 ++++++++---
 24 files changed, 288 insertions(+), 33 deletions(-)

Fusion-Task-Id: FN-7985

Fusion-Task-Lineage: 125f101c-caca-45c2-8b40-996b2a31c019

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 01:32:23 -07:00
gsxdsm
1b9c7a7ca2 fix(FN-7575): stop double-commenting when a task is both imported and tracked
A task can carry BOTH linkages at once, pointing two services at ONE issue:
- GitHub: maybeCreateTrackingIssue() ADOPTS a github sourceIssue as
  githubTracking.issue (github-tracking.ts, `source_issue_linked`).
- GitLab: buildGitLabTaskProvenance() always returns sourceIssue AND
  gitlabTracking.item for the same item, so on GitLab EVERY imported task with
  gitlabCommentOnDone on was double-commented.

With comment-on-done enabled the issue-comment service and the tracking-comment
service both posted. Reproduced against the real wiring: two comments on
acme/widgets#42 ("✅ Task FN-1 ... resolved." then "✅ Done — ...").

The issue-comment services now suppress themselves when the tracking service
provably posts to the SAME target, and the tracking comment wins — it carries
commit/branch/PR/files/merged plus the release lines.

Identity, never "both linked": the two may legitimately target DIFFERENT issues
(a tracking issue linked separately from the source issue), which is two comments
on two issues and must keep working. GitHub matches on case-insensitive
owner/repo + number; GitLab is identical by construction because
resolveGitLabTarget() prefers the tracked item.

Both guards mirror the tracking services' `from === to` no-op guard: on a
same-column re-emit the tracking service stays silent, so suppressing there would
drop the only comment rather than dedupe it.

The net split is now disjoint: issue-comment owns "imported but not tracked",
tracking owns "tracked". Suppression is logged (once per completion, not the
high-frequency skip-noise FN-8024 removed) because a custom comment template
silently not rendering on a tracked issue is otherwise unexplainable.

Behavior change, documented in settings-reference.md: githubCommentTemplate /
gitlabCommentTemplate no longer render on a tracked issue.

Tests updated where they encoded the double-post path (they exercised the
services in isolation, so the duplicate was invisible). GitLab fixtures now
distinguish tracked vs imported-not-tracked shapes. Also asserts a PRE-EXISTING
gap left unchanged: resolveGitLabTarget() early-returns on an unresolvable item
and never falls back to sourceMetadata, so neither service comments there.

Verified non-vacuous: the 4 suppression tests fail against the pre-fix source;
the "still posts" tests pass either way by design. Gate green (294/122/63).

Fusion-Task-Id: FN-7575

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 20:24:49 -07:00
gsxdsm
d9843f75bc FN-7983: colocate project summarization model with summarization settings
Move the Project Summarization model lane and title-summarizer fallback next to the AI title/commit summarization controls in Project Models.

- Extract shared project-lane renderer and keep default/merger/import-translate in the general Model Lanes list
- Render summarization + title-summarizer fallback inside the AI summarization section with the same models-available guard
- Add regression tests for colocation and empty-models guard
- Update settings reference docs and add a patch changeset

Files changed:
 .changeset/fn-7983-summarization-lane-colocation.md       |   7 ++
 docs/settings-reference.md                         |   6 +-
 .../app/__tests__/settings-sections.test.tsx       |  61 ++++++++++
 .../settings/sections/ProjectModelsSection.tsx     | 126 ++++++++++++---------
 4 files changed, 142 insertions(+), 58 deletions(-)

Fusion-Task-Id: FN-7983

Fusion-Task-Lineage: c473ba61-f003-401d-bc66-86f2078ba047

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 15:21:16 -07:00
gsxdsm
f9c19f9f3a FN-7967: accept custom triage workflow IDs and honor project default
Allow triageDefaultWorkflowId and triageDecisionOnlyWorkflowId to accept custom workflow IDs so project default workflows are honored at triage time.

- Change triage workflow settings from enum to string; empty triageDefaultWorkflowId inherits config.settings.defaultWorkflowId
- Render triage prompt default from project settings unless an explicit stored override exists
- Only pass stored triageDefaultWorkflowId into triage policy settings so declaration defaults do not clobber project defaults
- Document settings behavior and add core/engine regression coverage
- Add patch changeset for @runfusion/fusion

Files changed:
 .changeset/fn-7967-triage-default-workflow.md                        |  7 +++++++
 docs/settings-reference.md                                           |  4 ++--
 packages/core/src/__tests__/builtin-workflow-settings-triage.test.ts | 43 +++++++++++++++++++++++++++++++++++++++++--
 packages/core/src/builtin-workflow-settings.ts                       | 35 ++++++++++++++++++++---------------
 packages/engine/src/__tests__/triage.test.ts                         | 41 +++++++++++++++++++++++++++++++++++++++++
 packages/engine/src/triage.ts                                        | 28 ++++++++++++++++++++++++----
 6 files changed, 135 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-7967

Fusion-Task-Lineage: e42ea061-889c-4bdd-8a9d-f56f34fc0c89

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 14:43:55 -07:00
gsxdsm
0863c0fb58 feat(dashboard): auto-translate foreign-language GitHub issues on import (#2141)
## Why

The Import Tasks panel routinely lists issues in languages the operator
cannot read. Translation already shipped in #2128, but deliberately
**opt-in and preview-only** — its header comment read *"Translation is
opt-in (never automatic) so import provenance stays faithful until the
operator asks."*

This reverses that decision **behind a default-off setting**, so
operators who never opt in keep byte-faithful import provenance. The
superseded comment is kept and annotated rather than deleted, so the
reason the rule changed stays in the code.

### The structural gap #2128 left

`POST /github/issues/import` accepts only `{owner, repo, issueNumber}`
and **re-fetches the issue server-side**. A translation held in React
state could never reach the created task, and the in-memory cache died
with the modal. That is why the cache here is server-side rather than in
the hook — it's what makes "imported issues carry the translated
version" actually true.

## What operators get

Auto-translate is **off by default**. When enabled:

- The **50 most recent OPEN** foreign-language issues translate on panel
load — **list titles**, not just the preview, so the list reads in your
language before you click anything.
- Translations show **by default**, with a toggle back to the original
(hover a translated list title to see the original).
- Translations **persist until the issue closes**, so re-opening the
panel neither waits nor re-bills.
- **Both single and batch import** carry the translation, so the created
task reads like the preview you approved.
- A **target language** setting (unset = follow the dashboard language)
and a dedicated **model lane**, so you can pin a cheap/fast model
without dragging the summarization lane onto it.

## Notable decisions

| Decision | Why |
|---|---|
| Detect **before** the model | An issue already in the target language
is never sent. Without this, an English repo with the setting on would
bill every issue to return its input unchanged. |
| Detection moved to `@fusion/core` | The panel and the server must not
disagree about which issues are foreign; two copies of a heuristic
drift. |
| Own rate-limit budget | Translation shared a 10/hour budget with
refine/goal-draft. Fanning out per-issue would fail partway **and**
starve refine for the hour. |
| Cache keyed on a **source hash** | An edited issue misses the cache
and re-translates instead of serving stale prose. |
| Import is **cache-read only** | A miss imports the original. Import
must never block on, or fail because of, translation. |
| `project_id` leads the cache PK + full RLS contract | All projects
share one flat `project` schema. `verification_cache`'s PK predates that
discipline; this table does not copy that mistake. |

## Verification

- ✅ `pnpm lint`, `@fusion/core` + `@fusion/dashboard` typecheck
- ✅ `pnpm verify:fast` — build + scoped typecheck + real boot smoke
(`/api/health`)
- ✅ `pnpm test:gate` — 479 tests
- ✅ 19 new tests covering the billing invariants
(off/closed/same-language ⇒ **no model call**), cache hit/miss-on-edit,
the 50 cap, and per-item fail-soft
- ✅ `schema-applier` real-Postgres suite (46 tests) exercises migration
`0010` and its isolation invariant

**Pre-existing failures NOT touched** (confirmed red on `HEAD` before
this branch): `AppearanceSection`'s task-popup test, and two PG-cutover
keys (`sqliteMigrationNotice`, `postgresMigrationInboxMessageSentAt`)
missing description mappings. I left the latter rather than guess an
allowlist entry that could mask a real coverage gap.

## Reviewer notes

- Short Latin-script prose (a one-line Spanish title) rates only
*medium* confidence and won't auto-translate — the existing heuristic is
deliberately conservative so English issues are never billed. CJK
detects regardless of length. The threshold is the knob if you'd rather
bias toward translating.
- The RLS/isolation contract in migration `0010` is the part most worth
a careful look.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 14:06:42 -07:00
gsxdsm
de25e32eac FN-7963: add plannerHeartbeatPatrolEnabled to gate idle heartbeat task creation
Add a workflow setting that disables idle/no-task heartbeat proactive task creation without turning off planner overseer stuck-task recovery.

- Declare plannerHeartbeatPatrolEnabled (default true) in BUILTIN_OVERSIGHT_SETTINGS
- Resolve the flag via resolveEffectivePlannerHeartbeatPatrolEnabled and wire it into agent-heartbeat/triage prompts
- Render patrol-off instruction when disabled; keep FN-7962 outage backoff lines when patrol stays enabled
- Cover setting defaults, prompt builders, and heartbeat executor paths with tests
- Document the setting in settings-reference and add a changeset

Files changed:
 .changeset/fn-7963-planner-heartbeat-patrol.md     |   7 ++
 docs/settings-reference.md                         |  11 +-
 packages/core/src/__tests__/agent-prompts.test.ts  |  29 +++++
 .../builtin-workflow-settings-triage.test.ts       |  21 ++++
 .../plannerHeartbeatPatrolEnabled-default.test.ts  |  64 ++++++++++
 packages/core/src/agent-prompts.ts                 |  55 +++++++--
 packages/core/src/builtin-workflow-settings.ts     |  14 +++
 packages/core/src/index.gate.ts                    |   5 +
 packages/core/src/index.ts                         |   5 +
 packages/core/src/workflow-settings-resolver.ts    |  15 ++-
 .../src/__tests__/heartbeat-executor.test.ts       |  59 ++++++++-
 packages/engine/src/agent-heartbeat.ts             | 135 +++++++++++++++++++--
 packages/engine/src/triage.ts                      |   8 +-
 13 files changed, 402 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-7963

Fusion-Task-Lineage: c5e7a382-52c1-4cc1-8b21-aba7dc7d2b97

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 12:27:15 -07:00
gsxdsm
e9f14bf024 perf: speed up local pnpm build and cap stacked verifications (#2134)
## Summary

- Extend the workspace content-hash skip cache to **all** packages (not
just plugins), with `--force` / `--full` flags
- Default local CLI packaging to a **fast mode** (bin/extension +
migrations only); full desktop/plugin/DTS staging runs on CI or `pnpm
build:full`
- Enable TypeScript `incremental` builds for warm recompiles
- Add `maxConcurrentVerifications` (default **1**) so concurrent tasks
cannot stack monorepo typecheck/build and peg CPU

Warm `pnpm build` measured ~**126s → ~0.8s** when nothing changed.

## Test plan

- [x] `node --test scripts/__tests__/build-workspace.test.mjs` (12 pass)
- [x] `pnpm --filter @fusion/engine exec vitest run
src/__tests__/verification-concurrency.test.ts`
- [x] `pnpm --filter @fusion/core exec vitest run
src/__tests__/settings-parity.test.ts`
- [x] Local: first `pnpm build` rebuilds as needed; second warm `pnpm
build` skips all packages (~0.8s)
- [x] Fast CLI packaging logs skip of desktop/plugin staging without
`FUSION_CLI_FULL_PACKAGE`
- [ ] CI: `pnpm build` still full-packages under `CI=true` (plugin
staging / release surfaces)

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

* **New Features**
* Added a Scheduling setting to limit concurrent verification tasks from
1–8, with a default of 1.
* Verification tasks now support cancellation while waiting or running.
  * Added options for forced and full workspace builds.

* **Performance**
* Local builds can skip unchanged packages and use incremental
compilation for faster rebuilds.
* Local CLI packaging is faster by default, while full packaging remains
available when needed.

* **Documentation**
* Updated the settings reference with the new verification concurrency
option.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-15 08:44:11 -07:00
gsxdsm
a242f1b449 fix(FN-7952): migrate bundled plugins to PostgreSQL (#2111)
## Summary

Bundled plugins now persist shared runtime state in project-scoped
PostgreSQL tables instead of maintaining independent SQLite authority.
Reports, CLI Printing Press, Compound Engineering, Roadmap, Even
Realities, and WhatsApp all follow the same ownership and startup
contract as Fusion core.

## Design decisions

- Plugin schema hooks run through the host’s PostgreSQL owner and
enforce project isolation.
- The SDK exposes the host contract needed by bundled plugins without
importing engine internals.
- Legacy Roadmap ownership fixtures use the supported empty-owner
sentinel, preserving current composite primary/foreign keys while
exercising backfill behavior.
- The lockfile travels with the Even Realities PostgreSQL dependency so
packaged installs remain reproducible.

## Validation

- All six affected plugin builds pass.
- Affected plugin suites pass: 773 tests across Printing Press, Compound
Engineering, Even Realities, Reports, Roadmap, and WhatsApp.
- `pnpm test:gate` passes all 478 gate tests.
- This PR changes 40 files.

## Stack

- Depends on #2110 → #2109 → #2108.
- The documentation/release PR completes the stack.

Related: #2105


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

## Summary by CodeRabbit

* **Breaking Changes**
* PostgreSQL is now required for runtime storage; SQLite files are used
only as one-time migration inputs.
  * The legacy `FUSION_NO_EMBEDDED_PG` fallback has been removed.

* **New Features**
* Added project-isolated PostgreSQL storage for plugins, reports, tasks,
notifications, and other plugin data.
  * Added agent tools for reports and CLI service drafts.
  * Added PostgreSQL schema initialization support for plugin authors.

* **Bug Fixes**
  * Improved migration and recovery of legacy plugin state.
* Prevented cross-project data access and strengthened transactional
schema updates.

* **Documentation**
* Updated storage, migration, deployment, plugin authoring, CLI, and
dashboard guidance for PostgreSQL.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-15 00:27:59 -07:00
gsxdsm
4f037679ad feat: planner overseer session advisor (OMP advisor parity) (#2082)
## Summary

Adds a **session advisor** to the planner overseer so Fusion can review
live executor transcripts the way [oh-my-pi’s
advisor](https://github.com/can1357/oh-my-pi/tree/main/packages/coding-agent/src/advisor)
does — without replacing the existing lifecycle supervisor (stage watch,
retry, merge confirmation, human-control withhold).

### What ships

- **Emission guard** (`OverseerEmissionGuard`) — content-free phrase
filter, session dedupe with severity-rank escalation, one accept per
advisor update
- **Session delta runtime** — queues agent-log deltas, drains through an
advisor agent, drops backlog after 3 failures
- **Session advisor service** — model gate, level matrix (`observe` /
`steer` / `autonomous`), human-control re-check at inject,
`[session-advisor]` steering comments
- **OVERSEER.md / WATCHDOG.md** discovery for project review priorities
- **AgentLogger `onEntriesFlushed`** + poll-backed agent-log cursor for
durable deltas
- Workflow settings: `plannerOverseerAdvisorProvider` +
`plannerOverseerAdvisorModelId` (both required; empty = soft-disabled
for cost safety)
- Docs + changeset

### What does not ship (deferred)

- Multi-advisor YAML roster, mutating advisor tools, reviewer/merger
shadowing, true tool-abort interrupt

### Plan

`docs/plans/2026-07-13-001-feat-overseer-advisor-parity-plan.md`

## Enablement

1. Set workflow **Session advisor model provider** + **Session advisor
model id**
2. Oversight level `observe` (log only), `steer`, or `autonomous`
(inject)
3. Optional: add `OVERSEER.md` or `WATCHDOG.md` in the project

## Test plan

- [x] `pnpm --filter @fusion/core exec vitest run
src/__tests__/overseer-emission-guard.test.ts`
- [x] `pnpm --filter @fusion/engine exec vitest run` overseer-* unit
tests (21 tests)
- [x] Related planner-overseer / intervention regression tests
- [x] `@fusion/engine` + `@fusion/core` typecheck
- [ ] Manual: configure advisor model, run an executor task, confirm
`[session-advisor]` inject + timeline metadata when concern is raised

## Residual Review Findings

None from autofix pass (log-cursor ordering fix already committed).


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

* **New Features**
* Added an off-by-default “session advisor” that can review live
execution activity and provide severity-based guidance.
* Added project and per-task controls to enable it, including a default
enable switch and Quick Add / Task Detail toggles.
* Enhanced advisor prompting by discovering and incorporating
`OVERSEER.md`/`WATCHDOG.md` review files.
* **Documentation**
* Added architecture and settings documentation for the new
session-advisor parity behavior.
* **Bug Fixes**
* Improved fail-soft handling so advisor behavior won’t disrupt
execution.
  * Fixed concurrent PostgreSQL migration startup failures.
* **Tests**
* Added coverage for advice parsing, emission guarding, runtime
behavior, and watchdog discovery.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-14 20:27:35 -07:00
gsxdsm
f0888d43c3 FN-7945: route List-view task opens through the movable popup when Open tasks as popups is on
Extends the existing board/right-dock "Open tasks as popups" routing so ordinary List row/card and keyboard opens use the same shared movable/resizable FloatingWindow instead of the docked split-pane/mobile detail.

- Add openMobileTasksInPopup prop to ListView, threaded through App -> MainContent -> ListView (dashboard/types.ts)
- handleRowClick routes to onPopOut (popOutTaskDetail) when the setting is on, on both desktop split-pane and mobile/tablet single-pane; docked behavior is preserved when the setting is off
- Restore Enter/Space keyboard activation on list rows to invoke the same handleRowClick path, alongside existing context-menu key handling
- Update docs/dashboard-guide.md and docs/settings-reference.md to describe List row/card opens as part of the popup routing surface, and refresh the Appearance settings help copy/FNXC comment accordingly
- Add changeset (.changeset/fn-7945-list-view-task-popup.md, minor) describing the user-facing behavior
- Extend ListView.test.tsx coverage for the new popup routing and restored keyboard activation

Files changed:
 .changeset/fn-7945-list-view-task-popup.md         |  7 ++
 docs/dashboard-guide.md                            |  4 +-
 docs/settings-reference.md                         |  2 +-
 packages/dashboard/app/App.tsx                     |  1 +
 packages/dashboard/app/components/ListView.tsx     | 48 +++++++++----
 .../app/components/__tests__/ListView.test.tsx     | 80 +++++++++++++++++++++-
 .../app/components/dashboard/MainContent.tsx       |  2 +
 .../dashboard/app/components/dashboard/types.ts    |  1 +
 .../settings/sections/AppearanceSection.tsx        |  4 +-
 9 files changed, 127 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-7945

Fusion-Task-Lineage: 784cb4ee-c493-4ace-bf8b-0e3dbaaef9a3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-13 09:27:29 -07:00
gsxdsm
7246df22f6 FN-7944: add setting to keep task popups attached to their Board/List view
Adds an opt-in project setting so open task-detail popups stay attached to the Board or List view where they were opened, instead of floating over every main-content view.

- New project setting taskPopupsBoardListOnly (default: off) in settings-schema.ts and ProjectSettings type, with default preserved via settings-defaults tests.
- usePoppedOutTasks now stores each popup's originating TaskView alongside its task snapshot (PoppedOutTaskEntry), keeping legacy tasks output for existing callers.
- App.tsx adds isTaskPopupVisibleForView() gating helper and filters popped-out entries to the current view for rendering/keyboard-close handling, while hidden popups remain mounted in hook state (not cleared) so switching back to the originating view restores them with shared persisted geometry.
- Settings -> Appearance gets a new "Keep task popups on their Board/List view" checkbox (AppearanceSection.tsx) with i18n strings and updated settings search text in SettingsModal.
- Documentation updated in docs/dashboard-guide.md and docs/settings-reference.md to describe the render-only hide/restore behavior.
- New/updated tests: App.taskPopupViewGating.test.tsx, usePoppedOutTasks.test.ts, AppearanceSection.test.tsx, settings-default-descriptions.test.tsx, settings-defaults.test.ts.

Files changed:
 docs/dashboard-guide.md                            |   5 +-
 docs/settings-reference.md                         |   1 +
 .../core/src/__tests__/settings-defaults.test.ts   |  13 +++
 packages/core/src/settings-schema.ts               |   5 +
 packages/core/src/types.ts                         |   7 ++
 packages/dashboard/app/App.tsx                     |  49 +++++++--
 .../app/__tests__/App.taskPopupViewGating.test.tsx | 113 +++++++++++++++++++++
 .../dashboard/app/components/SettingsModal.tsx     |   3 +-
 .../settings/sections/AppearanceSection.tsx        |   8 ++
 .../sections/__tests__/AppearanceSection.test.tsx  |  21 ++++
 .../settings-default-descriptions.test.tsx         |   1 +
 .../app/hooks/__tests__/usePoppedOutTasks.test.ts  |  14 +++
 packages/dashboard/app/hooks/useAppSettings.ts     |   4 +
 packages/dashboard/app/hooks/usePoppedOutTasks.ts  |  27 +++--
 packages/i18n/locales/en/app.json                  |   2 +
 15 files changed, 255 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-7944
Fusion-Task-Lineage: 4b8ced0e-1853-429f-8482-163821a35ae6
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-13 08:58:51 -07:00
gsxdsm
d4001ab0ee feat: make merger AI model configurable under Global and Project Models
Add a dedicated merger model lane (project + global provider/model/thinking) so merge-agent sessions no longer share only the default model, without inheriting executor/planner/reviewer lanes.
2026-07-13 08:10:56 -07:00
gsxdsm
9ba8a2e575 FN-7932: add per-lane Reviewer and Planning thinking-level overrides
Adds validatorThinkingLevel and planningThinkingLevel task fields so the Reviewer and Planning AI lanes can override reasoning effort independently of the shared task thinkingLevel, with dashboard UI, storage, and runtime fallback wiring.

- Add validatorThinkingLevel and planningThinkingLevel to Task/TaskCreateInput types (packages/core/src/types.ts)
- Persist the new fields in the SQLite schema and store read/write/replication paths (packages/core/src/db.ts, store.ts, mesh-task-replication.ts)
- Wire executor and triage lanes to fall back per-lane thinking level -> task.thinkingLevel -> existing settings/lane fallback (packages/engine/src/executor.ts, triage.ts)
- Add per-lane thinking-level selectors to the ModelSelectorTab UI, alongside the existing thinking-level control (packages/dashboard/app/components/ModelSelectorTab.tsx)
- Expose the new fields through the legacy task API and task-workflow routes (packages/dashboard/app/api/legacy.ts, packages/dashboard/src/routes/register-task-workflow-routes.ts)
- Document the new settings in dashboard-guide.md and settings-reference.md
- Add a minor changeset and unit/integration test coverage for store persistence, routes, UI, and agent-session helpers

Files changed:
 .changeset/per-lane-task-thinking.md               |   7 ++
 docs/dashboard-guide.md                            |   2 +
 docs/settings-reference.md                         |   2 +-
 .../src/__tests__/store-thinking-levels.test.ts    |  43 +++++++
 packages/core/src/db.ts                            |  15 ++-
 packages/core/src/mesh-task-replication.ts         |   4 +
 packages/core/src/store.ts                         |  24 +++-
 packages/core/src/types.ts                         |  12 ++
 packages/dashboard/app/api/legacy.ts               |   2 +
 .../dashboard/app/components/ModelSelectorTab.tsx  | 126 ++++++++++++++++++++-
 .../components/__tests__/ModelSelectorTab.test.tsx |  50 +++++++-
 .../src/__tests__/routes-tasks-ops.test.ts         |  74 ++++++++++++
 .../src/routes/register-task-workflow-routes.ts    |  19 +++-
 .../src/__tests__/agent-session-helpers.test.ts    |  15 +++
 packages/engine/src/executor.ts                    |  16 ++-
 packages/engine/src/triage.ts                      |   8 +-
 16 files changed, 395 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-7932

Fusion-Task-Lineage: 4202f774-aab9-41d2-86a0-f5277dd0f848

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-13 00:44:59 -07:00
gsxdsm
daf3f15fd1 FN-7909: add room-level thinking effort override for Chat Rooms
Adds a per-room thinking-effort (reasoning level) override for Chat Rooms so all room responders can share a consistent override instead of relying only on per-agent/global defaults.

- Persist `chat_rooms.thinkingLevel` with a new core DB migration and store read/write support
- Extend chat-store and chat-types with thinkingLevel plumbing for room create/update
- Wire the dashboard chat room API/routes and legacy handlers to accept and return thinkingLevel
- Add a ChatView room settings control (with CSS) and useChatRooms hook support for setting/clearing the override
- Resolve room responder defaultThinkingLevel from the room override when present
- Update docs (dashboard-guide, settings-reference) and add a minor changeset for the feature

Files changed:
 .changeset/fn-7909-room-thinking-level.md          |  7 +++
 docs/dashboard-guide.md                            |  1 +
 docs/settings-reference.md                         |  2 +-
 packages/core/src/__tests__/chat-store.test.ts     | 21 ++++++++
 packages/core/src/__tests__/db-migrate.test.ts     | 57 ++++++++++++++++++++++
 packages/core/src/chat-store.ts                    | 12 ++++-
 packages/core/src/chat-types.ts                    | 10 ++++
 packages/core/src/db.ts                            | 28 ++++++++++-
 packages/dashboard/app/api/__tests__/chat-rooms-api.test.ts       |  8 +--
 packages/dashboard/app/api/legacy.ts               |  4 +-
 packages/dashboard/app/components/ChatView.css     | 16 ++++++
 packages/dashboard/app/components/ChatView.tsx     | 29 ++++++++++-
 packages/dashboard/app/components/__tests__/ChatView.rooms.test.tsx   | 24 +++++++++
 packages/dashboard/app/hooks/__tests__/useChatRooms.test.ts       | 22 +++++++++
 packages/dashboard/app/hooks/useChatRooms.ts       | 16 ++++++
 packages/dashboard/src/__tests__/chat-room-routes.test.ts         | 26 ++++++++++
 packages/dashboard/src/__tests__/chat.rooms.test.ts     | 42 ++++++++++++++++
 packages/dashboard/src/chat.ts                     |  8 +++
 packages/dashboard/src/routes/register-chat-room-routes.ts        | 21 ++++++--
 19 files changed, 338 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-7909

Fusion-Task-Lineage: 2741eca9-5305-4f6c-81bf-ae644a9fe307

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 22:12:18 -07:00
gsxdsm
03bca1787b FN-7907: Add project chat default (model/agent) setting and New Chat default behavior
Adds a project-scoped Direct-chat default (model pair or durable agent) plus a New Chat behavior toggle (prompt vs. always-use-default), surfaced in Project Models settings using the standard model dropdown.

- Add ProjectSettings fields: chatNewSessionMode, chatDefaultKind, chatDefaultAgentId, chatDefaultModelProvider, chatDefaultModelId, chatDefaultThinkingLevel
- Extend settings-schema validation for the new chat default fields
- Add a "Chat" subsection to ProjectModelsSection with New Chat behavior selector, model/agent target toggle, and the standard CustomModelDropdown for model selection
- Update ChatView.tsx handleNewChat() flow to honor the configured default (prompt vs. immediate session creation)
- Add i18n strings across en/es/fr/ko/zh-CN/zh-TW locales and regenerate resources.d.ts
- Add changeset (@runfusion/fusion minor) and update docs/settings-reference.md and docs/dashboard-guide.md
- Add settings-parity, ChatView new-chat-default, and ProjectModelsSection chatDefault test coverage

Files changed:
 .changeset/fn-7907-chat-default.md                 |   7 +
 docs/dashboard-guide.md                            |   3 +-
 docs/settings-reference.md                         |   8 +
 packages/core/src/__tests__/settings-parity.test.ts     |  20 ++
 packages/core/src/settings-schema.ts               |   6 +
 packages/core/src/types.ts                         |  15 +
 packages/dashboard/app/components/ChatView.tsx     |  93 +++++-
 packages/dashboard/app/components/__tests__/ChatView.new-chat-default.test.tsx   | 357 +++++++++++++++++++++
 packages/dashboard/app/components/settings/sections/ProjectModelsSection.tsx     |  77 +++++
 packages/dashboard/app/components/settings/sections/__tests__/ProjectModelsSection.chatDefault.test.tsx |  193 +++++++++++
 packages/i18n/locales/en/app.json                  |  20 +-
 packages/i18n/locales/es/app.json                  |  20 +-
 packages/i18n/locales/fr/app.json                  |  20 +-
 packages/i18n/locales/ko/app.json                  |  20 +-
 packages/i18n/locales/zh-CN/app.json               |  20 +-
 packages/i18n/locales/zh-TW/app.json               |  20 +-
 packages/i18n/src/resources.d.ts                   |  18 ++
 17 files changed, 899 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-7907

Fusion-Task-Lineage: 86a81b9c-7e0c-4033-9e2a-6f7380810fe9

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 20:54:10 -07:00
gsxdsm
9f8db7d1b5 FN-7903: wire thinkingLevel into AI session creation for automation steps
Threads the persisted per-step Thinking Level (from FN-7900) into runtime AI session creation and task spawning, so scheduled, routine, and manual automation runs actually apply the chosen reasoning effort instead of only storing it.

- CronRunner passes step.thinkingLevel through AiPromptExecutor to createFnAgent's defaultThinkingLevel for scheduled AI-prompt steps
- RoutineRunner forwards step.thinkingLevel to the shared AiPromptExecutor seam for routine AI-prompt steps
- Cron/routine create-task steps map step.thinkingLevel onto TaskCreateInput.thinkingLevel so spawned tasks inherit the configured reasoning effort
- Dashboard's inline/manual AI-prompt and create-task automation routes apply the same defaultThinkingLevel / TaskCreateInput.thinkingLevel behavior
- Updated docs (dashboard-guide.md, settings-reference.md) to describe the now-active runtime behavior
- Added a changeset for @runfusion/fusion (minor) and expanded cron-runner/routine-runner/routes-automation test coverage

Files changed:
 .changeset/fn-7903-automation-thinking-level.md    |  7 ++
 docs/dashboard-guide.md                            |  5 +-
 docs/settings-reference.md                         |  2 +-
 .../src/__tests__/routes-automation.test.ts        | 67 +++++++++++++++++++
 packages/dashboard/src/routes.ts                   | 10 +++
 packages/engine/src/__tests__/cron-runner.test.ts  | 75 +++++++++++++++++++++-
 .../engine/src/__tests__/routine-runner.test.ts    | 68 +++++++++++++++++++-
 packages/engine/src/cron-runner.ts                 | 21 +++++-
 packages/engine/src/routine-runner.ts              | 11 +++-
 9 files changed, 255 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-7903

Fusion-Task-Lineage: c7eb4660-975d-4c5d-820e-0f1a3ac8b6a6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 20:09:57 -07:00
gsxdsm
cc743eec38 FN-7838: make CLI agent cold-start timeouts configurable via env vars
Raises Grok and Droid CLI cold-start timeout defaults from 60s to 120s and lets operators override them via environment variables.
- Grok runtime adapter: new GROK_CLI_FIRST_OUTPUT_TIMEOUT_MS env override for the first-output cold-start guard; default raised 60000ms → 120000ms; invalid/non-positive values fall back to the default
- Droid provider: new PI_DROID_CLI_FIRST_LINE_TIMEOUT_MS env override for the first-line cold-start guard; default raised 60000ms → 120000ms; invalid/non-positive values fall back to the default
- 30-minute inactivity safety net left unchanged on both adapters
- Added/updated unit tests covering the new env-driven timeout resolution and fallback behavior for both plugins
- Documented the new settings in docs/settings-reference.md and both plugin READMEs
- Added a minor changeset for @runfusion/fusion

Files changed:
 .changeset/fn-7838-cli-timeout-configurable.md     |  7 ++
 docs/settings-reference.md                         | 13 ++-
 plugins/fusion-plugin-droid-runtime/README.md      |  8 ++
 .../src/__tests__/provider.test.ts                 | 97 +++++++++++++++++++++-
 .../fusion-plugin-droid-runtime/src/provider.ts    | 26 ++++--
 plugins/fusion-plugin-grok-runtime/README.md       |  8 ++
 .../src/__tests__/runtime-adapter.test.ts          | 52 +++++++++++-
 .../src/runtime-adapter.ts                         | 23 ++++-
 8 files changed, 222 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-7838

Fusion-Task-Lineage: 7aad4470-b28f-42bd-be01-8363a1dd05e5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-11 22:16:47 -07:00
gsxdsm
937650472a FN-7820: add Cost tab to task detail and optional card cost badge
Adds a shared cost-derivation utility and surfaces token/cost info in a new Cost tab on the task detail modal, plus an opt-in per-card cost badge on the board.

- Extract token-cost calculation into a shared taskTokenCost helper (read-time costFor derivation) reused by the Summary tab, new Cost tab, and card badge
- Add TaskDetailModal Cost tab (TaskCostTab.tsx/.css) showing cost breakdown for a task
- Simplify TaskSummaryTab by delegating cost math to the shared helper
- Add default-off project setting showCostBadgeOnCards (settings-schema.ts, types.ts) with a SettingsModal/AppearanceSection toggle
- Add CostBadgeContext to thread the setting into TaskCard without prop drilling
- Show an optional cost badge on TaskCard when the setting is enabled
- Update i18n strings across en/es/fr/ko/zh-CN/zh-TW locales
- Update docs (dashboard-guide.md, settings-reference.md) and add changeset fn-7820-cost-tab-and-card-badge.md

Files changed:
 .changeset/fn-7820-cost-tab-and-card-badge.md      |   7 ++
 docs/dashboard-guide.md                            |   4 +
 docs/settings-reference.md                         |   1 +
 .../core/src/__tests__/settings-defaults.test.ts   |  13 ++
 packages/core/src/settings-schema.ts               |   5 +
 packages/core/src/types.ts                         |   5 +
 packages/dashboard/app/App.tsx                     |   5 +
 .../dashboard/app/components/SettingsModal.tsx     |   6 +
 packages/dashboard/app/components/TaskCard.css     |   7 +-
 packages/dashboard/app/components/TaskCard.tsx     |  27 +++-
 packages/dashboard/app/components/TaskCostTab.css  |  51 ++++++++
 packages/dashboard/app/components/TaskCostTab.tsx  |  91 ++++++++++++++
 .../dashboard/app/components/TaskDetailModal.tsx   |  14 ++-
 .../dashboard/app/components/TaskSummaryTab.tsx    | 123 +-----------------
 .../app/components/__tests__/TaskCard.test.tsx     |  81 +++++++++++-
 .../app/components/__tests__/TaskCostTab.test.tsx  |  55 ++++++++
 .../TaskDetailModal.attachments-and-tabs.test.tsx  |  11 +-
 .../settings/sections/AppearanceSection.tsx        |   8 ++
 .../sections/__tests__/AppearanceSection.test.tsx  |  20 +++
 .../settings-default-descriptions.test.tsx         |   1 +
 .../dashboard/app/context/CostBadgeContext.tsx     |  19 +++
 packages/dashboard/app/hooks/useAppSettings.ts     |  15 +++
 .../app/utils/__tests__/taskTokenCost.test.ts      |  62 +++++++++
 packages/dashboard/app/utils/taskTokenCost.ts      | 139 +++++++++++++++++++++
 packages/i18n/locales/en/app.json                  |  29 ++++-
 packages/i18n/locales/es/app.json                  |  30 ++++-
 packages/i18n/locales/fr/app.json                  |  27 +++-
 packages/i18n/locales/ko/app.json                  |  30 ++++-
 packages/i18n/locales/zh-CN/app.json               |  30 ++++-
 packages/i18n/locales/zh-TW/app.json               |  30 ++++-
 30 files changed, 789 insertions(+), 157 deletions(-)

Fusion-Task-Id: FN-7820

Fusion-Task-Lineage: d33c5678-a68c-4b29-9db1-8ff0369dfd72

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-11 18:07:00 -07:00
gsxdsm
0a90dc4b55 FN-7821: refresh-then-recheck OAuth credentials before dispatching expiry notifications
Aligns OAuthExpiryMonitor's ntfy push notifications with the /api/auth/status refresh-then-recheck logic that drives the in-app OAuthReloginBanner, so providers that silently auto-refresh (e.g. GitHub Copilot's ephemeral token) no longer trigger false "OAuth token expired" pushes with no matching banner.

- OAuthExpiryMonitor.check() now performs a best-effort authStorage.getApiKey() refresh and reloads/re-resolves the credential before dispatching oauth-token-expired, instead of relying solely on the stored expiry timestamp
- resolveEffectiveOAuthCredential() now also guards against non-finite expires values in addition to non-numeric ones
- Updated docs/dashboard-guide.md and docs/settings-reference.md to describe the refresh-then-recheck behavior generically (not just Claude/Anthropic) and documented the FN-7821 fix in FNXC provenance comments
- Added regression tests covering the refresh-then-recheck flow in oauth-expiry-monitor.test.ts
- Added a patch changeset describing the fix for release notes

Files changed:
 .changeset/fn-7821-oauth-expiry-notification-banner-consistency.md               |   7 +
 docs/dashboard-guide.md                                                          |   6 +-
 docs/settings-reference.md                                                       |   6 +-
 packages/engine/src/notification/__tests__/oauth-expiry-monitor.test.ts          | 146 ++++++++++++++++++++-
 packages/engine/src/notification/oauth-expiry-monitor.ts                         |  48 ++++++-
 5 files changed, 199 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-7821

Fusion-Task-Lineage: 5954592c-adda-4fd4-b205-265860eddf3d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-11 18:07:00 -07:00
gsxdsm
a2c9b0fd52 FN-7817: Simplify Cursor usage credential to a single documented CURSOR_API_KEY path
Consolidates Cursor Admin API key resolution onto one documented env var so the usage/admin credential path is reachable and unambiguous, replacing the prior dual CURSOR_ADMIN_API_KEY/CURSOR_API_KEY and multi-provider-id lookup.

- Replace CURSOR_ADMIN_API_KEY (preferred) + CURSOR_API_KEY alias with a single CURSOR_API_KEY env var, mirroring the GROK_API_KEY precedent
- Simplify readCursorApiKey to check CURSOR_API_KEY then fall back to the single "cursor" authStorage entry via readConfiguredApiKey (drop the cursor/cursor-cli/cursor-agent provider-id loop)
- Export readCursorApiKey and fetchCursorUsage for direct test coverage
- Update the no-auth error message and settings-reference.md docs to reference only CURSOR_API_KEY, clarifying cursor-cli OAuth/session auth vs the separate Admin API usage-metering credential
- Add changeset (@runfusion/fusion: minor) documenting the credential-path change
- Add/adjust usage.test.ts coverage for readCursorApiKey precedence (env over authStorage) and the updated credential-absent error message

Files changed:
 .changeset/fn-7817-cursor-api-key.md           |  7 ++++
 docs/settings-reference.md                     |  8 ++--
 packages/dashboard/src/__tests__/usage.test.ts | 53 +++++++++++++++++++++++++-
 packages/dashboard/src/usage.ts                | 52 ++++++++-----------------
 4 files changed, 77 insertions(+), 43 deletions(-)

Fusion-Task-Id: FN-7817

Fusion-Task-Lineage: 86ac3d47-8e80-4159-abee-6c41aae56407

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-11 18:06:59 -07:00
gsxdsm
d40f24d20a FN-7816: add Cursor usage card to the Usage activity dropdown
Adds a Cursor provider fetcher to the dashboard usage aggregator so operators with a Cursor Admin API key see spend-based usage alongside the other providers.

- usage.ts: add fetchCursorUsage() using the Cursor Admin API POST https://api.cursor.com/teams/spend with Basic auth (API key as username), resolving the key from CURSOR_ADMIN_API_KEY (preferred) or CURSOR_API_KEY, falling back to fusion-auth/pi-configured api keys; maps teamMemberSpend overallSpendCents/spendCents and hardLimitOverrideDollars/monthlyLimitDollars into a "Monthly spend" usage window with a reset derived from subscriptionCycleStart
- usage.ts: wire fetchCursorUsage into fetchAllProviderUsage's parallel provider fetch list (with withTimeout + no-auth demotion) and update the provider-list comment
- UsageIndicator.tsx: map the "Cursor" provider name to the existing cursor-cli icon token/SVG
- usage.test.ts: add CURSOR_ADMIN_API_KEY/CURSOR_API_KEY env stubbing and a full fetchCursorUsage regression suite (ok/zero-utilization/no-auth/error/expired-key/parse-failure cases)
- UsageIndicator.test.tsx: cover the Cursor icon mapping
- docs/settings-reference.md: document that the Usage dropdown Cursor card requires a Cursor Admin API key (session-only cursor-agent login is insufficient)
- add a minor changeset for @runfusion/fusion documenting the new Cursor usage card

Files changed:
 .changeset/fn-7816-cursor-usage.md                 |   7 +
 docs/settings-reference.md                         |   4 +
 packages/dashboard/app/components/UsageIndicator.tsx |   7 +
 packages/dashboard/app/components/__tests__/UsageIndicator.test.tsx |  26 +++
 packages/dashboard/src/__tests__/usage.test.ts     | 157 ++++++++++++++
 packages/dashboard/src/usage.ts                    | 240 ++++++++++++++++++++-
 6 files changed, 440 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7816
Fusion-Task-Lineage: 4cec63d8-4ddc-40f3-8d16-5e4078da5eba
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-11 18:06:59 -07:00
gsxdsm
3d5cc0ada4 FN-7795: add thinking-level selectors to fallback model pickers
Adds a per-lane thinking-level selector to every fallback model picker across global, project, and workflow Settings surfaces, wiring them into the existing null-as-delete save paths.

- Add inline thinking-level dropdowns to the global Fallback Model, workflow-declared planning/validator fallback lanes, and the project-scoped Title Summarizer fallback picker via CustomModelDropdown's `showThinkingLevel`.
- Route `planningFallbackThinkingLevel`/`validatorFallbackThinkingLevel` through workflow settings PATCH and `titleSummarizerFallbackThinkingLevel` through project settings save-split, both with null-as-delete semantics on reset.
- Move Title Summarizer fallback out of the workflow-declared model pairs into a dedicated project-scoped lane in ProjectModelsSection so its thinking companion isn't tied to workflow settings.
- Update WorkflowSettingsPanel to surface the new fallback thinking companion keys.
- Extend/adjust tests (settings-save-split, settings-sections, SettingsModal.models-auth, WorkflowSettingsPanel, core settings-migration) to cover the new selectors and save routing.
- Document the fallback thinking-level runtime behavior in docs/settings-reference.md and docs/dashboard-guide.md.
- Add a minor changeset describing the new fallback thinking-level selectors.

Files changed:
 .changeset/fn-7795-fallback-thinking-selectors.md  |   7 +
 docs/dashboard-guide.md                            |   4 +-
 docs/settings-reference.md                         |  10 +-
 packages/core/src/__tests__/settings-migration.test.ts  |  14 +-
 packages/dashboard/app/__tests__/settings-save-split.test.ts      |  35 +++++
 packages/dashboard/app/__tests__/settings-sections.test.tsx       | 163 ++++++++++++++++++++-
 packages/dashboard/app/components/WorkflowSettingsPanel.tsx       |   6 +-
 packages/dashboard/app/components/__tests__/SettingsModal.models-auth.test.tsx   |  11 +-
 packages/dashboard/app/components/__tests__/WorkflowSettingsPanel.test.tsx       |  38 +++++
 packages/dashboard/app/components/settings/save-split.ts          |   9 +-
 packages/dashboard/app/components/settings/sections/GlobalModelsSection.tsx      |   8 +-
 packages/dashboard/app/components/settings/sections/ProjectModelsSection.tsx     |  58 ++++++--
 12 files changed, 328 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-7795

Fusion-Task-Lineage: ec990d47-defe-4717-993a-56988afe8d7d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-10 12:02:46 -07:00
gsxdsm
fc4acd4d66 FN-7794: apply fallback model's own thinking level when swapping in at runtime
Adds fallbackThinkingLevel plumbing so, when Fusion swaps from a primary model to a configured fallback model (executor, validator/reviewer, merger, planning, title-summarizer, heartbeat, and workflow-step lanes), the fallback's own configured thinking level is applied instead of silently reusing the primary lane's level.

- Add fallbackThinkingLevel option to AgentRuntimeOptions (agent-runtime.ts), AgentOptions (pi.ts), and ReviewOptions (reviewer.ts)
- Add per-lane resolvers: resolveExecutorFallbackThinkingLevel, resolvePlanningFallbackThinkingLevel, resolveValidatorFallbackThinkingLevel, resolveTitleSummarizerFallbackThinkingLevel, resolveMergerFallbackThinkingLevel (agent-session-helpers.ts), each following fallback-provider precedence and falling back to the primary lane/default thinking level when unset
- Export new resolvers from packages/engine/src/index.ts
- Apply the resolved fallback thinking level in createFnAgent's applyThinkingLevelIfSupported once a session has swapped to the fallback model (pi.ts)
- Wire fallbackThinkingLevel through executor session creation (workflow-step, task validator, child-agent, and main executor session paths), merger session creation, and heartbeat session creation
- Promote the fallback thinking level alongside the fallback model/provider when the no-visible-key Grok CLI fallback is promoted to primary, so the cleared fallback pair doesn't leave the session on the superseded primary's thinking level
- Route workflow-step fallback thinking level by which fallback candidate (validatorFallback vs globalFallback) actually matched
- Document fallbackThinkingLevel runtime-swap behavior in docs/settings-reference.md
- Add minor changeset for @runfusion/fusion
- Add regression tests covering fallback thinking-level resolution and application (agent-session-helpers.test.ts, pi.test.ts) and a shared test helper (executor-test-helpers.ts)

Files changed:
 .changeset/fn-7794-fallback-thinking-level.md      |   7 ++
 docs/settings-reference.md                         |   3 +
 .../src/__tests__/agent-session-helpers.test.ts    |  38 ++++++
 .../engine/src/__tests__/executor-test-helpers.ts  |  23 ++++
 packages/engine/src/__tests__/pi.test.ts           | 136 +++++++++++++++++++++
 packages/engine/src/agent-heartbeat.ts             |   3 +-
 packages/engine/src/agent-runtime.ts               |   5 +
 packages/engine/src/agent-session-helpers.ts       |  54 ++++++++
 packages/engine/src/executor.ts                    |  31 ++++-
 packages/engine/src/index.ts                       |   5 +
 packages/engine/src/merger.ts                      |   7 +-
 packages/engine/src/pi.ts                          |  16 ++-
 packages/engine/src/reviewer.ts                    |   6 +
 13 files changed, 327 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-7794

Fusion-Task-Lineage: c94d621a-ccbd-42b2-9fe6-cb619418ad90

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-10 11:53:07 -07:00
gsxdsm
84fb5138fc FN-7793: add fallback-lane thinking-level settings foundation
Adds the schema/storage foundation for per-fallback-lane thinking-level settings, without any runtime or UI consumption yet.

- Add global `fallbackThinkingLevel` default settings key.
- Add workflow-declared `planningFallbackThinkingLevel` and `validatorFallbackThinkingLevel` companion settings (enum-validated against THINKING_LEVELS) alongside their existing fallback provider/model pairs.
- Add project-scoped `titleSummarizerFallbackThinkingLevel` default settings key.
- Extend `GlobalSettings`/`ProjectSettings` TypeScript interfaces with the new optional `ThinkingLevel` fields and FNXC documentation comments.
- Update settings-schema `MovedProjectSettingsKey` type to include the new workflow-moved thinking-level keys.
- Update `docs/settings-reference.md` and `docs/storage.md` to document the new keys and correct workflow-vs-project scope for the pre-existing planning/validator fallback provider/model keys.
- Extend `effective-settings-overlay` and `settings-parity` unit tests to cover the new keys' scope and inheritance behavior.
- Add changeset `.changeset/fallback-thinking-levels.md` (minor).

Files changed:
 .changeset/fallback-thinking-levels.md             |  7 +++++++
 docs/settings-reference.md                         |  4 ++++
 docs/storage.md                                    | 12 +++++++----
 .../__tests__/effective-settings-overlay.test.ts   |  6 ++++++
 .../core/src/__tests__/settings-parity.test.ts     | 10 ++++++++++
 packages/core/src/builtin-workflow-settings.ts     | 23 +++++++++++++++++++++-
 packages/core/src/settings-schema.ts               | 10 +++++++++-
 packages/core/src/types.ts                         | 12 +++++++++++
 8 files changed, 78 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-7793
Fusion-Task-Lineage: 0e4bac3e-01d2-4d17-9f0a-af87e8a66eee
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-10 11:26:16 -07:00