Commit Graph

645 Commits

Author SHA1 Message Date
gsxdsm
25df9bf4fd FN-8171: expand active task thinking by default
Show Activity Live reasoning immediately for active and review-stage tasks.

- Default thinking blocks open for in-progress and in-review tasks.
- Preserve collapsed, user-toggleable reasoning for all other task columns.
- Document behavior and cover default state and user collapse interactions.

Files changed:
 .changeset/fn-8171-thinking-default-open.md        |  7 ++++
 docs/dashboard-guide.md                            |  2 +-
 packages/dashboard/app/components/TaskChatTab.tsx  | 20 +++++++---
 .../app/components/__tests__/TaskChatTab.test.tsx  | 43 ++++++++++++++++++++--
 4 files changed, 63 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-8171
Fusion-Task-Lineage: 705d6ac8-0c43-47d3-84df-57e9ec55a3b5
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 18:41:24 -07:00
gsxdsm
f4903d3db0 FN-8168: dismiss mobile More sheet on Back
Make the mobile More sheet participate in navigation history so Back dismisses it before changing views.

- Register the open More sheet as a navigation modal and remove it on every close path
- Cover browser, native, gesture, keyboard, action, and provider-less dismissal flows
- Document mobile More-sheet Back behavior

Files changed:
 docs/dashboard-guide.md                            |   2 +
 packages/dashboard/app/components/MobileNavBar.tsx |  48 ++++--
 .../__tests__/MobileNavBar.swipe-back.test.tsx     | 190 +++++++++++++++++++++
 3 files changed, 228 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-8168

Fusion-Task-Lineage: 1c5652db-5f27-4671-b4b7-676753ca4cd0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 18:33:47 -07:00
gsxdsm
07e1ceb860 FN-8151: add Cobalt, Clay, and Moss themes
Add three synchronized color themes across dashboard and desktop surfaces.

- Register Cobalt, Clay, and Moss theme IDs, token palettes, and light/dark swatches.
- Keep dashboard and desktop bootstrap validators aligned with selector metadata.
- Document and test the cross-surface theme registration invariant.

Files changed:
 .changeset/fn-8151-new-themes.md                   |   7 +
 docs/dashboard-guide.md                            |   3 +-
 packages/core/src/types/execution-and-ui.ts        |   4 +
 .../app/__tests__/new-color-themes.test.ts         | 116 ++++++++++++
 .../dashboard/app/components/ThemeSelector.css     |  42 +++++
 packages/dashboard/app/components/themeOptions.ts  |   3 +
 packages/dashboard/app/index.html                  |   2 +-
 packages/dashboard/app/public/theme-data.css       | 202 +++++++++++++++++++++
 packages/desktop/src/renderer/index.html           |   3 +
 9 files changed, 380 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-8151

Fusion-Task-Lineage: d97973a7-3387-4b98-b150-8ac2e838bfa9

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 18:18:35 -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
e7c5de0a6e FN-8138: add restart controls after Settings updates
Expose a supervised restart affordance after an in-app update succeeds.

- Detect restart capability while update results are visible and handle scheduled or failed restart requests
- Add accessible restart status, capability guidance, responsive styling, and English translations
- Cover restart states across desktop and mobile Settings modal tests

Files changed:
 .../fn-8138-settings-restart-after-update.md       |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 .../dashboard/app/components/SettingsModal.css     |  21 +++-
 .../dashboard/app/components/SettingsModal.tsx     | 110 ++++++++++++++--
 .../__tests__/SettingsModal.general.test.tsx       | 139 ++++++++++++++++++++-
 .../__tests__/SettingsModal.test-harness.tsx       |   4 +
 .../components/__tests__/settings-mobile.test.tsx  |   4 +-
 packages/i18n/locales/en/app.json                  |   4 +
 8 files changed, 274 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-8138

Fusion-Task-Lineage: 24e8cb9a-ad64-4419-b3ce-461850624365

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 14:40:26 -07:00
gsxdsm
4df5c62854 FN-8133: add local codebase context metrics
Expose local codebase token estimates and apparent disk size in the project dashboard.

- Add a bounded, cached, symlink-safe codebase metrics service and project API.
- Display token and disk indicators across Command Center overview states.
- Add formatting, route, UI, and metric calibration coverage with a minor changeset.

Files changed:
 .changeset/fn-8133-codebase-metrics.md             |   7 +
 docs/dashboard-guide.md                            |   2 +-
 .../dashboard/app/__tests__/api-projects.test.ts   |  12 ++
 packages/dashboard/app/api/legacy.ts               |  14 ++
 .../components/command-center/CommandCenter.css    |   5 +
 .../components/command-center/CommandCenter.tsx    |  65 +++++++--
 .../CommandCenter.mobile-chart-layout.test.ts      |   4 +
 .../__tests__/CommandCenter.test.tsx               |  10 ++
 .../__tests__/SystemStatsArea.test.tsx             |   8 +
 .../command-center/areas/SystemStatsArea.tsx       |   8 +-
 .../app/utils/__tests__/formatBytes.test.ts        |  18 +++
 packages/dashboard/app/utils/formatBytes.ts        |  11 ++
 .../src/lib/__tests__/codebase-metrics.test.ts     |  62 ++++++++
 .../lib/__tests__/fixtures/token-corpus/README.md  |  17 +++
 .../fixtures/token-corpus/calibration/component.ts |   1 +
 .../fixtures/token-corpus/calibration/config.json  |   1 +
 .../lib/__tests__/fixtures/token-corpus/example.ts |   1 +
 .../lib/__tests__/fixtures/token-corpus/notes.md   |   3 +
 .../fixtures/token-corpus/reference-counts.json    |   9 ++
 .../__tests__/fixtures/token-corpus/settings.json  |   1 +
 .../lib/__tests__/fixtures/token-corpus/view.tsx   |   1 +
 packages/dashboard/src/lib/codebase-metrics.ts     | 161 +++++++++++++++++++++
 .../__tests__/codebase-metrics-route.test.ts       |  34 +++++
 .../src/routes/register-project-routes.ts          |  19 +++
 24 files changed, 456 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-8133

Fusion-Task-Lineage: d591636b-d4b8-469e-8788-c4516eeb8405

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 14:08:43 -07:00
gsxdsm
6f99fdb18b FN-8137: add PR checks refresh control
Let GitHub pull request previews refresh their current check status and comments.

- Add an accessible refresh action that bypasses the selected PR detail cache
- Prevent stale refresh responses from overwriting cached or visible PR details
- Cover refresh behavior across modal and embedded views, and document the control
- Add a minor changeset for the new GitHub import capability

Files changed:
 .changeset/fn-8137-refresh-pr-checks.md            |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 .../dashboard/app/components/GitHubImportModal.css |  29 ++++++
 .../dashboard/app/components/GitHubImportModal.tsx |  48 +++++++--
 .../__tests__/GitHubImportModal.test.tsx           | 115 +++++++++++++++++++++
 5 files changed, 191 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-8137

Fusion-Task-Lineage: 1d4ffa9d-635c-4d59-b17c-63075f6d8c5e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 13:34:54 -07:00
gsxdsm
255e9c19b9 FN-8134: add update banner restart action
Offer a supervised Fusion restart directly after an in-app update succeeds.

- Add restart capability detection, scheduling feedback, and manual-restart guidance to the update banner
- Cover supported, unsupported, failed, loading, and mobile restart states
- Document the update flow and add a minor CLI changeset

Files changed:
 .changeset/fn-8134-restart-after-update.md         |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 packages/dashboard/app/components/UpdateAvailableBanner.css |  10 +-
 packages/dashboard/app/components/UpdateAvailableBanner.tsx | 100 +++++++++++++--
 packages/dashboard/app/components/__tests__/UpdateAvailableBanner.test.tsx | 139 ++++++++++++++++++---
 packages/i18n/locales/en/app.json                  |   4 +
 6 files changed, 236 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-8134

Fusion-Task-Lineage: 84f9290e-aa87-4144-a9db-da445dcb76e3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 13:29:25 -07:00
gsxdsm
47f9aa7144 FN-8124: reuse dashboard theme dropdown in Settings
Unify Settings appearance theme selection with the dashboard control.

- Reuse ThemeDropdown and its custom-color picker in ThemeSelector
- Remove the obsolete Settings color-theme grid styles
- Cover shared dropdown interactions and document the unified control
- Add a patch changeset for the Settings theme selector

Files changed:
 .changeset/FN-8124-settings-theme-dropdown.md      |   7 +
 docs/dashboard-guide.md                            |   2 +-
 .../dashboard/app/components/ThemeDropdown.tsx     |   9 +-
 .../dashboard/app/components/ThemeSelector.css     |  48 --
 .../dashboard/app/components/ThemeSelector.tsx     |  49 +-
 .../components/__tests__/ThemeSelector.test.tsx    | 778 ++-------------------
 .../__tests__/CommandCenterControls.test.tsx       |  18 +-
 7 files changed, 109 insertions(+), 802 deletions(-)

Fusion-Task-Id: FN-8124

Fusion-Task-Lineage: 6bd87f2a-d9e1-4374-8f54-1a2266c4004f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 12:48:51 -07:00
gsxdsm
3b6bfeee46 FN-8109: import PR comments as resolve feedback tasks
Enable GitHub comment imports to create independent resolve-feedback tasks.

- Add comment import controls, status feedback, and client API support
- Create validated GitHub comment tasks with quoted feedback and provenance
- Label pull request imports as resolve-feedback work and document the workflow

Files changed:
 docs/dashboard-guide.md                            |  4 +-
 packages/dashboard/app/api/legacy.ts               | 20 ++++++
 .../dashboard/app/components/GitHubImportModal.css | 35 +++++++++
 .../dashboard/app/components/GitHubImportModal.tsx | 82 +++++++++++++++++++---
 .../__tests__/GitHubImportModal.test.tsx           | 56 +++++++++++++++
 .../dashboard/src/__tests__/routes-github.test.ts  | 73 +++++++++++++++++++
 .../dashboard/src/routes/register-git-github.ts    | 48 ++++++++++++-
 7 files changed, 304 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-8109

Fusion-Task-Lineage: bdb4477b-31b4-4e01-8439-b72437ff692d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 11:58:27 -07:00
gsxdsm
68583b5c68 FN-8110: add failed-check fix task action
Add an in-context recovery path for failed GitHub PR checks.

- Add a per-failed-check Create fix task action with progress and result feedback.
- Compose fix-task context from the selected PR, repository, branches, check status, and details URL.
- Cover the GitHub import behavior and document the feature release.

Files changed: .changeset/fn-8110-pr-failed-check-fix-task.md     |   7 +
 docs/dashboard-guide.md                            |   2 +-
 .../dashboard/app/components/GitHubImportModal.css |  23 ++++
 .../dashboard/app/components/GitHubImportModal.tsx |  91 ++++++++++++-
 .../__tests__/GitHubImportModal.test.tsx           | 148 +++++++++++++++++++++
 5 files changed, 269 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-8110

Fusion-Task-Lineage: 0f69a4e2-d950-4a9f-925e-bd56fb6bf45d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 11:16:06 -07:00
gsxdsm
72378cb4f2 FN-8037: add resizable image preview windows
Make pending task images compact and inspectable across task creation surfaces.

- Extract shared pending-image thumbnail controls for Quick Add, Task Form, and inline creation.
- Open full images in a responsive, movable, resizable FloatingWindow with Escape focus restoration.
- Add styling, coverage, operator documentation, and a minor changeset.

Files changed:
 .changeset/fn-8037-image-preview-modal.md          |   7 ++
 docs/dashboard-guide.md                            |   4 +-
 .../quick-entry-image-preview-modal.test.tsx       |  60 ++++++++++
 .../dashboard/app/components/FloatingWindow.css    |  22 ++++
 .../dashboard/app/components/InlineCreateCard.css  |  14 ++-
 .../dashboard/app/components/InlineCreateCard.tsx  |  26 ++---
 .../app/components/PendingImagePreviews.css        |  35 ++++++
 .../app/components/PendingImagePreviews.tsx        | 121 +++++++++++++++++++++
 .../dashboard/app/components/QuickEntryBox.tsx     |  27 ++---
 packages/dashboard/app/components/TaskForm.tsx     |  26 ++---
 10 files changed, 280 insertions(+), 62 deletions(-)

Fusion-Task-Id: FN-8037
Fusion-Task-Lineage: 3d92f695-67c9-4791-bfcc-ad25f6aa56f4
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 04:58:03 -07:00
gsxdsm
566158232b FN-8069: toggle dashboard keyboard shortcuts
Dashboard keyboard shortcuts now toggle their associated dashboard interfaces.

- Dispatch toggle callbacks for every configurable dashboard shortcut.
- Restore retained prior views and preserve repeated Settings/Command Center history entries.
- Add regression coverage, documentation, and a dashboard feature changeset.

Files changed:
 .changeset/fn-8069-shortcut-toggle.md              |   7 +
 docs/dashboard-guide.md                            |   3 +
 packages/dashboard/app/App.tsx                     |  48 ++++--
 .../app/__tests__/App.keyboard-shortcuts.test.tsx  | 172 +++++++++++++++++----
 .../useDashboardKeyboardShortcuts.test.tsx         |  82 +++++-----
 .../app/hooks/useDashboardKeyboardShortcuts.ts     |  40 ++---
 .../app/utils/dashboardShortcutToggles.ts          |  41 +++++
 7 files changed, 290 insertions(+), 103 deletions(-)

Fusion-Task-Id: FN-8069

Fusion-Task-Lineage: c2e6d67a-d215-46dd-9803-78ffb49fbbda

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 03:17:35 -07:00
gsxdsm
99b79e456b FN-8066: show reverted badges for completed tasks
Persist git-revert provenance and display it on completed task cards.

- Stamp source tasks after clean or already-reverted git outcomes.
- Render localized Reverted badges in completed and archived task views.
- Cover metadata, route, and card behavior with regression tests.

Files changed:
 .changeset/fn-8066-reverted-badge.md               |  7 +++
 docs/dashboard-guide.md                            |  2 +
 packages/dashboard/app/components/TaskCard.css     | 14 ++++-
 packages/dashboard/app/components/TaskCard.tsx     | 20 ++++++-
 .../app/components/__tests__/TaskCard.test.tsx     | 67 ++++++++++++++++++++++
 .../app/utils/__tests__/taskRevert.test.ts         | 17 ++++++
 packages/dashboard/app/utils/taskRevert.ts         | 11 ++++
 .../src/__tests__/task-revert-route.test.ts        | 35 +++++++++++
 .../src/routes/register-task-workflow-routes.ts    | 30 ++++++++++
 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 +
 16 files changed, 213 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-8066

Fusion-Task-Lineage: 2a071c14-7e5d-4161-ab0c-158f47ad9c22

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 03:00:59 -07:00
gsxdsm
f3b68c9fff FN-8065: preview plans before refinement questions
Show a read-only plan preview at the Planning Mode deepening checkpoint.

- Persist pending plan details on the checkpoint question for fresh and restored sessions.
- Render formatted plan content and deliverables above refinement choices.
- Cover preview behavior and document the checkpoint flow.

Files changed:
 .../fn-8065-planning-checkpoint-plan-preview.md    |  7 +++
 docs/dashboard-guide.md                            |  3 +-
 packages/core/src/types.ts                         | 11 ++++
 .../dashboard/app/components/PlanningModeModal.css | 60 ++++++++++++++++++++++
 .../dashboard/app/components/PlanningModeModal.tsx | 44 ++++++++++++++++
 .../PlanningModeModal.planning-flow.test.tsx       | 24 ++++++++-
 .../planning-interview-formatters.test.ts          | 19 +++++++
 packages/dashboard/src/planning.ts                 | 10 ++++
 8 files changed, 175 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-8065

Fusion-Task-Lineage: 13cd52c3-af82-4723-a6b1-3366775213e1

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 02:54:33 -07:00
gsxdsm
e87b51bd07 FN-8054: add pinned chat conversations
Add durable, scoped pinning for Direct chat conversations.

- Add pinned session persistence, migration coverage, and archive-safe row locking.
- Enforce a three-conversation per-project pin limit through the chat API.
- Add desktop and mobile pin controls, sorting, indicators, and regression tests.

Files changed:
 .changeset/fn-8054-pin-conversations.md            |  7 ++
 docs/dashboard-guide.md                            |  2 +
 .../postgres/satellite-db-injected-stores.test.ts  | 13 ++++
 packages/core/src/async-chat-store.ts              | 27 ++++++++
 packages/core/src/chat-store.ts                    | 63 ++++++++++++++++--
 packages/core/src/chat-types.ts                    |  9 +++
 .../core/src/postgres/migrations/0000_initial.sql  |  1 +
 .../postgres/migrations/0012_chat_session_pins.sql |  8 +++
 packages/core/src/postgres/postgres-health.ts      |  3 +
 packages/core/src/postgres/schema-applier.ts       | 30 ++++++++-
 packages/core/src/postgres/schema/project.ts       |  3 +
 packages/dashboard/app/api/legacy.ts               |  1 +
 packages/dashboard/app/components/ChatView.css     | 32 +++++++++-
 packages/dashboard/app/components/ChatView.tsx     | 74 ++++++++++++++++++++--
 .../dashboard/app/hooks/__tests__/useChat.test.ts  | 21 ++++++
 packages/dashboard/app/hooks/useChat.ts            | 72 +++++++++++++++++----
 .../dashboard/src/routes/register-chat-routes.ts   | 25 +++++++-
 17 files changed, 366 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-8054

Fusion-Task-Lineage: 088cb01c-582b-4f56-a222-214da90ff356

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 02:35:29 -07:00
gsxdsm
a821bce236 FN-8030: move room thinking control into composer
Move room-level thinking effort from the crowded thread header into the composer Brain popover.

- Reuse the thinking-level control in a room-specific level-only mode.
- Preserve room thinking persistence and add desktop, mobile, and failure coverage.
- Update room-chat documentation and publish a patch changeset.

Files changed:
 .changeset/fn-8030-room-thinking-composer.md       |  7 +++
 docs/dashboard-guide.md                            |  2 +-
 .../app/components/ChatThinkingLevelControl.tsx    | 12 +++-
 packages/dashboard/app/components/ChatView.css     | 16 -----
 packages/dashboard/app/components/ChatView.tsx     | 54 +++++++---------
 .../__tests__/ChatThinkingLevelControl.test.tsx    | 20 ++++++
 .../components/__tests__/ChatView.rooms.test.tsx   | 72 +++++++++++++++++++---
 .../__tests__/ChatView.thinking-level.test.tsx     | 23 ++++---
 8 files changed, 137 insertions(+), 69 deletions(-)

Fusion-Task-Id: FN-8030

Fusion-Task-Lineage: 31054538-e620-412d-98ba-26fba34a6af8

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 01:38:49 -07:00
gsxdsm
3f5d7c2147 FN-8049: preserve desktop geometry across sheet views
Prevent full-screen sheet opens from replacing saved desktop FloatingWindow geometry.

- Suspend geometry restoration and writes for sheet modal surfaces without adding storage keys.
- Preserve Artifact Gallery geometry at both narrow-width and short-height sheet breakpoints.
- Cover sheet persistence behavior and document desktop geometry restoration.

Files changed:
 docs/dashboard-guide.md                            |   3 +
 packages/dashboard/app/App.tsx                     |   4 +
 .../dashboard/app/components/ArtifactsGallery.tsx  |   3 +
 .../dashboard/app/components/FileBrowserModal.tsx  |   2 +
 .../dashboard/app/components/FloatingWindow.tsx    |  25 ++++-
 .../dashboard/app/components/GitHubImportModal.tsx |   4 +
 .../app/components/MissionInterviewModal.tsx       |   2 +
 .../dashboard/app/components/PrCreateModal.tsx     |   2 +
 .../app/components/ScheduledTasksModal.tsx         |   2 +
 .../app/components/WorkflowNodeEditor.tsx          |   2 +
 .../components/__tests__/FloatingWindow.test.tsx   | 118 ++++++++++++++++++++-
 .../app/hooks/__tests__/useViewportMode.test.ts    |  13 ++-
 packages/dashboard/app/hooks/useViewportMode.ts    |  15 +++
 13 files changed, 190 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-8049

Fusion-Task-Lineage: 4c659046-694a-42fa-aca1-e702c1d3842a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-16 01:19:43 -07:00
gsxdsm
d6f94693b2 FN-8028: widen tablet chat message bubbles
Increase tablet agent-side chat bubble width while preserving responsive behavior.

- Raise the tablet assistant, streaming, and failure bubble cap to 92%.
- Update the responsive CSS contract and dashboard documentation.

Files changed:
 docs/dashboard-guide.md                                              | 2 +-
 packages/dashboard/app/components/ChatView.css                       | 5 ++++-
 packages/dashboard/app/components/__tests__/ChatView.core-contracts.test.tsx        | 4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-8028

Fusion-Task-Lineage: 2158a4c8-f07b-4e96-bcf2-80ebe6b08515

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 23:49:24 -07:00
gsxdsm
728eb1adaf FN-8003: add planning prompt recovery copy action
Preserve original planning prompts for recovery from stalled or off-track interviews.

- Add Copy prompt actions to active interview and error recovery surfaces.
- Restore original prompts for resumable sessions and provide clipboard feedback.
- Cover prompt copying across active, error, resumed, and absent-prompt states.

Files changed:
 docs/dashboard-guide.md                            |   3 +
 .../dashboard/app/components/PlanningModeModal.css |  33 +++++
 .../dashboard/app/components/PlanningModeModal.tsx | 116 +++++++++++++----
 .../PlanningModeModal.planning-flow.test.tsx       | 139 +++++++++++++++++++++
 4 files changed, 266 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-8003

Fusion-Task-Lineage: 11c0ec9d-290b-4793-9571-002d4b429c5e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 20:32:19 -07:00
gsxdsm
adcba0eed2 FN-8017: add imported-item filter to task import
Add a persisted control that declutters Import Tasks by hiding items already on the board.

- Filter imported GitHub issues, pull requests, and GitLab resources while retaining full imported counts.
- Clear hidden selections, show an all-imported empty state, and preserve the preference per project.
- Document the toggle, add styling, coverage, and a minor changeset.

Files changed:
 .changeset/fn-8017-hide-imported-toggle.md         |   7 ++
 docs/dashboard-guide.md                            |   4 +-
 .../dashboard/app/components/GitHubImportModal.css |  21 ++++
 .../dashboard/app/components/GitHubImportModal.tsx |  70 ++++++++++++-
 .../__tests__/GitHubImportModal.test.tsx           | 108 +++++++++++++++++++++
 packages/dashboard/app/hooks/modalPersistence.ts   |   6 ++
 6 files changed, 209 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-8017

Fusion-Task-Lineage: 5f03fe92-6dce-4de7-a745-0c8a46dc2dbb

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 19:27:00 -07:00
gsxdsm
7cec078054 FN-8016: scope task popups to their opening view
Scope task-detail popups to their origin dashboard view by default.

- Default per-view popup scoping while retaining a legacy global-popup opt-out.
- Key popup lifecycle, navigation, and Escape dismissal by task and origin view.
- Update settings copy, documentation, localization, and regression coverage.

Files changed:
 .changeset/fn-8016-task-popup-view-scoping.md      |   7 ++
 docs/dashboard-guide.md                            |   4 +-
 .../core/src/__tests__/settings-defaults.test.ts   |   4 +-
 packages/core/src/settings-schema.ts               |   6 +-
 packages/core/src/types.ts                         |   6 +-
 packages/dashboard/app/App.tsx                     |  67 ++++++-----
 .../app/__tests__/App.keyboard-shortcuts.test.tsx  |  14 ++-
 .../app/__tests__/App.taskPopupViewGating.test.tsx | 125 +++++++--------------
 .../dashboard/app/components/SettingsModal.tsx     |   2 +-
 .../settings/sections/AppearanceSection.tsx        |   6 +-
 .../sections/__tests__/AppearanceSection.test.tsx  |  18 ++-
 .../app/hooks/__tests__/useAppSettings.test.ts     |  15 +++
 .../app/hooks/__tests__/usePoppedOutTasks.test.ts  |  28 ++---
 packages/dashboard/app/hooks/useAppSettings.ts     |   8 +-
 packages/dashboard/app/hooks/usePoppedOutTasks.ts  |  14 +--
 packages/i18n/locales/en/app.json                  |   4 +-
 packages/i18n/src/resources.d.ts                   |   4 +-
 17 files changed, 158 insertions(+), 174 deletions(-)

Fusion-Task-Id: FN-8016

Fusion-Task-Lineage: e33beeae-0ce3-4202-95dc-6fb2d26f9770

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 19:03:44 -07:00
gsxdsm
66ae82af5b FN-8007: align concurrency current-use markers
Align dashboard and footer concurrency markers with their native range thumbs.

- Map running counts in min-relative slider coordinates and clamp them to the configured cap
- Standardize native slider thumb dimensions and marker geometry across browsers
- Add dashboard coverage and document the marker behavior

Files changed:
 .changeset/fn-8007-concurrency-dot-alignment.md    |   7 +
 docs/dashboard-guide.md                            |   8 +-
 .../dashboard/app/components/EngineControlMenu.css |  20 ++-
 .../dashboard/app/components/EngineControlMenu.tsx |  19 ++-
 .../__tests__/EngineControlMenu.test.tsx           |  96 +++++-------
 .../command-center/CommandCenterControls.css       |  22 ++-
 .../command-center/CommandCenterControls.tsx       |  19 ++-
 .../__tests__/CommandCenterControls.test.tsx       | 164 +++++++++++++++++++++
 8 files changed, 277 insertions(+), 78 deletions(-)

Fusion-Task-Id: FN-8007

Fusion-Task-Lineage: 9ad8ee0b-09da-413e-96bc-530c897cb32e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 18:43:37 -07:00
gsxdsm
22fde62510 FN-8001: open footer planning sessions in Planning view
Navigate Background Tasks footer planning rows into the embedded Planning view so resume actually loads planning mode.

- Call handleChangeTaskView("planning") when opening a background planning session
- Extend App tests for footer planning resume and unchanged non-planning session routes
- Update dashboard-guide planning resume entry-point docs

Files changed:
 docs/dashboard-guide.md                            |  4 +-
 packages/dashboard/app/App.tsx                     |  5 ++
 .../app/components/__tests__/App.test.tsx          | 94 +++++++++++++++++++---
 3 files changed, 91 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-8001

Fusion-Task-Lineage: 402ece21-5f29-4304-a3aa-ef7004a30155

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 16:58:56 -07:00
gsxdsm
0b06026c74 FN-7992: open GitHub import issue/PR details in FloatingWindow
Show GitHub/GitLab import item details in a draggable FloatingWindow instead of an embedded two-pane preview, simplifying the import modal layout.

- Replace inline list/preview split with FloatingWindow for issue and PR detail
- Remove two-pane resize handle, mobile list/preview switch, and related CSS
- Keep close confirmation when discarding detail-window changes
- Update FloatingWindow styles and dashboard guide for floating import details
- Slim GitHubImportModal tests while restoring core import-modal coverage

Files changed:
 docs/dashboard-guide.md                            |   6 +-
 .../dashboard/app/components/FloatingWindow.css    |  23 +-
 .../dashboard/app/components/GitHubImportModal.css | 359 +-------
 .../dashboard/app/components/GitHubImportModal.tsx | 347 ++------
 .../components/__tests__/FloatingWindow.test.tsx   |   2 +-
 .../__tests__/GitHubImportModal.test.tsx           | 909 ++-------------------
 6 files changed, 139 insertions(+), 1507 deletions(-)

Fusion-Task-Id: FN-7992

Fusion-Task-Lineage: 0991e28c-d793-4a41-9312-6e250e8a09c4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 16:51:34 -07:00
gsxdsm
c0bef0bfbe FN-7969: deprecate unused builtin Coding (Ideas) workflow
Hide builtin:coding-ideas from new selection after occupancy preflight, while keeping it resolvable for any existing task selections.

- Add builtin:coding-ideas to DEPRECATED_BUILTIN_WORKFLOW_IDS so it is excluded from defaultEnabledBuiltinWorkflowIds and listWorkflowDefinitions selection listings
- Keep getBuiltinWorkflow / direct resolution working for pre-existing Coding (Ideas) task selections
- Document deprecation and custom-workflow copy path in dashboard-guide and workflow-steps
- Extend builtin-workflows and settings-sections tests for hide-from-selection + management/resolution retention
- Add minor changeset for @runfusion/fusion

Files changed:
 .changeset/fn-7969-deprecate-coding-ideas.md       |  7 +++++++
 docs/dashboard-guide.md                            |  2 +-
 docs/workflow-steps.md                             |  2 +-
 .../core/src/__tests__/builtin-workflows.test.ts   | 28 ++++++++++++++--------
 packages/core/src/builtin-workflows.ts             |  9 +++----
 packages/core/src/types.ts                         |  9 ++++---
 .../app/__tests__/settings-sections.test.tsx       |  2 ++
 7 files changed, 43 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-7969

Fusion-Task-Lineage: 578ae727-e1b6-4ff9-a3a2-d1228c50fba6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 16:47:01 -07:00
gsxdsm
e83116a970 FN-7991: mark import-screen items as imported immediately
Mark successful GitHub/GitLab import rows as Imported right away via optimistic local URL state, without waiting for the parent tasks prop round-trip.

- Add optimisticImportedUrls unioned with tasks-derived importedUrls via isUrlImported
- Populate on successful GitHub issue/PR and GitLab imports; clear on modal reset and source change
- Disable re-import and show Imported badge on rows, counts, and import buttons for optimistic URLs
- Cover optimistic import surfaces in GitHubImportModal tests
- Document the behavior in the dashboard guide and add a patch changeset

Files changed:
 .changeset/fn-7991-import-screen-optimistic-imported.md   |  7 +++
 docs/dashboard-guide.md                                    |  2 +-
 packages/dashboard/app/components/GitHubImportModal.tsx    | 57 +++++++++++++++++-----
 packages/dashboard/app/components/__tests__/GitHubImportModal.test.tsx | 56 ++++++++++++++++++---
 4 files changed, 103 insertions(+), 19 deletions(-)

Fusion-Task-Id: FN-7991

Fusion-Task-Lineage: ddfb249a-e2e8-4723-a86d-7f6edc74305c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 15:51:54 -07:00
gsxdsm
5ff7a20738 FN-7976: fix mailbox artifact open and view-task popups
Fix Mailbox/Artifacts media auth and ensure View task always opens a usable popup.

- Add artifactMediaUrlWithToken for authenticated img/video/audio/link loads while keeping artifactMediaUrl token-free for fetch and HTML previews
- Load script-capable HTML artifact previews via Authorization + revocable blob URL so tokens never reach allow-scripts iframes
- Keep non-board/list task popups (Mailbox, Documents) visible even when board/list-only popup gating is enabled
- Upgrade duplicate popOut entries so reopening a task refreshes snapshot and origin
- Document the behavior and add a patch changeset

Files changed:
 .changeset/fn-7976-mailbox-artifact-fixes.md       |  7 +++
 docs/dashboard-guide.md                            |  2 +-
 packages/dashboard/app/App.tsx                     | 15 +++--
 .../app/__tests__/App.taskPopupViewGating.test.tsx | 10 ++-
 .../dashboard/app/__tests__/api-artifacts.test.ts  | 12 +++-
 .../api/__tests__/legacy-artifact-media.test.ts    | 27 ++++++++
 packages/dashboard/app/api/legacy.ts               | 21 +++++--
 .../dashboard/app/components/ArtifactsGallery.tsx  | 72 ++++++++++++++++++----
 .../dashboard/app/components/DocumentsView.tsx     |  4 +-
 .../app/components/MailboxArtifactAttachment.tsx   |  6 +-
 .../dashboard/app/components/TaskDocumentsTab.tsx  |  6 +-
 .../components/__tests__/DocumentsView.test.tsx    | 31 ++++++----
 .../__tests__/MailboxArtifactAttachment.test.tsx   | 24 ++++----
 .../app/components/__tests__/MailboxView.test.tsx  |  8 +--
 .../components/__tests__/TaskDocumentsTab.test.tsx | 16 ++---
 .../app/hooks/__tests__/usePoppedOutTasks.test.ts  |  9 ++-
 packages/dashboard/app/hooks/usePoppedOutTasks.ts  | 17 +++--
 17 files changed, 206 insertions(+), 81 deletions(-)

Fusion-Task-Id: FN-7976

Fusion-Task-Lineage: 4c25b3a6-5836-4629-b33e-647f213e3261

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 15:30:55 -07:00
gsxdsm
a75b2f4bb8 FN-7980: dismiss mobile task popups on swipe/back without leaving board
Register mobile task popups on the Fusion nav stack so browser Back, iOS edge-swipe, and Android Back close the popup and keep the board/list visible.

- Push a modal nav entry when opening a mobile task popup and clean it up on close
- Route FloatingWindow and shortcut closes through nav-aware popup close
- Add swipe-back tests for board and list popup dismissal
- Document popup Back behavior in the dashboard guide

Files changed:
 docs/dashboard-guide.md                            |  3 +-
 packages/dashboard/app/App.tsx                     | 35 +++++++--
 .../__tests__/TaskDetail.swipe-back.test.tsx       | 84 +++++++++++++++++++++-
 3 files changed, 114 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-7980

Fusion-Task-Lineage: e321a1df-e271-41c0-81af-3560d759f7bb

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 14:23:23 -07:00
gsxdsm
d893a026df FN-7971: hide GitLab import tab when GitLab is disabled
Hide the Import Tasks GitLab provider affordance when gitlabEnabled is off, coerce restored GitLab state to GitHub, and document the behavior.

- Gate GitLab provider tab visibility on effective gitlabEnabled and wait for settings before replaying persisted GitLab auto-load
- Coerce disabled GitLab provider preference to GitHub without firing GitLab fetch/import requests
- Cover hide/show/coerce paths in GitHubImportModal tests and update dashboard guide copy
- Add patch changeset for the published package

Files changed:
 .changeset/fn-7971-hide-gitlab-when-disabled.md    |  7 +++
 docs/dashboard-guide.md                            |  4 +-
 .../dashboard/app/components/GitHubImportModal.tsx | 27 ++++++++--
 .../__tests__/GitHubImportModal.test.tsx           | 62 +++++++++++++++++++---
 4 files changed, 88 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-7971

Fusion-Task-Lineage: e645a4a7-85e0-4635-8dad-f5839390e5c5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-15 12:47:14 -07:00
gsxdsm
bc2d22df6e feat(dashboard): offer AI translation in Import Tasks preview (#2128)
## Summary

Import Tasks can now offer on-demand AI translation when a selected
GitHub or GitLab issue/PR title and body appear to be in a different
language than the active dashboard locale.

- Detect foreign-language content with a conservative client heuristic
(Unicode scripts + Latin stopwords)
- Show an opt-in banner: **Translate**, then **Show original / Show
translation**, plus **Dismiss**
- Call new `POST /api/ai/translate-text` (shared AI-helper rate limit
with refine/draft)
- Translation is **display-only** in the preview; imported task text
stays the original source language

## Why

Operators working in a non-English dashboard (or reading
non-dashboard-language issues) needed a way to understand import
candidates without leaving the preview or changing what gets imported.

## Test plan

- [x] Unit tests for language detection (`detectContentLanguage`)
- [x] Unit tests for translate request validation, response parsing, and
AI agent path
- [x] GitHub import modal: French content shows translate controls;
English content does not
- [x] Dashboard typecheck clean for app + server packages
- [ ] Manual: open Import Tasks with dashboard language English, select
a French/Korean issue, translate and toggle original
- [ ] Manual: confirm Import still creates the task with original
title/body
- [ ] Manual: dismiss banner for a selection and confirm it stays
dismissed for that item

## Notes

- Comments are not translated (title + body only)
- zh-CN / zh-TW share a CJK family so Chinese content does not prompt
translation when the UI is either Chinese locale
- Secondary locale catalogs have empty placeholders for the new
`git.translate*` keys (runtime falls back to English)
2026-07-15 02:18:43 -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
03966ecb79 Fix multi-project branch-group route store scoping (#2085)
## Summary

Conflict resolution for closed
[#2074](https://github.com/Runfusion/Fusion/pull/2074) (FN-001
multi-project branch-group store scoping), rebased onto current `main`.

#2074 closed when its fork head was briefly reset to `main` during a ref
update; maintainer write access to the fork head only works while the PR
is open, so that PR could not be reopened without new fork commits.

This branch carries the same fix:

- Request-scoped `TaskStore` for branch-group
list/read/assign/promote/abandon
- Integrated reconcile/close uses the request store for cwd +
persistence
- Compatible with async branch-group store APIs and main’s
CentralProjectIdentity (`projectId` trim)
- Postgres durable FN-7438 tests + padded `projectId` regression

## Verification

- `FUSION_DASHBOARD_DEEP=1 pnpm --filter @fusion/dashboard exec vitest
run --project dashboard-api src/__tests__/routes-branch-groups.test.ts
src/__tests__/integrated-routers-group-pr-token.test.ts
src/__tests__/routes-context-project-identity.test.ts
--silent=passed-only --reporter=dot` — 3 files, 41 tests passed.

---------

Co-authored-by: Tchorizo <295840812+Tchorizo@users.noreply.github.com>
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-07-14 00:12:22 -07:00
gsxdsm
4e7e013d6f FN-7947: add Plan action to context menu for pre-execution task cards
Adds a Plan action to Board/List task context menus so triage/hold/intake cards can jump straight into Planning Mode without duplicating a task.

- Add `onPlan` handler and `isPreExecutionHoldColumn` gate to `TaskContextMenu` so Plan only appears for pre-execution (triage/intake/hold) columns, and only when a host wires the handler
- Wire the Plan action through `Board.tsx`, `Column.tsx`, `ListView.tsx`, and `WorktreeGroup.tsx` so both board and list views expose the new menu item
- Surface the Plan entry point on `TaskCard.tsx`
- Add test coverage in `TaskContextMenu.test.tsx`, `TaskCard.test.tsx`, and `ListView.test.tsx` for the new gating/wiring behavior
- Document the new action in `docs/dashboard-guide.md`
- Add a minor changeset for `@runfusion/fusion`

Files changed:
 .changeset/fn-7947-plan-context-menu-action.md     |  7 ++
 docs/dashboard-guide.md                            | 10 ++-
 packages/dashboard/app/components/Board.tsx        | 10 ++-
 packages/dashboard/app/components/Column.tsx       |  4 +
 packages/dashboard/app/components/ListView.tsx     | 15 +++-
 packages/dashboard/app/components/TaskCard.tsx     | 24 +++++-
 packages/dashboard/app/components/TaskContextMenu.tsx   | 18 ++++
 packages/dashboard/app/components/WorktreeGroup.tsx     |  9 ++
 packages/dashboard/app/components/__tests__/ListView.test.tsx     | 21 +++++
 packages/dashboard/app/components/__tests__/TaskCard.test.tsx     | 96 ++++++++++++++++++++++
 packages/dashboard/app/components/__tests__/TaskContextMenu.test.tsx  | 32 ++++++++
 11 files changed, 236 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-7947

Fusion-Task-Lineage: 41c759a2-e76b-4771-9421-c9805c4596e5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-13 10:14:22 -07:00
gsxdsm
7cc622bed2 FN-7946: auto-retry stuck Planning Mode AI generation up to 3 times
Planning Mode now automatically retries a stuck or terminally-errored AI
generation session up to three times before falling back to the permanent
Retry/Dismiss error panel, reducing manual retries for transient failures.

- Add a bounded (MAX_PLANNING_AUTO_RETRIES = 3) client-side auto-retry that
  reuses the existing /planning/:id/retry endpoint whenever the SSE stream's
  onError, a session reload, or the stuck-session poll observes a terminal
  "error" status.
- Track the retry budget in refs (planningAutoRetryAttemptRef,
  planningAutoRetryInFlightRef) so async SSE/poll/loadSession handlers share
  a single in-flight guard, with the current attempt mirrored into state
  (isAutoRetrying/autoRetryAttempt) for the UI.
- Reset the retry budget whenever the session makes real progress (reaches
  a new question or a completed summary), and surface the permanent
  Retry/Dismiss error view once the budget is exhausted.
- Show a "Retrying... (attempt N of 3)" loading message while an automatic
  retry is in flight, distinct from the manual Retry button state.
- Fix a stuck-poll edge case where a terminal error discovered only by the
  poll (missed SSE event) after the auto-retry budget was exhausted left
  the modal spinning on "Generating next question..." forever instead of
  showing the error view.
- Document the new auto-retry behavior in docs/dashboard-guide.md and add a
  minor changeset for @runfusion/fusion.
- Extend PlanningModeModal.planning-flow.test.tsx with coverage for the
  auto-retry budget, single-flight behavior, and the poll-discovered
  terminal-error fallback.

Files changed:
 .changeset/fn-7946-planning-auto-retry.md          |   7 +
 docs/dashboard-guide.md                            |   3 +
 .../dashboard/app/components/PlanningModeModal.tsx | 339 ++++++++++++++------
 .../PlanningModeModal.planning-flow.test.tsx       | 353 ++++++++++++++++++---
 4 files changed, 567 insertions(+), 135 deletions(-)

Fusion-Task-Id: FN-7946
Fusion-Task-Lineage: 42e911dc-9639-46ab-bb4f-bc9060413140
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-13 09:50:48 -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
6b78633b07 FN-7943: keep Quick Chat open when portaled model/thinking-level dropdowns are clicked
Quick Chat's outside-pointer dismissal now recognizes body-portaled dropdown menus (model, thinking-level, agent, dependency, node, priority) as part of the panel instead of treating them as outside clicks.

- Extend FloatingWindow's outside-pointerdown safe-surface selector to include the portaled dropdown classes used by model combobox, model nested menu, dependency, node picker, agent picker, and priority picker menus
- Add regression tests covering pointerdown on each portaled dropdown surface and on a child element inside a portaled dropdown, asserting onClose is not called
- Update dashboard-guide docs to describe that these portal dropdowns are treated as part of the Quick Chat panel for outside-click purposes

Files changed:
 docs/dashboard-guide.md                            |  2 +-
 .../dashboard/app/components/FloatingWindow.tsx    | 19 +++++++-
 .../components/__tests__/FloatingWindow.test.tsx   | 50 ++++++++++++++++++++++
 3 files changed, 69 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7943

Fusion-Task-Lineage: fa91bd43-241c-48b0-8858-16521f383784

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-13 08:15:25 -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
1f9dcea4b6 FN-7935: route mailbox artifact View task to the popped-out task-detail window
Mailbox artifact "View task" now opens the producing task in the same shared, movable/resizable floating task-detail window used elsewhere in the dashboard, instead of the docked task-detail modal.

- MainContent's MailboxView onOpenTask handler now calls popOutTaskDetail(task) after fetchTaskDetail resolves, instead of openDetailTask(task), matching DocumentsView's artifact-task open path
- add regression test verifying mailbox artifact "View task" clicks resolve the task and route to popOutTaskDetail (not openDetailTask)
- update docs/dashboard-guide.md to describe the shared movable/resizable task-detail window behavior
- add changeset (patch) documenting the fix for @runfusion/fusion

Files changed:
 .changeset/fn-7935-mailbox-artifact-view-task-popout.md                        |  7 ++
 docs/dashboard-guide.md                                                        |  2 +-
 packages/dashboard/app/components/dashboard/MainContent.tsx                    |  8 ++-
 .../MainContent.mailbox-view-task.test.tsx                                     | 83 ++++++++++++++++++++++
 4 files changed, 97 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7935

Fusion-Task-Lineage: 51374962-aa36-4390-a6b5-b519e7fc2bf2

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-13 00:50:30 -07:00
gsxdsm
29560021d3 FN-7934: fix chat brain popup clipping in narrow floating windows
Fixes the in-chat model/thinking (Brain) popup being cut off inside a narrow floating Chat window or compact dock on a wide desktop viewport.

- Key the popover's viewport-fitting inset layout on ChatView's .chat-view--narrow class (chat surface width) instead of only the @media (max-width: 768px) browser-viewport query, so narrow floating/docked chat surfaces get the fitted layout too.
- Add narrow-surface CSS rules for .chat-thinking-level-root, .chat-thinking-popover, .chat-thinking-agent-list, and .chat-thinking-popover-list to constrain position/width/max-height to the chat surface.
- Add a CSS-contract regression test asserting both the desktop popover sizing and the new narrow-surface rules stay in sync.
- Update docs/dashboard-guide.md to describe the popup staying fitted to the chat surface for narrow floating Chat windows/compact docks, not just mobile/tablet viewports.
- Add a patch changeset for @runfusion/fusion documenting the fix.

Files changed:
 .changeset/fn-7934-chat-narrow-model-popup.md      |  7 +++++
 docs/dashboard-guide.md                            |  3 +-
 packages/dashboard/app/components/ChatView.css     | 22 +++++++++++++++
 .../__tests__/ChatThinkingLevelControl.test.tsx    | 32 ++++++++++++++++++++++
 4 files changed, 63 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7934

Fusion-Task-Lineage: 30c461c5-a153-4005-8a8c-24f02916a934

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-13 00:48:02 -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
967f3dd900 FN-7923: align task-card cost badge bottom-right with other footer chips
Narrative: Reworked TaskCard footer/meta layout so the cost badge (and its sibling footer-right chips) render inline at the bottom-right of the card-meta row when the footer has no leading content, instead of always sitting in a separate footer row beside the time badge.

- Extracted the footer-right chip cluster (cost, time, retry, near-duplicate, undo-of, GitHub tracking) into a shared `footerRightCluster` render, computed once instead of duplicated inline.
- Added `footerHasLeadingContent`/`footerRightHasContent`/`placeFooterRightInMeta` derivations so the cluster moves into `.card-meta` (bottom-right, inline with other tags) when there's no files-changed button or GitHub-import leading content, and the meta row is visible; otherwise it keeps the existing `.card-footer-row` placement for in-progress/tracked cards.
- Updated dashboard-guide.md wording to describe the cost badge as appearing 'with the card's other footer/meta chips' rather than 'beside the execution-time badge'.
- Extended TaskCard.test.tsx coverage for the new placement behavior.
- Desktop local-runtime.ts: kept the previously-unused `reason` parameter on `requestRestart` explicitly referenced (void reason) for API parity/lint cleanliness, unrelated cosmetic cleanup carried in the same branch.

Files changed:
 docs/dashboard-guide.md                            |   2 +-
 packages/dashboard/app/components/TaskCard.tsx     | 242 +++++++++++----------
 .../app/components/__tests__/TaskCard.test.tsx     |  96 +++++++-
 packages/desktop/src/local-runtime.ts              |   4 +-
 4 files changed, 222 insertions(+), 122 deletions(-)

Fusion-Task-Id: FN-7923

Fusion-Task-Lineage: 7e4c3109-f39e-45c0-af13-358ce54f945c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 23:56:13 -07:00
gsxdsm
30d2e3660d FN-7927: fix Refine feedback modal self-dismissing immediately after opening
The task-detail Refine overlay used a raw onClick backdrop handler with a stopPropagation-wrapped inner modal, so the same click/touch sequence that opened Refine could bubble into the backdrop handler and close it right away; route it through the shared useOverlayDismiss contract instead so it behaves like every other dashboard modal.

- Compute refineOverlayDismissProps via useOverlayDismiss(handleCloseRefineModal) and spread it onto the refine overlay instead of a plain onClick handler
- Drop the redundant stopPropagation-only onClick from the inner .detail-refine-modal div now that the overlay itself no longer misfires on the opening interaction
- Update docs/dashboard-guide.md to document that the Refine modal (Board and List entry points) stays open until an explicit close or an enabled backdrop dismissal
- Add TaskDetailModal.refine.test.tsx regression coverage for the modal staying open across the opening interaction and honoring the dismiss-preference gate
- Add a patch changeset summarizing the fix for @runfusion/fusion release notes

Files changed:
 .changeset/fn-7927-refine-modal.md                 |   7 +
 docs/dashboard-guide.md                            |   8 +-
 .../dashboard/app/components/TaskDetailModal.tsx   |  12 +-
 .../__tests__/TaskDetailModal.refine.test.tsx      | 182 +++++++++++++++++++++
 4 files changed, 201 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-7927

Fusion-Task-Lineage: c7e7cd4a-d103-47e6-93ce-6577147b4795

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 23:37:54 -07:00
gsxdsm
e84fda936a FN-7918: make chat go-to-top contextual and inline edit pencil compact
Reworks chat message footer affordances: the scroll-to-top control now only becomes visible once a message's top is actually clipped above the visible thread viewport, and the edit pencil moves from a standalone action row into the timestamp footer beside user messages.

- ChatView measures assistant message tops on scroll/message changes (rAF-scheduled) and tracks which message IDs are currently clipped above the `.chat-messages` container edge
- StandardChatMessageItem accepts a new `isTopClipped` prop; the go-to-top button stays DOM-mounted (for tests/a11y) but is visually hidden via CSS until clipped
- Merged the assistant thinking/copy/scroll-to-top actions into a single collapsible footer row instead of separate action rows
- Moved the user-message edit pencil into an inline `chat-message-time-row` next to the relative timestamp instead of a standalone action row above it
- Updated ChatView.css for the new inline layout, collapsed-row state, and hidden/visible scroll-to-top button states
- Updated message-edit and scroll-to-top tests to cover the new inline placement and clipped-visibility behavior
- Added changeset and docs/dashboard-guide.md note describing the new behavior

Files changed:
 .changeset/fn-7918-chat-inline-icons.md            |  7 ++
 docs/dashboard-guide.md                            |  6 +-
 packages/dashboard/app/components/ChatView.css     | 80 +++++++++++++++-------
 packages/dashboard/app/components/ChatView.tsx     | 52 +++++++++++++-
 .../app/components/StandardChatSurface.tsx         | 33 +++++++--
 .../__tests__/ChatView.message-edit.test.tsx       | 34 ++++++++-
 .../__tests__/ChatView.scroll-to-top.test.tsx      | 75 +++++++++++++++++++-
 7 files changed, 253 insertions(+), 34 deletions(-)

Fusion-Task-Id: FN-7918
Fusion-Task-Lineage: 76206cd2-94a8-47be-b282-94943e184d01
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 23:24:03 -07:00
gsxdsm
2aefaad319 FN-7924: Add View task link to artifact-registration mail notifications
Artifact-registration mail messages now expose the task that produced the artifact so users can jump straight to it from the mailbox.

- MailboxArtifactAttachment renders a "View task" button when message.metadata.taskId is present and an onOpenTask handler is supplied, alongside the existing Open artifact affordance
- MailboxModal and MailboxView thread taskId metadata and onOpenTask through to MailboxArtifactAttachment for both the message-list and detail-pane renders
- MainContent wires MailboxView's onOpenTask to the shared fetchTaskDetail -> openDetailTask path, with a toast on failure, so mailbox reuses the existing task-detail flow
- docs/dashboard-guide.md documents the new View task affordance for artifact notifications
- adds a minor changeset for @runfusion/fusion describing the new mail notification behavior
- extends MailboxArtifactAttachment and MailboxView tests to cover the new taskId/onOpenTask wiring

Files changed:
 .changeset/fn-7924-artifact-mail-view-task-link.md |  7 ++++
 docs/dashboard-guide.md                            |  2 +-
 .../app/components/MailboxArtifactAttachment.tsx   | 20 ++++++++++
 packages/dashboard/app/components/MailboxModal.css |  2 +-
 packages/dashboard/app/components/MailboxModal.tsx |  6 +++
 packages/dashboard/app/components/MailboxView.tsx  |  6 +++
 .../__tests__/MailboxArtifactAttachment.test.tsx   | 35 ++++++++++++++++-
 .../app/components/__tests__/MailboxView.test.tsx  | 45 +++++++++++++++++++++-
 .../app/components/dashboard/MainContent.tsx       |  6 +++
 9 files changed, 124 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-7924

Fusion-Task-Lineage: 800102e1-9025-40da-8130-9ab0e8acd747

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 23:06:05 -07:00
gsxdsm
313956df5a FN-7916: fix chat model selector dismissing before selection on mobile/tablet
Fix the in-chat Brain popup's model picker on touch viewports: pointerdown outside-close was treating the portaled CustomModelDropdown menu as outside the popup, dismissing it before the tap could register a model selection, and the mobile popover was mis-anchored off-screen.

- ChatThinkingLevelControl: treat pointerdown targets inside the portaled `.model-combobox-dropdown--portal` menu as inside the popup so touch taps select the model instead of closing the popup first
- ChatView.css: clamp the popover to the viewport width via max-width/max-inline-size, and on mobile anchor it to the chat input area with tokenized left/right gutters instead of a collapsing left:0 width
- Add a portal-aware regression test covering pointerdown-inside-portal selection, genuine outside-pointerdown close, and the mobile CSS anchoring contract
- Add changeset (patch) and update dashboard guide docs to describe mobile/tablet behavior

Files changed:
 .changeset/fn-7916-chat-mobile-model-selector.md   |  7 ++
 docs/dashboard-guide.md                            |  3 +-
 .../app/components/ChatThinkingLevelControl.tsx    | 10 ++-
 packages/dashboard/app/components/ChatView.css     | 17 +++-
 .../ChatThinkingLevelControl.portal.test.tsx       | 97 ++++++++++++++++++++++
 5 files changed, 130 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-7916

Fusion-Task-Lineage: bcc2d9ad-0be6-4e23-b643-eebf93aae3c6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 22:49:51 -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
8835c6cb48 FN-7908: add in-chat model/agent switcher to brain-icon popup
Extend the chat brain-icon popup and its backing session PATCH route so an
active Direct chat's model or agent can be switched mid-conversation instead
of only being set at creation time.

- Add a Model/Agent section to ChatThinkingLevelControl (the brain-icon
  popup) for picking a model provider/model or retargeting to a real agent
  without leaving the chat.
- Extend PATCH /api/chat/sessions/:id to accept modelProvider/modelId (as a
  validated pair via the existing validateModelPair helper) and agentId,
  forwarding only the keys present in the body so omitted fields leave the
  session's stored target untouched.
- Add chat-store updateSession support for the agentId clause alongside the
  existing model/thinkingLevel fields, and a useChat.setSessionModel hook
  for the dashboard to call the new PATCH capability.
- Update i18n locale strings (en/es/fr/ko/zh-CN/zh-TW) and dashboard-guide.md
  docs for the new switcher UI.
- Add unit/integration test coverage across chat-store, chat-manager,
  chat-routes, useChat, ChatThinkingLevelControl, and ChatView for the new
  model/agent switch behavior.
- Add changeset fn-7908-chat-model-agent-switcher.md (minor,
  @runfusion/fusion).

Files changed:
 .changeset/fn-7908-chat-model-agent-switcher.md    |   7 +
 docs/dashboard-guide.md                            |   3 +-
 packages/core/src/__tests__/chat-store.test.ts     |  21 ++
 packages/core/src/chat-store.ts                    |   8 +
 packages/core/src/chat-types.ts                    |   2 +
 packages/dashboard/app/api/legacy.ts               |  11 +-
 .../app/components/ChatThinkingLevelControl.tsx    | 219 ++++++++++++++++++---
 packages/dashboard/app/components/ChatView.css     | 135 ++++++++++++-
 packages/dashboard/app/components/ChatView.tsx     |  23 ++-
 .../__tests__/ChatThinkingLevelControl.test.tsx    | 109 +++++++++-
 .../__tests__/ChatView.thinking-level.test.tsx     |  67 ++++++-
 .../dashboard/app/hooks/__tests__/useChat.test.ts  | 166 +++++++++++++++-
 packages/dashboard/app/hooks/useChat.ts            |  56 ++++++
 .../dashboard/src/__tests__/chat-manager.test.ts   |  38 ++++
 .../dashboard/src/__tests__/chat-routes.test.ts    | 117 ++++++++++-
 .../dashboard/src/routes/register-chat-routes.ts   |  48 ++++-
 packages/i18n/locales/en/app.json                  |   8 +-
 packages/i18n/locales/es/app.json                  |   8 +-
 packages/i18n/locales/fr/app.json                  |   8 +-
 packages/i18n/locales/ko/app.json                  |   8 +-
 packages/i18n/locales/zh-CN/app.json               |   8 +-
 packages/i18n/locales/zh-TW/app.json               |   8 +-
 22 files changed, 1007 insertions(+), 71 deletions(-)

Fusion-Task-Id: FN-7908

Fusion-Task-Lineage: b1104865-9b0c-4d77-973e-89152fe245e0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 21:33:50 -07:00