Commit Graph

11244 Commits

Author SHA1 Message Date
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
d2f8acd4f1 FN-7920: remove duplicate dollar-sign icon from task-card cost badges
Removes the redundant DollarSign icon rendered inside the task-card cost badge, since the formatted cost label already includes a currency symbol and showing both duplicated the "$".

- Drop the leading DollarSign icon from the cost badge span in TaskCard.tsx (and its now-unused lucide-react import)
- Add an FNXC comment documenting that formatCost already includes the currency symbol, so no icon should duplicate it
- Update TaskCard tests to assert the cost badge renders no icon (svg) and to cover aria-label/title text for both populated and empty-cost states

Files changed:
 packages/dashboard/app/components/TaskCard.tsx                | 7 +++++--
 packages/dashboard/app/components/__tests__/TaskCard.test.tsx | 5 ++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7920

Fusion-Task-Lineage: 9404ba50-944b-430d-b7ad-0613ec75c42d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 22:47:07 -07:00
gsxdsm
504b0f8b04 FN-7914: fix mobile prompt fullscreen editor Expand button hidden behind workflow sheet
Fixes the workflow editor's fullscreen prompt overlay having an inert-looking mobile Expand button because a static z-index of 10000 sat below the mobile workflow editor's full-screen FloatingWindow sheet (10100+ shared floating-stack band).

- Have the fullscreen prompt overlay claim a fresh shared floating-stack z-index via nextFloatingZ() when opened, instead of relying on the static CSS z-index: 10000 fallback
- Track the claimed z-index in new promptFullscreenZ state, applying it as an inline style on the portaled overlay and clearing it on collapse/Escape
- Update FNXC comments in WorkflowNodeEditor.css and floatingWindowStack.ts documenting the shared z-index contract and why the static value is now only a fallback
- Add regression tests asserting the prompt fullscreen overlay's z-index exceeds the workflow editor's floating window z-index on desktop, mobile prompt nodes, mobile gate nodes, and after re-opening after collapse

Files changed:
 .../app/components/WorkflowNodeEditor.css          |  1 +
 .../app/components/WorkflowNodeEditor.tsx          | 25 ++++++-
 .../__tests__/WorkflowNodeEditor.test.tsx          | 81 ++++++++++++++++++++++
 .../app/components/floatingWindowStack.ts          |  2 +-
 4 files changed, 106 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7914

Fusion-Task-Lineage: e230309a-3b53-4e42-9e63-7516597b6c24

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 22:15:48 -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
4ea5dd6739 fix: CLI shouldSuperviseDashboard mock + getCliPackageVersion/isUnresolvedCliPackageVersion + executeRequeueLoopCount + i18n buttonShort (round 9) (#2034)
## Summary

Fixes shard 3 (CLI) + shard 4 (i18n) failures from full-suite run
29223788088.

## Fixes

### CLI (shard 3) — 5 files, ~140 tests
- **`bin.test.ts`** — `bin.ts:851` now imports
`shouldSuperviseDashboard` and `bin.ts:865` imports
`runDashboardSupervised` from `./commands/dashboard.js`. Test mock only
exported `runDashboard`. Missing `shouldSuperviseDashboard` → TypeError
→ caught → `process.exit:1`. Added `shouldSuperviseDashboard: vi.fn(()
=> false)` + `runDashboardSupervised` to mock + `commandMocks`.
- **`daemon/serve/dashboard.test.ts`** — `@fusion/dashboard` barrel
(index.ts:115) re-exports `getCliPackageVersion`,
`isUnresolvedCliPackageVersion`, `resolveCliPackageVersionInfo`. Added
all 3 to each file's `@fusion/dashboard` mock.
- **`task.test.ts`** — `executeRequeueLoopCount: 0` added to
TaskResetField set by recent commit; retry test assertions needed the
new field in both `mockUpdateTask` expectations.

### i18n (shard 4) — 4 locale files
- **`settings.reset.buttonShort`** missing from zh-TW, fr, es, ko (zh-CN
already had it).

### Engine (shards 1+2) — already fixed in PR #2025 (merged on main)
- Run 29223788088 was at commit `b85a6b866` (pre-PR-2025-merge), so
engine + i18n `storageMigrationNotice` failures visible in that run are
already resolved on main.

## Verification
- daemon: 21/21 ✅ | serve: 58/58 ✅ | dashboard: 91/91 ✅ | task retry:
5/5 ✅
- i18n parity + gate-coverage: 7/7 ✅
- Gate (`pnpm test:gate`): exit 0 ✅
- `bin.test.ts`: cannot verify locally (`@agentclientprotocol/sdk` not
installed locally; CI resolves from lockfile). Mock exports verified
against `dashboard.ts` source.

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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved task retry recovery by correctly resetting execution
counters.

* **Localization**
* Added support for shorter reset-button labels in Spanish, French,
Korean, and Traditional Chinese.

* **Tests**
* Updated command and startup checks to reflect current dashboard and
version-handling behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-12 21:58:12 -07:00
gsxdsm
a628a13888 feat: stamp store-open provenance into run-audit
Every TaskStore.init() now records a `store:open` run-audit event with
pid/ppid/execPath/entry/cwd/node version. Motivated by the FN-7910 incident:
a stale pre-fix binary opened the shared fusion.db and evacuated Ideas cards,
and the audit trail (agentId:"system", no PID) could not identify the writer.
Any future mystery mutation is now attributable to the process that opened
the store.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 21:57:29 -07:00
gsxdsm
1ea185daa5 FN-7911: add workflow validate dry-run command, tool, and API route
Adds a non-mutating `fn workflow validate` dry-run path across CLI, agent tools, and dashboard API so custom workflow IR can be checked before create/update.

- Add `packages/cli/src/commands/workflow.ts` implementing `fn workflow validate <id> | --file <path>` with JSON/text output, wired into `bin.ts`.
- Add `fn_workflow_validate` agent tool (`agent-tools.ts`, `index.ts`) reusing the existing parseWorkflowIr/trait/code-node/column-agent validation used by create/update, performing no persistence.
- Add `POST /api/workflows/validate` route in `register-workflow-routes.ts` plus dashboard route test coverage.
- Extend heartbeat tool-gating/exposure tests and gating classifications to include `fn_workflow_validate` alongside the other workflow tools.
- Update CLI/agent extension docs (`docs/cli-reference.md`, `docs/agents.md`, `docs/workflow-steps.md`, fusion skill references) to document the new command/tool.
- Add changeset `.changeset/fn-7911-workflow-validate.md` (minor) describing the new capability.

Files changed:
 .changeset/fn-7911-workflow-validate.md            |   7 ++
 docs/agents.md                                     |   5 +-
 docs/cli-reference.md                              |  13 ++
 docs/workflow-steps.md                             |   3 +-
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 .../cli/skill/fusion/references/extension-tools.md |  10 ++
 .../skill/fusion/references/fusion-capabilities.md |   1 +
 .../src/__tests__/extension-workflow-tools.test.ts |   1 +
 packages/cli/src/__tests__/extension.test.ts       |   1 +
 .../src/__tests__/workflow-docs-current.test.ts    |   1 +
 packages/cli/src/bin.ts                            |  22 ++++
 packages/cli/src/commands/workflow.ts              |  80 ++++++++++++
 packages/cli/src/extension.ts                      |  10 ++
 .../dashboard/src/__tests__/chat-manager.test.ts   |   1 +
 .../dashboard/src/__tests__/chat.rooms.test.ts     |   1 +
 .../planning-document-tools-exposure.test.ts       |   1 +
 .../__tests__/workflow-validate-route.test.ts      | 101 +++++++++++++++
 .../src/routes/register-workflow-routes.ts         |  27 +++-
 .../engine/src/__tests__/agent-action-gate.test.ts |   2 +-
 .../agent-workflow-tools-exposure.test.ts          |  70 ++++++++++-
 .../src/__tests__/gating-classifications.test.ts   |   3 +-
 .../src/__tests__/heartbeat-executor.test.ts       |  37 +++---
 .../src/__tests__/heartbeat-session-prompt.test.ts |   5 +-
 .../src/__tests__/permanent-agent-gating.test.ts   |   2 +-
 packages/engine/src/agent-heartbeat.ts             |   5 +-
 packages/engine/src/agent-tools.ts                 | 140 ++++++++++++++++++++-
 packages/engine/src/executor.ts                    |   6 +
 packages/engine/src/gating-classifications.ts      |   2 +
 packages/engine/src/index.ts                       |   4 +
 29 files changed, 532 insertions(+), 31 deletions(-)

Fusion-Task-Id: FN-7911

Fusion-Task-Lineage: 903d15fe-a7ec-458f-aa34-8f2e895a9603

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 21:39:23 -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
gsxdsm
3326984a6d FN-7913: add fn plugin publish --dry-run preflight command
Adds a non-mutating `fn plugin publish` CLI command that preflights a plugin before manual pack/publish, giving external plugin authors an offline readiness check.

- New `packages/cli/src/commands/plugin-publish.ts` with `runPluginPublish`, `collectPluginPreflight`, and `classifyVersionBump` (strict x.y.z semver bump classification), reusing `loadManifestFromPath` / `resolvePluginEntryFile` from the install path
- Wire `fn plugin publish <path> [--dry-run] [--previous-version <semver>]` into `bin.ts` command routing, dynamic import list, and help text
- Add test coverage in `plugin-publish.test.ts` and update `bin.test.ts` for the new subcommand
- Update `docs/PLUGIN_AUTHORING.md`, `docs/cli-reference.md`, and `docs/plugins/external-authoring.md` to document the new preflight command
- Add changeset `.changeset/fn-7913-plugin-publish-dry-run.md` (minor, @runfusion/fusion)

Files changed:
 .changeset/fn-7913-plugin-publish-dry-run.md      |   7 +
 docs/PLUGIN_AUTHORING.md                          |   9 +-
 docs/cli-reference.md                             |   5 +-
 docs/plugins/external-authoring.md                |  14 +-
 packages/cli/src/__tests__/bin.test.ts            |   2 +-
 packages/cli/src/__tests__/plugin-publish.test.ts | 197 ++++++++++++++++
 packages/cli/src/bin.ts                           |  22 +-
 packages/cli/src/commands/plugin-publish.ts       | 272 ++++++++++++++++++++++
 8 files changed, 521 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-7913

Fusion-Task-Lineage: 27bdf937-3195-4619-9d01-b6af4fbba487

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 21:27:38 -07:00
gsxdsm
b85a6b8663 FN-7912: add quarantine-ledger deadline visibility check
Add a report-only script that surfaces flaky-test quarantine entries approaching their 14-day deletion clock, so maintainers can make deliberate rescue-or-expire decisions before entries silently expire.

- Add scripts/check-quarantine-ledger.mjs: reads scripts/lib/test-quarantine.json, computes days-remaining against the existing 14-day deletion clock (shared DELETION_CLOCK_DAYS from scripts/test-velocity-baseline.mjs), and buckets each entry as expired/near/healthy/unknown
- Support --warn-within=<days> (default 5) to tune the near-deadline window, --json for machine-readable output, and --strict as an opt-in local/CI gate (exits 1 on expired/near entries) while default mode stays exit-0 and non-blocking
- Wire pnpm check:quarantine-ledger script in package.json
- Add scripts/__tests__/check-quarantine-ledger.test.mjs covering deadline bucketing/sorting, empty/missing ledger handling, --strict behavior, and --json output shape
- Document the new command and its flags in docs/testing.md under the quarantine ledger/deletion ratchet section

Files changed:
 docs/testing.md                                    |  10 +
 package.json                                       |   1 +
 scripts/__tests__/check-quarantine-ledger.test.mjs | 159 ++++++++++++++++
 scripts/check-quarantine-ledger.mjs                | 202 +++++++++++++++++++++
 4 files changed, 372 insertions(+)

Fusion-Task-Id: FN-7912

Fusion-Task-Lineage: c08e2e09-473a-4ad0-8c27-43cbc3355168

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 21:21:10 -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
41168e273c FN-7905: surface resolved default in chat thinking-level labels
Chat thinking-level Default entries hardcoded "off" instead of showing the project/global resolved default, misleading operators about which level would actually apply.

- ChatView now fetches Settings via fetchSettings on mount and derives resolvedDefaultThinkingLevel from settings.defaultThinkingLevel (falling back to "off")
- Threads resolvedDefaultThinkingLevel into NewChatDialog and the in-chat ChatThinkingLevelControl (Brain popup) so both surfaces show e.g. "Default (medium)" instead of always "Default (off)"
- ChatThinkingLevelControl accepts a new optional defaultThinkingLevel prop (defaults to "off" for backward compatibility) used only for the Default/clear option label
- Updates dashboard-guide.md to document the resolved-default label behavior in both the New Chat dialog and the in-chat Brain popup
- Adds/updates tests: new ChatThinkingLevelControl coverage for the label prop, new ChatView.thinking-level test coverage for the resolved default, and mocks fetchSettings in the other ChatView test suites that render ChatView
- Adds a patch changeset for @runfusion/fusion

Files changed:
 .changeset/fn-7905-chat-thinking-default.md        |  7 ++++
 docs/dashboard-guide.md                            |  5 +--
 .../app/components/ChatThinkingLevelControl.tsx    |  9 +++--
 packages/dashboard/app/components/ChatView.tsx     | 36 ++++++++++++++++---
 .../__tests__/ChatThinkingLevelControl.test.tsx    | 16 +++++++++
 .../__tests__/ChatView.chat-commands.test.tsx      |  1 +
 .../__tests__/ChatView.content-search.test.tsx     |  1 +
 .../__tests__/ChatView.context-window.test.tsx     |  1 +
 .../__tests__/ChatView.copy-response.test.tsx      |  1 +
 .../__tests__/ChatView.core-contracts.test.tsx     |  1 +
 .../__tests__/ChatView.core-interactions.test.tsx  |  1 +
 .../components/__tests__/ChatView.core.test.tsx    |  1 +
 .../__tests__/ChatView.default-model-icon.test.tsx |  1 +
 .../__tests__/ChatView.hash-mention.test.tsx       |  1 +
 .../components/__tests__/ChatView.mobile.test.tsx  |  1 +
 .../__tests__/ChatView.sessions-rooms.test.tsx     |  1 +
 .../__tests__/ChatView.streaming-thread.test.tsx   |  1 +
 .../__tests__/ChatView.thinking-level.test.tsx     | 42 ++++++++++++++++++++++
 18 files changed, 119 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-7905

Fusion-Task-Lineage: 7290aa8a-f812-43c3-8ba5-fc31a3f4579e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 20:19:36 -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
c110b72df1 FN-7902: persist thinkingLevel across mission/planning interview sessions
Threads an optional per-session reasoning-effort (thinkingLevel) through mission planning and planning-mode agent sessions so the selected level survives draft reopen, session start, and agent rebuild.

- Add ThinkingLevel to DraftInputPayload/session state in planning.ts; persist and restore it in inputPayload alongside model overrides, threading it into createDraftSession, startExistingSession, createSessionWithAgent, initializeAgent, createPlanningAgent, and ensureSessionAgent as defaultThinkingLevel.
- Preserve thinkingLevel across draft syncs in ai-session-store.ts's updateDraft so it isn't erased when the model pair is unchanged.
- Extend mission-interview.ts session state/persistence and createMissionInterviewAgent/createMissionInterviewSession to accept and persist a validated thinkingLevel, defaulting the agent's reasoning effort from it.
- Validate thinkingLevel against THINKING_LEVELS in mission-routes.ts's POST /api/missions/interview/start and thread it through to the interview session.
- Update PlanningModeModal.tsx and MissionInterviewModal.tsx to surface and submit the selected thinking level; update legacy.ts API client to pass it through.
- Extend register-planning-subtask-routes.ts to accept/validate/forward thinkingLevel for subtask planning routes.
- Add regression coverage in mission-interview.test.ts, routes-planning.test.ts, and session-persistence-roundtrip.test.ts.
- Add changeset for @runfusion/fusion (minor): persisted thinking-level controls for Mission Interview and Planning mode.

Files changed:
 .changeset/quiet-dragons-think.md                  |   7 ++
 packages/dashboard/app/api/legacy.ts               |  14 ++-
 .../app/components/MissionInterviewModal.tsx       |  21 +++-
 .../dashboard/app/components/PlanningModeModal.tsx |  34 ++++--
 .../src/__tests__/mission-interview.test.ts        |  34 ++++++
 .../src/__tests__/routes-planning.test.ts          |  17 ++-
 .../session-persistence-roundtrip.test.ts          |  16 +++
 packages/dashboard/src/ai-session-store.ts         |  13 +-
 packages/dashboard/src/mission-interview.ts        |  30 ++++-
 packages/dashboard/src/mission-routes.ts           |  14 ++-
 packages/dashboard/src/planning.ts                 |  70 ++++++++---
 packages/dashboard/src/routes.ts                   |  11 +-
 .../src/routes/register-planning-subtask-routes.ts | 135 +++++++++++++++------
 13 files changed, 330 insertions(+), 86 deletions(-)

Fusion-Task-Id: FN-7902

Fusion-Task-Lineage: 751fb238-fd67-4870-975d-3b10dadde1a0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 20:05:08 -07:00
gsxdsm
23cb061af2 FN-7898: add in-chat thinking-level control next to the attach button
Adds a Brain-icon popover control in the chat composer that lets users change an existing session's reasoning-effort level mid-conversation, extending the existing create-time-only thinking-level picker.

- Add ChatThinkingLevelControl component (Brain-icon trigger + popover) wired into ChatView's direct-session composer, gated to non-CLI model-loop sessions only
- Extend PATCH /api/chat/sessions/:id to accept an optional thinkingLevel field, validated via existing validateThinkingLevel helper; null/empty string explicitly clears back to the inherited default, omitting the key leaves it untouched
- Add useChat().setSessionThinkingLevel hook method to call the new PATCH capability
- Add i18n strings (thinkingLevelButton) across all locales and regenerate packages/i18n/src/resources.d.ts
- Add changeset for @runfusion/fusion (minor) and update docs/dashboard-guide.md

Files changed:
 .changeset/fn-7898-chat-thinking-level-control.md  |   7 +
 docs/dashboard-guide.md                            |   2 +
 packages/dashboard/app/api/legacy.ts               |   4 +-
 .../app/components/ChatThinkingLevelControl.tsx    | 133 +++++++++++
 packages/dashboard/app/components/ChatView.css     |  73 ++++++
 packages/dashboard/app/components/ChatView.tsx     |  20 ++
 .../__tests__/ChatThinkingLevelControl.test.tsx    | 103 ++++++++
 .../__tests__/ChatView.message-edit.test.tsx       |   1 +
 .../components/__tests__/ChatView.test-harness.tsx |   1 +
 .../__tests__/ChatView.thinking-level.test.tsx     | 262 +++++++++++++++++++++
 .../dashboard/app/hooks/__tests__/useChat.test.ts  | 108 +++++++++
 packages/dashboard/app/hooks/useChat.ts            |  59 +++++
 .../dashboard/src/__tests__/chat-routes.test.ts    |  83 +++++++
 .../dashboard/src/routes/register-chat-routes.ts   |  35 ++-
 packages/i18n/locales/en/app.json                  |   1 +
 packages/i18n/locales/es/app.json                  |   1 +
 packages/i18n/locales/fr/app.json                  |   1 +
 packages/i18n/locales/ko/app.json                  |   1 +
 packages/i18n/locales/zh-CN/app.json               |   1 +
 packages/i18n/locales/zh-TW/app.json               |   1 +
 packages/i18n/src/resources.d.ts                   |  96 ++++++--
 21 files changed, 970 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-7898

Fusion-Task-Lineage: a052a6ef-d2d3-45af-9b92-221996780b1b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 20:00:50 -07:00
gsxdsm
0e6f94dbe6 fix: offer the planning retry for needs-replan Todo cards in triage-less workflows
The task cards already show Retry for needs-replan/planning/failed states, but
the retry route only offered the planning retry when the card sat in "triage",
so plan-in-place workflows (Coding (Ideas) replans in Todo) got a 400 "not in a
retryable state". The retrySpecification gate is now workflow-aware: a Todo card
whose workflow declares no "triage" column takes the planning-retry path;
default-workflow Todo cards keep the generic-retry semantics.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 19:51:35 -07:00
gsxdsm
d4bbbcccc6 fix: stop Ideas-intake cards from auto-processing and keep replans in the workflow's own planner column
Root cause of the reported incident: store init ran the retired flag-off
evacuation on every open, dumping Coding (Ideas) intake cards into triage
where they were auto-planned and executed. Init now always runs the
workflow-aware integrity pass (with a stale-selection mis-mapping guard and
per-pass IR memoization) and evacuation remains toggle-only.

Engine rebounds (Plan Review REVISE, stale-spec, fs-validation) resolve a
workflow-aware replan column instead of hardcoding triage; needs-replan now
counts as unplanned for hold-release dispatch so rejected plans cannot
re-execute; triage rediscovers needs-replan todo cards and refinement seed
prompts (shared buildRefinementSeedPrompt/isUnplannedSeedPrompt); the
fs-validation rebound sets needs-replan so unreadable-prompt tasks re-spec
instead of livelocking.

Dashboard: the All-workflows board renders column-orphaned tasks instead of
silently dropping them (hidden columns stay hidden), and the FN-7591 refetch
also fires for present-but-unrepresentable workflow mappings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 19:47:27 -07:00
gsxdsm
635d78248b FN-7900: persist thinkingLevel override for schedule and routine AI steps
Adds a persisted, optional per-step reasoning-effort (thinkingLevel) override for AI-capable schedule and routine automation steps, surfaced in the editors and validated at the route layer.

- Add optional AutomationStep.thinkingLevel field (packages/core/src/automation.ts), riding the existing JSON steps blob so no DB migration is needed; runtime application of the level is deferred to a follow-up.
- Validate thinkingLevel in dashboard route step validation against the shared THINKING_LEVELS set, rejecting unknown values (packages/dashboard/src/routes.ts).
- Add Thinking Level controls to RoutineEditor, ScheduleForm, and ScheduleStepsEditor so users can set/inherit the override per step.
- Extend core and dashboard test suites (automation-store, routine-store, RoutineEditor, ScheduleForm, ScheduleStepsEditor, routes-automation) to cover persistence, validation, and UI behavior.
- Update dashboard-guide.md docs and add a minor changeset for the new feature.

Files changed:
 .changeset/fn-7900-automation-thinking-level.md    |   7 +
 docs/dashboard-guide.md                            |   3 +-
 .../core/src/__tests__/automation-store.test.ts    |  45 ++++++
 packages/core/src/__tests__/routine-store.test.ts  |  46 +++++++
 packages/core/src/automation.ts                    |   9 ++
 .../dashboard/app/components/RoutineEditor.tsx     |  21 ++-
 packages/dashboard/app/components/ScheduleForm.tsx |  28 +++-
 .../app/components/ScheduleStepsEditor.tsx         |  21 ++-
 .../components/__tests__/RoutineEditor.test.tsx    |  99 +++++++++++++-
 .../app/components/__tests__/ScheduleForm.test.tsx | 137 +++++++++++++++++--
 .../__tests__/ScheduleStepsEditor.test.tsx         |  83 +++++++++--
 .../src/__tests__/routes-automation.test.ts        | 152 +++++++++++++++++++++
 packages/dashboard/src/routes.ts                   |  10 ++
 13 files changed, 622 insertions(+), 39 deletions(-)

Fusion-Task-Id: FN-7900

Fusion-Task-Lineage: 812a9a8c-ad0f-462f-b1c6-9900f70e4261

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 19:43:41 -07:00
gsxdsm
7a51f95b38 FN-7901: persist thinkingLevel for insight model selection
Adds a persisted Thinking Level (reasoning-effort) selector to manual insight generation, threading the selection through the dashboard API, insight run metadata, and retries.

- Add inline Thinking Level selector to the InsightsView model-config popover, persisted to localStorage (fusion-insight-thinking)
- Thread thinkingLevel through triggerInsightRun (legacy API client) and useInsights.runInsights
- Validate and store thinkingLevel in insight run inputMetadata.metadata on the POST /insights/run route; resolve it via resolvePlanningThinkingLevel for the actual generation call
- Recover and reapply the original run's thinkingLevel on retry (retryInsightRunLifecycle) so retries reuse the same reasoning-effort setting
- Export resolvePlanningThinkingLevel from @fusion/engine
- Document the new Thinking Level selector in docs/dashboard-guide.md
- Add a minor changeset for @runfusion/fusion

Files changed:
 .changeset/fn-7901-insight-thinking-level.md       |  7 ++
 docs/dashboard-guide.md                            |  1 +
 .../app/__tests__/insight-model-selector.test.tsx  | 41 ++++++++++-
 packages/dashboard/app/api/legacy.ts               |  2 +
 packages/dashboard/app/components/InsightsView.tsx | 24 +++++-
 .../app/hooks/__tests__/useInsights.test.ts        | 36 ++++++++-
 packages/dashboard/app/hooks/useInsights.ts        |  6 +-
 .../src/__tests__/insights-routes.test.ts          | 86 ++++++++++++++++++++++
 packages/dashboard/src/insights-routes.ts          | 36 ++++++++-
 packages/engine/src/index.ts                       |  1 +
 10 files changed, 227 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-7901

Fusion-Task-Lineage: a6249526-e97d-403e-b853-e497d16f425b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 19:39:42 -07:00
gsxdsm
b98314923c FN-7899: add thinking-level editing to Agent Detail, Onboarding, and bulk task model selectors
Bring thinking-level (reasoning effort) editing to every remaining model selector surface that previously lacked it, so operators can set it consistently from Agent Detail, Agent Onboarding, and the List view's bulk task editor, in addition to the batch-update-models API and route that back them.

- Agent Detail config tab: persist/edit a built-in agent's runtimeConfig.thinkingLevel inline via the shared model dropdown, with dirty-state and reset tracking.
- Agent Onboarding modal: replace the read-only thinking-level input with an editable control wired into the same model dropdown used for creation.
- List view bulk edit toolbar: add a "no change" / "use default" / explicit-level thinking selector alongside executor/reviewer model and node overrides, wired through to the bulk apply action.
- Dashboard API client (`batchUpdateTaskModels`) and `/api/tasks/batch-update-models` route: accept and validate an optional `thinkingLevel` field (against `THINKING_LEVELS`), applying it per task alongside existing model/node updates.
- Update dashboard-guide.md docs and add regression tests across AgentDetailView, AgentOnboardingModal, ListView, and the batch-update-models route.
- Add a minor changeset documenting the feature for release notes.

Files changed:
 .changeset/thinking-level-selector-parity.md       |  7 ++
 docs/dashboard-guide.md                            |  5 +-
 packages/dashboard/app/api/legacy.ts               |  3 +
 .../dashboard/app/components/AgentDetailView.tsx   | 20 +++++-
 .../app/components/AgentOnboardingModal.tsx        | 11 +++-
 packages/dashboard/app/components/ListView.tsx     | 54 +++++++++++++---
 .../__tests__/AgentDetailView.settings.test.tsx    | 45 +++++++++++++
 .../__tests__/AgentDetailView.test-helpers.ts      | 19 +++++-
 .../__tests__/AgentOnboardingModal.test.tsx        | 41 +++++++++++-
 .../app/components/__tests__/ListView.test.tsx     | 43 ++++++++++++-
 .../src/__tests__/routes-tasks-ops.test.ts         | 75 ++++++++++++++++++++++
 .../src/routes/register-task-workflow-routes.ts    | 22 +++++--
 12 files changed, 323 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-7899

Fusion-Task-Lineage: fd584ce4-42b3-4c20-8de5-4d3c8963f593

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 19:18:25 -07:00
gsxdsm
02fdb4c089 FN-7897: reserve footer space for pinned below-mode terminal
Fix the pinned (below-mode) terminal panel rendering underneath the fixed ExecutorStatusBar footer, so its bottom action-control row stays visible on desktop and mobile alike.

- Add a footerVisible prop to TerminalModal, wired from App.tsx's executorFooterVisible state
- Add .terminal-below-host--with-footer CSS modifier that redeclares --executor-footer-height and reserves padding-bottom (with the Android Chrome ICB offset), matching the .project-content--with-footer/.left-sidebar-nav--with-footer/.right-dock--with-footer precedent
- Update dashboard-guide.md terminal walkthrough to describe the new footer-avoidance behavior
- Add/extend TerminalModal tests covering the footerVisible prop and CSS modifier
- Add a patch changeset for @runfusion/fusion documenting the fix

Files changed:
 .../fn-7897-pinned-terminal-footer-overlap.md      |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 packages/dashboard/app/App.tsx                     |   1 +
 .../dashboard/app/components/TerminalModal.css     |  12 ++
 .../dashboard/app/components/TerminalModal.tsx     |  17 ++-
 .../components/__tests__/TerminalModal.test.tsx    | 135 ++++++++++++++++++++-
 6 files changed, 170 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-7897

Fusion-Task-Lineage: e22db6a9-35a8-46a1-8c15-186eaf5267fd

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 19:00:16 -07:00
gsxdsm
f7e678bc8d FN-7894: fix conversation history rendering user's own-answer text as [object Object]
Resolves planning interview history showing raw stringified objects instead of the user's typed "Other" answer text.

- Add getResponseValue resolution that mirrors the server's `_other` reserved-key contract, extracting the free-text answer separately from `_comment` metadata.
- Add formatResponse support for an `other` override across single_select, multi_select, and confirm question types, appending "(user's own answer)" suffix.
- Add safeFormatScalar helper to safely stringify non-string scalar/object response values instead of relying on bare String()/JSON.stringify() branches.
- Add regression tests covering text/single_select/multi_select/confirm question types with `_other` responses, plus the existing `_comment` metadata path.

Files changed:
 .../app/components/ConversationHistory.tsx         |  96 +++++++++++++----
 .../__tests__/ConversationHistory.test.tsx         | 117 +++++++++++++++++++++
 2 files changed, 191 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-7894

Fusion-Task-Lineage: 06444248-23cd-4fac-9afc-b2e2c7366cbe

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 18:47:08 -07:00
gsxdsm
ddf2f3d956 FN-7888: wire onDeleteTask through right-dock Tasks list
Restores the Delete affordance in the right-dock Tasks list, which previously rendered TaskCard hosts without a delete handler so the menu action silently did nothing.
- Thread onDeleteTask prop through DockTaskList into TaskCard
- Pass onDeleteTask through overflowViewRegistry's Tasks view render props
- Wire onDeleteTask from useRightDockController into both DockTaskList call sites
- Add regression coverage for desktop context-menu and mobile pointer-up delete flows in TaskCard, DockTaskList, and RightDock tests
- Add a patch changeset documenting the fix

Files changed:
 .changeset/fn-7888-task-delete.md                  |  7 ++++
 packages/dashboard/app/components/DockTaskList.tsx |  9 ++++-
 .../app/components/__tests__/DockTaskList.test.tsx | 16 +++++++-
 .../app/components/__tests__/RightDock.test.tsx    | 16 +++++++-
 .../app/components/__tests__/TaskCard.test.tsx     | 44 ++++++++++++++++++++++
 .../app/components/overflowViewRegistry.tsx        |  4 +-
 .../app/components/useRightDockController.tsx      |  2 +
 7 files changed, 93 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-7888

Fusion-Task-Lineage: 22767aba-fb92-4ac3-8348-ee0cea4345c2

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 18:13:33 -07:00
gsxdsm
dabedcf79c FN-7890: cap report-a-bug GitHub URL by encoded length, not raw body length
Fixes the Report-a-Bug flow producing a GitHub "request URL too long" error by budgeting truncation against the actual encoded URL GitHub receives instead of the raw diagnostics body length.

- Replace the raw BUG_URL_BODY_CAP (5500 chars) with BUG_URL_MAX_ENCODED (8000 chars), measured against the final GitHub issue URL (base URL + ?body= + encodeURIComponent(body)).
- Add buildBugReportIssueUrl() which binary-searches the largest body prefix (by code point) whose encoded URL still fits the budget, appending a truncation marker when needed.
- doReportBug now calls buildBugReportIssueUrl(body) instead of manually slicing the body and encoding it inline.
- Update tests to assert the final URL length stays under BUG_URL_MAX_ENCODED and to exercise a diagnostics bundle whose JSON (quotes/braces) expands significantly under percent-encoding.

Files changed:
 .../__tests__/SystemControlsArea.test.tsx          |  9 +++--
 .../command-center/areas/SystemControlsArea.tsx    | 47 +++++++++++++++++-----
 2 files changed, 44 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-7890

Fusion-Task-Lineage: fcadafcd-0bbc-4c06-b2ec-c2b124d736db

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 18:10:55 -07:00
gsxdsm
c341b58bde FN-7889: align task card header action icons to the id's optical centerline
Vertically nudges the card-header-actions cluster (size badge/menu icons) to share the same optical centerline as the mono task id, matching the existing id nudge.

- Add a translateY(calc(var(--space-xs) / 4)) transform to .card-header-actions in TaskCard.css, mirroring the FN-7871 id nudge
- Document the change with an FNXC comment explaining the FN-7889 requirement and its relationship to FN-7871/FN-7862/FN-7837
- Extend the TaskCard.badge-wrap.test.tsx regression test to assert the actions cluster's transform matches the id's transform and stays tokenized (no raw px values)

Files changed:
 packages/dashboard/app/components/TaskCard.css                      | 6 +++++-
 .../dashboard/app/components/__tests__/TaskCard.badge-wrap.test.tsx | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7889

Fusion-Task-Lineage: d4743b8f-c7d7-4c3b-9b68-f632dd6e0b7b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 18:06:38 -07:00
gsxdsm
db9a9453db FN-7887: migrate ChatView copy-response to shared clipboard helper
Fixes ChatView's provider-response copy button falsely reporting failure on non-secure origins (mobile/HTTP) by routing through the shared clipboard utility instead of calling navigator.clipboard directly.

- Replaced direct navigator.clipboard.writeText call in handleCopyResponse with the shared copyTextToClipboard helper (secure-context guard + execCommand fallback)
- Added regression tests covering secure Clipboard API success, execCommand fallback success, and combined failure paths
- Added changeset documenting the fix as the last direct clipboard caller found during the FN-7885 preflight

Files changed:
 .changeset/fn-7887-chatview-clipboard.md           |   7 +
 packages/dashboard/app/components/ChatView.tsx     |  16 +-
 .../__tests__/ChatView.copy-response.test.tsx      | 169 +++++++++++++++++++++
 3 files changed, 183 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-7887

Fusion-Task-Lineage: bff1084b-7c64-420d-9479-bb8c4c584175

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 17:59:19 -07:00
gsxdsm
6ea53966f6 FN-7885: migrate remaining direct clipboard callers to shared copyTextToClipboard helper
Replaces the last direct navigator.clipboard.writeText() call sites across dashboard components and the reports plugin with the shared copyTextToClipboard helper, fixing copy actions that crashed or silently failed on non-secure origins (HTTP/mobile).

- Migrated AgentDetailView, AgentErrorDetailsModal, CliBinaryPanel, GitManagerModal, LoginInstructions, PrPanel, SecretsView, and StashConflictModal to use copyTextToClipboard (secure-context guard + execCommand fallback, boolean result handling) instead of calling navigator.clipboard directly.
- Migrated the fusion-plugin-reports ShareBlocksPanel to the same helper and added a vitest alias so the plugin's subpath import resolves to the dashboard's copyToClipboard util instead of collapsing to its package root.
- Added ./app/utils/copyToClipboard subpath export to @fusion/dashboard's package.json.
- Added/extended tests covering copy success, fallback, and failure paths for AgentDetailView, CliBinaryPanel, AgentErrorDetailsModal, GitManagerModal, SecretsView, StashConflictModal, and ShareBlocksPanel.
- Added a patch changeset documenting the fix for @runfusion/fusion.

Files changed:
 .changeset/fn-7885-clipboard-migration.md          |  7 ++
 packages/dashboard/app/components/AgentDetailView.tsx   | 16 ++++-
 packages/dashboard/app/components/AgentErrorDetailsModal.tsx      |  5 +-
 packages/dashboard/app/components/CliBinaryPanel.tsx    | 16 +++--
 packages/dashboard/app/components/GitManagerModal.tsx   | 16 ++++-
 packages/dashboard/app/components/LoginInstructions.tsx | 21 +++---
 packages/dashboard/app/components/PrPanel.tsx      |  9 ++-
 packages/dashboard/app/components/SecretsView.tsx  | 11 ++-
 packages/dashboard/app/components/StashConflictModal.tsx          | 13 ++--
 packages/dashboard/app/components/__tests__/AgentDetailView.copy.test.tsx        | 56 +++++++++++++++
 packages/dashboard/app/components/__tests__/AgentErrorDetailsModal.test.tsx      | 18 +++++
 packages/dashboard/app/components/__tests__/CliBinaryPanel.copy.test.tsx         | 68 ++++++++++++++++++
 packages/dashboard/app/components/__tests__/GitManagerModal.test.tsx  | 23 ++++++
 packages/dashboard/app/components/__tests__/SecretsView.test.tsx  | 82 ++++++++++++++++++++++
 packages/dashboard/app/components/__tests__/StashConflictModal.test.tsx          | 25 ++++++-
 packages/dashboard/package.json                    |  4 ++
 plugins/fusion-plugin-reports/src/dashboard/components/ShareBlocksPanel.tsx  |  5 +-
 plugins/fusion-plugin-reports/src/dashboard/components/__tests__/ShareBlocksPanel.test.tsx | 43 +++++++++++-
 plugins/fusion-plugin-reports/vitest.config.ts     |  2 +
 19 files changed, 402 insertions(+), 38 deletions(-)

Fusion-Task-Id: FN-7885
Fusion-Task-Lineage: 122a54ea-962b-4ae1-98ac-c28e03f4f8ca
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 17:54:21 -07:00
gsxdsm
3a37f48e78 FN-7883: expand Command Center bug report with full diagnostics bundle
Replace the bug-report flow's last-5-error-lines excerpt with the full buildDiagnostics() bundle (health, runtime/system info, recent logs) behind a single confirmation prompt.
- doReportBug now reuses buildDiagnostics() instead of independently fetching a 5-line error excerpt
- Single confirm() prompt covers the whole diagnostics bundle instead of only recent errors
- Diagnostics are embedded as a collapsible <details> JSON code block under a new ### Diagnostics section
- Preserved existing safeguards: fenceSafe() neutralization of embedded code fences and BUG_URL_BODY_CAP truncation
- Added tests covering: full bundle inclusion on confirm, omission on decline, fence-breakout neutralization, and oversized-bundle truncation

Files changed:
 .../__tests__/SystemControlsArea.test.tsx          | 96 ++++++++++++++++++++++
 .../command-center/areas/SystemControlsArea.tsx    | 53 +++++++-----
 2 files changed, 128 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-7883

Fusion-Task-Lineage: 44dd26de-d0f6-427b-a082-59d580f31674

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 17:42:39 -07:00
gsxdsm
2e7fce21ae FN-7884: reset durable-agent error state on engine restart
Engine startup now treats itself as an implicit operator retry for durable heartbeat agents stuck in error, clearing eligible error states and re-arming heartbeats instead of waiting for the steady-state sweep's cooldown/exhaustion gates.

- Add SelfHealingManager.resetDurableAgentErrorStateOnStartup(), run first in runStartupRecovery(), which resets shared heartbeatErrorRecovery/legacy durableErrorRecovery metadata, clears lastError/pauseReason, flips eligible error and error-retry-exhausted-parked durable agents to active, and re-arms their heartbeat
- Preserve suppression for operator-actionable, stale worktree/module-resolution, user-paused, error-unrecoverable, ephemeral, disabled-runtime, and actively-executing agents
- Add agent:reset-error-state-on-startup run-audit mutation type with ids/counts/outcomes-only metadata (agentId, priorState, priorPauseReason, source)
- Add changeset FN-7884 (patch) documenting the operator-facing behavior
- Update AGENTS.md and docs/agents.md, docs/architecture.md to describe the new startup reset path alongside existing FN-7835/FN-7844/FN-7859/FN-7878 recovery docs
- Extend self-healing.test.ts with coverage for the new startup reset behavior and its exclusions

Files changed:
 .changeset/fn-7884-restart-error-reset.md          |   7 ++
 AGENTS.md                                          |   1 +
 docs/agents.md                                     |   4 +-
 docs/architecture.md                               |   2 +-
 packages/engine/src/__tests__/self-healing.test.ts | 127 ++++++++++++++++++++-
 packages/engine/src/run-audit.ts                   |   1 +
 packages/engine/src/self-healing.ts                |  88 +++++++++++++-
 7 files changed, 223 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-7884
Fusion-Task-Lineage: fe64f6af-3ff3-4876-8308-8a75591c45f1
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 17:39:29 -07:00
gsxdsm
e92a342b1e FN-7882: fix Copy diagnostics crash on non-secure origins
Route Command Center diagnostics copy through the shared clipboard helper so it no longer throws on non-secure origins (e.g. mobile http://fusionstudio:4040).

- Replace direct navigator.clipboard.writeText call in SystemControlsArea's diagnostics copy handler with copyTextToClipboard, which guards for secure-context clipboard support and falls back to document.execCommand("copy").
- Surface a distinct failure toast ("Could not copy diagnostics to clipboard") when neither clipboard path succeeds, instead of crashing.
- Add regression tests covering the execCommand fallback, the secure-context Clipboard API path, and the failure-toast path when both copy mechanisms are unavailable.
- Add a patch changeset documenting the fix.

Files changed:
 .changeset/fn-7882-copy-diagnostics-fix.md         |  7 ++
 .../__tests__/SystemControlsArea.test.tsx          | 87 +++++++++++++++++++++-
 .../command-center/areas/SystemControlsArea.tsx    | 13 +++-
 3 files changed, 102 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-7882
Fusion-Task-Lineage: eceb93bf-b32d-4127-b370-4779cb4e4e27
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 17:32:41 -07:00
gsxdsm
b84bd11256 FN-7881: fix System-controls refresh button mobile layout
Keeps the Command Center System tab's refresh button inline with the section title and pinned to the far right at all breakpoints, instead of dropping below the title on mobile.

- Add a scoped .cc-area-section-header.cc-system-controls-header CSS override (row + space-between) that wins over the shared mobile column-collapse rule for the System tab only
- Add data-testid="cc-system-refresh" to the refresh button for test targeting
- Add regression tests asserting the header stays row-aligned in the DOM and the CSS override is present at the 768px breakpoint
- Add a patch changeset documenting the fix

Files changed:
 .changeset/fn-7881-system-refresh-inline.md        |  7 +++++++
 .../__tests__/SystemControlsArea.test.tsx          | 23 ++++++++++++++++++++++
 .../command-center/areas/SystemControlsArea.css    | 22 +++++++++++++++++++++
 .../command-center/areas/SystemControlsArea.tsx    |  3 ++-
 4 files changed, 54 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7881

Fusion-Task-Lineage: 80c6fd78-b7e0-4899-b509-b69b8d21e82d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 17:09:15 -07:00
gsxdsm
c745990aa2 FN-7879: deliver one-time Postgres-migration inbox notice on first 0.59 startup
Adds a best-effort, idempotent dashboard inbox notice announcing the upcoming embedded-Postgres storage migration, delivered once per project on the first engine start under the Fusion 0.59.x release line.

- New `deliverPostgresMigrationNoticeIfNeeded` in `@fusion/engine` (`postgres-migration-notice.ts`) builds and sends a `system` -> `user` inbox message via `MessageStore`, gated to version `0.59.x` by `isPostgresMigrationNoticeVersion`
- Idempotency via existing inbox message `metadata.kind = "postgres-migration-notice"` marker (no new settings key or table), so restarts never duplicate the notice
- Delivery is fully best-effort: any `MessageStore` failure is caught, logged as a warning, and never blocks or fails `ProjectEngine.start()`
- `ProjectEngine.start()` invokes the notice after runtime start, using an injected `cliPackageVersion` threaded from the CLI layer through `EngineManagerOptions` / `ProjectEngineOptions` so the engine never imports CLI/dashboard code directly
- `daemon.ts`, `dashboard.ts`, and `serve.ts` resolve the published `@runfusion/fusion` version via `getCliPackageVersion` / `isUnresolvedCliPackageVersion` and pass it into `ProjectEngineManager`
- Exported new symbols (`POSTGRES_MIGRATION_HELP_URL`, `POSTGRES_MIGRATION_NOTICE_KIND`, `deliverPostgresMigrationNoticeIfNeeded`, `isPostgresMigrationNoticeVersion`, related types) from `@fusion/engine`, and `isUnresolvedCliPackageVersion` from `@fusion/dashboard`
- New unit tests covering version matching and single-delivery/idempotency behavior
- Docs updated (`docs/agents.md`, `docs/dashboard-guide.md`) to describe the one-time notice and its dedup key
- Changeset added for `@runfusion/fusion` (minor, feature)

Files changed:
 .changeset/fn-7879-postgres-migration-inbox-notice.md              |   7 ++
 docs/agents.md                                                     |   1 +
 docs/dashboard-guide.md                                            |   1 +
 packages/cli/src/commands/daemon.ts                                |   6 +-
 packages/cli/src/commands/dashboard.ts                             |   5 +
 packages/cli/src/commands/serve.ts                                 |   6 +-
 packages/dashboard/src/index.ts                                    |   2 +-
 packages/engine/src/__tests__/postgres-migration-notice.test.ts    | 140 +++++++++++++++++++++
 packages/engine/src/index.ts                                       |   9 ++
 packages/engine/src/postgres-migration-notice.ts                   | 107 ++++++++++++++++
 packages/engine/src/project-engine-manager.ts                      |   6 +
 packages/engine/src/project-engine.ts                               |  12 ++
 12 files changed, 299 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-7879

Fusion-Task-Lineage: 201877e5-6bdc-4168-a8ac-ae0e50ec8308

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 17:02:33 -07:00
gsxdsm
56c745240a FN-7880: shorten Reset Settings button to "Reset" on mobile
Shortens the Settings footer's Reset Settings button label to Reset at the mobile breakpoint to preserve footer space, while desktop/tablet keep the full label; confirmation dialog and reset behavior are unchanged.

- Add settings.reset.buttonShort i18n key (en, zh-CN) and typed resources.d.ts entry
- SettingsModal reset button now renders buttonShort ("Reset") when viewportMode === "mobile", otherwise the existing "Reset Settings" label
- Update settings-mobile.test.tsx to assert the compact mobile label and add coverage across modal/embedded x mobile/desktop viewport combinations
- Update docs/dashboard-guide.md to document the mobile-only compact label
- Add changeset (patch) for @runfusion/fusion

Files changed:
 .changeset/fn-7880-reset-mobile-label.md           |  7 ++++
 docs/dashboard-guide.md                            |  6 ++--
 packages/dashboard/app/components/SettingsModal.tsx |  7 +++-
 packages/dashboard/app/components/__tests__/settings-mobile.test.tsx | 37 +++++++++++++++++++++-
 packages/i18n/locales/en/app.json                  |  1 +
 packages/i18n/locales/zh-CN/app.json               |  1 +
 packages/i18n/src/resources.d.ts                   |  1 +
 7 files changed, 56 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-7880

Fusion-Task-Lineage: e636e73d-172e-4a6e-bb51-078520fd05ab

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 16:48:04 -07:00
gsxdsm
504dc69f02 FN-7878: default heartbeat error recovery to recoverable for generic durable-agent failures
Durable agents were parking as error-unrecoverable on any non-transient-pattern failure, even generic/unknown blips that manual Retry immediately fixed; this changes the default to recoverable and reserves immediate unrecoverable parking for operator-actionable errors.

- isHeartbeatErrorRecoverable now returns true unless the error is operator-actionable (auth/model/billing/scope) or a stale worktree/module-resolution error, instead of requiring a transient-pattern match via classifyError
- Add OAuth scope-requirement and insufficient-scope patterns to the operator-actionable error detector so those still park immediately
- Update heartbeat-error-recovery, heartbeat-executor, self-healing, and transient-error-detector tests to cover the new default-recoverable behavior
- Update AGENTS.md and docs/architecture.md durable-agent error recovery notes to describe the new recoverable-by-default policy
- Add changeset documenting the fix

Files changed:
 .changeset/fn-7878-recoverable-default.md          |  7 ++
 AGENTS.md                                          |  2 +-
 docs/architecture.md                               |  4 +-
 .../src/__tests__/heartbeat-error-recovery.test.ts | 90 +++++++++++++++++++---
 .../src/__tests__/heartbeat-executor.test.ts       | 17 ++--
 packages/engine/src/__tests__/self-healing.test.ts | 45 ++++++-----
 .../src/__tests__/transient-error-detector.test.ts |  7 +-
 packages/engine/src/agent-heartbeat.ts             |  8 +-
 packages/engine/src/transient-error-detector.ts    |  2 +
 9 files changed, 137 insertions(+), 45 deletions(-)

Fusion-Task-Id: FN-7878

Fusion-Task-Lineage: 6f929af9-ceef-404f-95c9-98f26478f020

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 16:25:48 -07:00
gsxdsm
990583261e FN-7877: fix Command Center System tab spacing and canonicalize status colors
Wraps the System tab's controls and stats areas in a shared flex container so vertical rhythm is consistent, and canonicalizes hard-coded status colors to design tokens.

- Wrap SystemControlsArea + SystemStatsArea in a new .cc-system-tab flex container with --space-lg gap, replacing the bare React fragment, so Server logs and Live system health sections get consistent breathing room.
- Add responsive gap rule for .cc-system-tab under the 768px breakpoint.
- Replace hard-coded --danger/--warning fallback colors in SystemControlsArea.css with canonical --color-error/--color-warning tokens.
- Add SystemControlsArea test coverage.
- Add a patch changeset documenting the spacing fix.

Files changed:
 .changeset/fn-7877-system-tab-spacing.md           |   7 +
 .../components/command-center/CommandCenter.css    |  15 ++
 .../components/command-center/CommandCenter.tsx    |   8 +-
 .../__tests__/SystemControlsArea.test.tsx          | 157 +++++++++++++++++++++
 .../command-center/areas/SystemControlsArea.css    |   8 +-
 5 files changed, 189 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-7877
Fusion-Task-Lineage: eb4a97ed-5442-43e8-8d38-348fc3e220a8
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 16:11:34 -07:00
gsxdsm
37c0816f57 docs: clarify Homebrew trusted install 2026-07-12 15:37:02 -07:00
gsxdsm
2ffebef022 Address PR feedback: redact TUI/console log path too (#2028)
Move redactSecrets to the log/warn/error entry points so both the
recorded history (served over /system/logs) and the TUI/console output
are masked — previously only the stored entry was redacted while the raw
message still printed to the terminal. Add assertions for both the
console and TUI-target output paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 14:42:09 -07:00
gsxdsm
f1b6a6340c Address review feedback: System panel hardening (#2028)
Correctness/reliability:
- engine restart-all: compensating pause on resume failure so a project
  is never left marked active with a dead engine
- desktop restart: app.quit() (runs before-quit teardown) not app.exit(0)
- supervisor: SIGINT/SIGTERM during crash-backoff exit immediately;
  stopping-latch prevents respawn after intentional shutdown
- coalesce concurrent /system/restart requests (restartScheduled guard)
- rebuild job completion chain given a .catch (no stranded activeJob)

Security:
- same-origin CSRF guard on all mutating /system/* POSTs (safe under
  --no-auth / desktop)
- redact secrets in host-process log history (reuse core redactSecrets)
- report-bug: confirm before including server logs + escape ``` fences
- sanitize restart reason; Object.hasOwn scope-guard (prototype-key 500)

Frontend:
- log tail dedup (drop redundant REST backfill; SSE heartbeat stops 45s
  reconnect churn) + X-Accel-Buffering:no on both SSE routes
- restart-wait 90s timeout re-enables controls
- hydrate buffered rebuild lines on mount (mid-build panel open)

Maintainability + tests:
- engineAvailable reflects centralCore; hoisted systemLogs option; typed
  desktop systemControl DTO
- add tests: SSE routes, exit-86 respawn, compiled-binary respawn,
  engine-restart recovery, log redaction

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 14:42:09 -07:00
gsxdsm
a227b19a22 feat: add Command Center System panel with rebuild/restart controls, Plugins tab, and supervised-by-default dashboard
- pnpm dev / new pnpm start default to the dashboard command
- fn dashboard (and bare fn/fusion/npx, incl. packaged binaries) now runs
  supervised by default via an attached foreground child (TUI-safe);
  --no-supervise opts out; FUSION_RESTART_EXIT_CODE=86 = intentional restart
- New /api/system routes: info, restart, rebuild jobs with SSE output,
  engine restart, agents restart-all, plugins reload-all, log tail
- System tab: rebuild & restart (source checkouts only, hidden elsewhere),
  restart server/engine/agents, backup DB, live server logs, copy
  diagnostics, report bug; new Plugins tab reusing PluginManager
- Desktop restart via Electron app.relaunch(); DashboardLogSink now keeps a
  bounded history + listener feed for the log viewer

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 14:42:09 -07:00
gsxdsm
cbe07ee86b fix(engine): address PR #2027 review — tighten auth exclusions, accurate park accounting
- Exclude revoked/suspended/disabled/deactivated keys, inactive subscriptions,
  and locked accounts from the transient-auth classifier: no retry fixes those,
  so they stay operator-actionable even inside an authentication_error envelope.
- Self-healing sweep logs unrecoverable-error parks separately from
  recovered-to-active agents (return value still counts actions taken).
- Document same-session retry continuation semantics at the heartbeat
  withRateLimitRetry call site (side-effect replay concern).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 13:57:08 -07:00
gsxdsm
c4fad2d793 fix(engine): auto-recover agents from transient OAuth token-rotation 401s
A routine Claude Max OAuth token rotation (~8h) fails the in-flight call with
401 authentication_error "Invalid authentication credentials" even though
refreshed credentials already exist on disk. Three compounding defects turned
that into a fleet-wide operator-action park:

- The heartbeat prompt path never ran under withRateLimitRetry (executor/
  triage/merger all do), so the 401 immediately failed the run. Now wrapped.
- The 401 matched the operator-actionable /credential/ pattern and defaulted
  to "permanent", so FN-7859 parked agents paused/error-unrecoverable. A new
  shared isTransientAuthCredentialError classifier (also used by
  rate-limit-retry) classifies rotation 401s transient + not operator-
  actionable; OAuth scope-grant and API-key failures still park.
- Heartbeat failure classification ran on the stack-bearing error detail;
  stack frames like "at withRateLimitRetry (.../rate-limit-retry.ts)" match
  the usage-limit /rate[_\s]?limit/ pattern. Classification and
  agent.lastError now use the message; stderrExcerpt keeps the full detail.

Self-healing additionally un-parks agents previously paused with
error-unrecoverable whose lastError now classifies recoverable, bounded by
the shared heartbeat error-recovery budget.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 13:57:08 -07:00
gsxdsm
ee7af2513f fix(MAIN-008): address PR review feedback (#2020)
- Label namespaced mcp__* tools as resourceType "mcp" (not "research") so approvals/audit/dedupe keys describe external MCP actions
- Guard getTask in resumeApprovalAfterUnwindIfNeeded so deferred resume cannot mask execute() finally outcomes
2026-07-12 13:56:36 -07:00
Tchorizo
23c732b2a8 docs(MAIN-008): complete Step 7 — document deterministic MCP approval lifecycle
Agent: engineer
Fusion-Task-Id: MAIN-008
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-07-12 13:56:36 -07:00
Tchorizo
b688266a02 test(MAIN-008): complete Step 4 — validate shared MCP lifecycle surfaces
Agent: engineer
Fusion-Task-Id: MAIN-008
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-07-12 13:56:36 -07:00
Tchorizo
555f916ebb fix(MAIN-008): complete Step 3 — resume approved MCP calls once
Agent: engineer
Fusion-Task-Id: MAIN-008
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-07-12 13:56:36 -07:00
Tchorizo
e977fadda9 fix(MAIN-008): complete Step 2 — stabilize MCP executor bootstrap
Agent: engineer
Fusion-Task-Id: MAIN-008
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-07-12 13:56:36 -07:00
gsxdsm
ee1d978984 FN-7876: add custom terminal shortcut buttons to SessionTerminal mobile key bar
Extends the embedded Task Detail SessionTerminal to surface the shared, user-defined terminal shortcuts (from FN-7872's kb-terminal-preferences localStorage) as tappable buttons in its mobile accessory key bar.

- Read customShortcuts via the shared readTerminalPreferences() store on mount and refresh live on the storage event
- Render each custom shortcut as a mobile-only accessory-bar button that injects decodeTerminalShortcutSequence(value) through the focus-preserving keepFocus + sendInput path, clearing sticky Ctrl like the built-in ^C key
- Suppress the buttons for read-only/replay/idle/ended sessions via the existing canAcceptInput gate; desktop embedded terminals get no key bar
- Add .cli-terminal-key--custom styling for the new buttons
- Update docs/dashboard-guide.md to describe the mobile custom-shortcut key bar behavior
- Add a minor changeset for @runfusion/fusion documenting the feature
- Add SessionTerminal.mobile.test.tsx coverage for rendering, injection, live updates, and read-only suppression

Files changed:
 .changeset/fn-7876-session-terminal-custom-shortcuts.md                     |  7 ++
 docs/dashboard-guide.md                                                     |  2 +-
 packages/dashboard/app/components/SessionTerminal.css                      |  5 ++
 packages/dashboard/app/components/SessionTerminal.tsx                      | 31 +++++++
 packages/dashboard/app/components/__tests__/SessionTerminal.mobile.test.tsx | 94 ++++++++++++++++++++++
 5 files changed, 138 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7876
Fusion-Task-Lineage: 61d62ad2-7357-4eb4-b542-6e17deea1e5e
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 13:22:05 -07:00
gsxdsm
a4dde88ff6 FN-7874: add Discord get-help link and central-DB wording to storage banner
Adds a hardened Discord support link and clarifies that project databases move to the central Fusion database in the storage update notice banner.

- Add a "Get help" button/link to the Fusion Discord (https://discord.gg/ksrfuy7WYR) in StorageMigrationNoticeBanner, with new .storage-migration-notice-banner__actions/__help CSS (desktop + mobile layout)
- Revise the banner body copy to state that project databases will be served from the central Fusion database instead of each project's local .fusion/fusion.db SQLite file
- Add storageMigrationNotice.getHelp/getHelpLabel i18n keys and update en/app.json body copy; sync placeholder keys across es/fr/ko/zh-CN/zh-TW locales and regenerate resources.d.ts
- Extend StorageMigrationNoticeBanner tests to cover the new help link (href/target/rel) and updated body copy, including dismissed/error-path cases
- Add a minor changeset for @runfusion/fusion documenting the banner change

Files changed:
 .changeset/fn-7874-storage-banner-get-help.md      |  7 ++++++
 .../components/StorageMigrationNoticeBanner.css    | 26 ++++++++++++++++++++++
 .../components/StorageMigrationNoticeBanner.tsx    | 16 ++++++++++++-
 .../StorageMigrationNoticeBanner.test.tsx          | 16 +++++++++++--
 packages/i18n/locales/en/app.json                  |  4 +++-
 packages/i18n/locales/es/app.json                  |  7 ++++++
 packages/i18n/locales/fr/app.json                  |  7 ++++++
 packages/i18n/locales/ko/app.json                  |  7 ++++++
 packages/i18n/locales/zh-CN/app.json                |  7 ++++++
 packages/i18n/locales/zh-TW/app.json                |  7 ++++++
 packages/i18n/src/resources.d.ts                    |  7 ++++++
 11 files changed, 107 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-7874
Fusion-Task-Lineage: baa88812-18ca-4910-a641-8d6e23f602a6
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 13:17:47 -07:00
gsxdsm
2c7df1bd78 FN-7875: split archived pre-0.50 release notes out of root CHANGELOG.md
Adds a deterministic changelog-archive split so scripts/release.mjs stops regenerating one ever-growing root CHANGELOG.md and instead keeps only current release notes at the root while durably archiving pre-0.50.0 history.

- Add scripts/lib/changelog-archive.mjs with partitionVersionsByCutoff (splits a version-ordered list at the 0.50.0 cutoff, preserving order and treating non-parseable keys as archived) and archivePointerLine (renders the "older releases" pointer appended to the current changelog).
- Rework scripts/release.mjs's syncRootChangelog to build CHANGELOG.md (current versions + archive pointer) and a new CHANGELOG-archive.md (versions before 0.50.0) via a shared buildRootChangelogLines/normalizeChangelogLines helper instead of one monolithic file.
- Add scripts/__tests__/changelog-archive.test.mjs covering cutoff partitioning, boundary/patch handling, non-parseable keys, custom cutoffs, and the archive pointer text.
- Regenerate CHANGELOG.md (now only 0.50.0+) and add CHANGELOG-archive.md containing the pre-0.50.0 history moved out of the root file.

Files changed:
 CHANGELOG-archive.md                         | 10882 +++++++++++++++++++++++
 CHANGELOG.md                                 | 11717 ++-----------------------
 scripts/__tests__/changelog-archive.test.mjs |    58 +
 scripts/lib/changelog-archive.mjs            |    56 +
 scripts/release.mjs                          |    49 +-
 5 files changed, 11710 insertions(+), 11052 deletions(-)

Fusion-Task-Id: FN-7875
Fusion-Task-Lineage: 220e6aa1-54fb-4800-a86e-6d8d21f6bf18
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 13:10:52 -07:00
gsxdsm
b77e12351e FN-7872: add custom terminal shortcut buttons to the Preferences panel
Lets users define, edit, and remove custom terminal shortcut buttons (label + injected key sequence) from the terminal Preferences panel, persisted client-side.

- Add a customShortcuts list to terminalPreferences (kb-terminal-preferences localStorage) with add/edit/remove management
- Add decodeTerminalShortcutSequence to decode \n, \t, \r, \e/\x1b, and \\ escapes for injected sequences
- Render custom shortcut buttons in TerminalModal's shortcut panel, injecting via the focus-preserving sendLiteralShortcut path
- Add management UI (add/edit/remove) for custom shortcuts in the terminal Preferences panel, styled in TerminalModal.css
- Extend TerminalModal and terminalPreferences test coverage for the new custom shortcut behavior
- Document custom terminal shortcuts in docs/dashboard-guide.md
- Add a minor changeset for @runfusion/fusion

Files changed:
 .changeset/fn-7872-terminal-custom-shortcuts.md    |   7 +
 docs/dashboard-guide.md                            |   7 +-
 .../dashboard/app/components/TerminalModal.css     | 106 +++++++++++
 .../dashboard/app/components/TerminalModal.tsx     | 202 ++++++++++++++++++++-
 .../components/__tests__/TerminalModal.test.tsx    | 183 +++++++++++++++++++
 .../utils/__tests__/terminalPreferences.test.ts    |  68 +++++++
 .../dashboard/app/utils/terminalPreferences.ts     | 140 +++++++++++++-
 7 files changed, 708 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-7872

Fusion-Task-Lineage: 9b2df0da-0eb7-4cec-a42b-767e23ff4c2c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-12 13:06:08 -07:00