Commit Graph

9282 Commits

Author SHA1 Message Date
gsxdsm
0900a38630 FN-7478: add local server desktop switch option
Restore the desktop connection manager's local server destination alongside saved remotes.

- Add a Local Server card for desktop-shell switching with active state handling.
- Switch remote profile selection into remote mode before activating the profile.
- Cover desktop local/remote switching behavior with tests and localized labels.
- Document the switch-server local option and add the published package changeset.

Files changed:
 .changeset/fn-7478-local-server-switch-option.md   |  7 +++
 docs/native-shell.md                               |  3 +-
 .../components/NativeShellConnectionManager.css    | 19 ++++++
 .../components/NativeShellConnectionManager.tsx    | 55 ++++++++++++++---
 .../NativeShellConnectionManager.test.tsx          | 71 ++++++++++++++++++++--
 packages/i18n/locales/en/app.json                  |  5 +-
 packages/i18n/locales/es/app.json                  |  5 +-
 packages/i18n/locales/fr/app.json                  |  5 +-
 packages/i18n/locales/ko/app.json                  |  5 +-
 packages/i18n/locales/zh-CN/app.json               |  5 +-
 packages/i18n/locales/zh-TW/app.json               |  5 +-
 packages/i18n/src/resources.d.ts                   |  3 +
 12 files changed, 168 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-7478

Fusion-Task-Lineage: 86a94faa-4799-46cc-aaed-b7901ee9698c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 21:45:21 -07:00
gsxdsm
52dbc0e65e FN-7472: quit Windows desktop runtime on window close
Ensure Windows Desktop treats window close as application shutdown.

- Allow Windows BrowserWindow close events to proceed so Electron emits quit lifecycle hooks.
- Keep non-Windows close-to-tray behavior while documenting platform-specific close semantics.
- Cover native, renderer, tray, and runtime cleanup paths with desktop tests.

Files changed:
 .changeset/fn-7472-windows-desktop-close-quits.md |   7 ++
 packages/desktop/README.md                        |  10 +-
 packages/desktop/src/__tests__/ipc.test.ts        |   9 ++
 packages/desktop/src/__tests__/main.test.ts       |  76 ++++++++++++++-
 packages/desktop/src/__tests__/tray.test.ts       | 110 +++++++++++++++++++++-
 packages/desktop/src/main.ts                      |   8 ++
 packages/desktop/src/tray.ts                      |   4 +
 7 files changed, 214 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-7472
Fusion-Task-Lineage: c007e20f-37b9-435e-861d-1665e2691bc9
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 21:45:21 -07:00
gsxdsm
b800f7d0df FN-7469: select newly created project directories
Project setup now targets folders immediately after they are created from the directory picker.

- Add an opt-in DirectoryPicker mode that selects the API-returned created folder path.
- Enable the mode for setup wizard and project setup forms while preserving other picker behavior.
- Clear wizard path errors on path changes and document the setup behavior.
- Cover created-folder selection and default-picker preservation with dashboard tests.

Files changed:
 .../fn-7469-select-created-project-directory.md    |   7 ++
 docs/dashboard-guide.md                            |   2 +
 docs/getting-started.md                            |   1 +
 .../dashboard/app/components/DirectoryPicker.tsx   |  16 +++-
 .../dashboard/app/components/SetupProjectForm.tsx  |   1 +
 .../dashboard/app/components/SetupWizardModal.tsx  |   3 +-
 .../components/__tests__/DirectoryPicker.test.tsx  | 101 +++++++++++++++++----
 .../components/__tests__/SetupProjectForm.test.tsx |  10 ++
 .../components/__tests__/SetupWizardModal.test.tsx |  43 ++++++++-
 9 files changed, 162 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-7469

Fusion-Task-Lineage: 1883262f-3fdf-4583-9bb0-e9435039e17d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 21:45:20 -07:00
gsxdsm
d16c8b429b FN-7468: expand onboarding quick-start providers
Expand onboarding provider setup so practical first-run choices and advanced controls stay anchored to quick start.

- Add OpenRouter to the curated quick-start provider set and ordering.
- Move advanced/all-provider and custom-provider controls under the quick-start provider section.
- Cover provider ordering, split Anthropic behavior, nested advanced controls, and empty states in onboarding tests.
- Add a minor changeset for the published Fusion package.

Files changed:
 .changeset/fn-7468-onboarding-quick-providers.md   |   7 ++
 .../app/components/ModelOnboardingModal.tsx        |  88 ++++++++--------
 .../__tests__/ModelOnboardingModal.test.tsx        | 116 +++++++++++++++++++--
 .../components/__tests__/onboarding-flow.test.tsx  |  17 +--
 4 files changed, 173 insertions(+), 55 deletions(-)

Fusion-Task-Id: FN-7468

Fusion-Task-Lineage: 744d8a9f-d03d-4909-a00a-00bbae4e59c7

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 21:45:20 -07:00
gsxdsm
9dc248eae2 FN-7471: fix desktop update version fallback
Use packaged runtime metadata so desktop update checks do not compare npm releases against an unresolved current version.

- Resolve @fusion/desktop package metadata as a fallback when dashboard code runs from a desktop deployment.
- Fail closed when the current version is the 0.0.0 sentinel in both update-check paths.
- Cover CLI, desktop, and unresolved-version update-check behavior with regression tests.
- Add a patch changeset for the published Fusion CLI package.

Files changed:
 .changeset/fn-7471-desktop-update-version.md       |  7 ++
 .../src/__tests__/cli-package-version.test.ts      | 59 +++++++++++++++-
 .../src/__tests__/update-check-route.test.ts       | 78 +++++++++++++++++++++-
 .../dashboard/src/__tests__/update-check.test.ts   | 15 +++++
 packages/dashboard/src/cli-package-version.ts      | 37 +++++++++-
 packages/dashboard/src/server.ts                   | 12 +++-
 packages/dashboard/src/update-check.ts             | 15 +++++
 7 files changed, 216 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-7471

Fusion-Task-Lineage: ee633b8c-766b-43f3-855d-3ce7abd41550

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 21:45:20 -07:00
gsxdsm
c39d1ea281 fix: add @fusion-plugin-examples/cursor-runtime vitest aliases
runtime-provider-probes.ts imports probeCursorBinary from
@fusion-plugin-examples/cursor-runtime, but neither the dashboard nor CLI
vitest configs had source aliases for this package. Without the aliases,
Vite tried to resolve the package's dist/ exports which don't exist in a
source checkout, causing every dashboard test that transitively imports
the runtime provider to fail with 'Failed to resolve entry for package'.

This broke 48 dashboard test files in CI run 28561416741 after the cursor
runtime plugin was added without updating the vitest configs.
2026-07-03 13:23:37 -07:00
gsxdsm
843f365452 chore(release): v0.55.0
Version bump via changesets.
2026-07-03 13:10:20 -07:00
gsxdsm
e5cbc71205 FN-7466: split runtime lifecycle tests into seams
Split the runtime lifecycle coverage into focused seam tests while trimming the in-process runtime suite.

- Add dedicated EphemeralWorkerManager tests for task-worker ownership, reuse, cleanup, and deletion paths.
- Cover heartbeat scheduler lifecycle event registration without starting the full runtime.
- Remove migrated lifecycle scenarios from the expensive in-process runtime test file.

Files changed:
 .../src/__tests__/ephemeral-worker-manager.test.ts |  438 +++++++++
 .../src/__tests__/heartbeat-scheduler.test.ts      |  147 +++
 .../runtimes/__tests__/in-process-runtime.test.ts  | 1030 +-------------------
 3 files changed, 597 insertions(+), 1018 deletions(-)

Fusion-Task-Id: FN-7466

Fusion-Task-Lineage: 8493f7b6-91b2-4e7d-9ab6-9fa9cf52441f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 13:08:16 -07:00
gsxdsm
5c0799c977 FN-7465: optimize in-process runtime tests
Reduce in-process runtime test wall-clock time while preserving shutdown and event-forwarding coverage.

- Replace real drain waits with fake timer advancement for runtime shutdown polling and timeout paths.
- Consolidate duplicate runtime startup harnesses for task event forwarding and initialized accessor assertions.
- Drain async runtime callback microtasks directly instead of using polling waitFor loops.

Files changed:
 .../runtimes/__tests__/in-process-runtime.test.ts  | 393 ++++++++++-----------
 1 file changed, 181 insertions(+), 212 deletions(-)

Fusion-Task-Id: FN-7465

Fusion-Task-Lineage: 6bb08316-a2a7-48fb-a972-ce7d912f375d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 13:08:16 -07:00
gsxdsm
da662c41a7 fix(onboarding,desktop): don't error on duplicate first agent; wire Switch-server button
First-run project setup surfaced a blocking "Agent with this name already exists" error when creating
the default CEO. The default first agent can be created from more than one first-run surface (the
unified ModelOnboarding agent step and the project-setup SetupWizard sub-flow), and agent names are
unique per store, so the second create returned 409. The step's goal — a first agent exists — was
already satisfied, so both onboarding surfaces now treat a name collision as success and advance
instead of blocking. The user still creates the agent; they just aren't punished for the flow offering
it twice.

Separately, the desktop header "Desktop local mode / Switch server" button did nothing: main relays
the click as a `shell:open-connection-manager` IPC (webContents.send), but the preload never forwarded
it to the `window` DOM event ShellContext listens for, so the signal was dropped. Add the preload
bridge so the button opens NativeShellConnectionManager (Local/Remote toggle + remote-server profiles),
letting operators switch between running locally, connecting to a remote server, or a different remote.

Regression tests: SetupWizard advances on an already-exists agent; preload dispatches the window event
on the IPC.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 12:54:38 -07:00
gsxdsm
2a844514a1 test: flush microtasks instead of real sleeps in plugin-runner tests
Replace real-timer waits with a deterministic bounded microtask flush for
the fire-and-forget task lifecycle hook chain (FN-5048: no slow tests).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 10:06:21 -07:00
gsxdsm
a318267976 build(desktop): allow redirecting staged deploy via FUSION_DESKTOP_DEPLOY_DIR (#1884)
Follow-up to #1878 (merged). While building the Windows desktop
installer locally, `pnpm deploy`'s final temp-dir rename hits `EPERM` on
the orca-managed Windows workspace mount and litters deeply-nested
`deploy_tmp_*` dirs that are painful to remove.

This lets local Windows installer builds redirect the staged production
closure to an external, plain-NTFS path via a new
`FUSION_DESKTOP_DEPLOY_DIR` env var. **CI and the default in-tree
`packages/desktop/deploy` path are unchanged** — the override is opt-in.

Verified locally: with
`FUSION_DESKTOP_DEPLOY_DIR=C:\Users\...\fusion-build\deploy`, `pnpm
--filter @fusion/desktop build` stages the full closure externally
without the EPERM race, and `electron-builder --projectDir <that dir>
--win nsis --x64` produces a signed installer.

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

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

## Summary by CodeRabbit

* **New Features**
* Desktop deployment staging can now be configured with an environment
variable, making it easier to customize where build files are prepared.
* **Documentation**
* Added notes about updated desktop deployment behavior on Windows,
including common rename and cleanup issues.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-03 09:29:38 -07:00
gsxdsm
08e47d4f0d fix(desktop): migrate userData on relocation, verify packaged assets, harden Windows CI
- Add a one-time copy of the previous default Electron profile into
  ~/.fusion/desktop-user-data (user-data-migration.ts) so upgrading operators
  keep window geometry/session instead of starting fresh (report Issue 8).
- Verify main.js/preload.js/client assets in scripts/build.ts (pre-package
  staging) and in the packaged app.asar via desktop-windows.yml, so an
  incomplete package fails the build/CI instead of dead-ending at runtime with
  a silent missing preload (report Issue 5, recommendation #2).
- Fix two pre-existing stale workflow-assertion tests that expected a bare
  'electron-builder --win' after the scripts moved to '--projectDir deploy'.
- Update the field report with a per-issue resolution matrix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 08:49:43 -07:00
gsxdsm
d97e66a657 fix(desktop): sync lockfile, gate Windows GPU flags, document desktop hardening
- Regenerate pnpm-lock.yaml for the new electron@^33.4.11 CLI dependency so
  --frozen-lockfile stops failing every PR-check job.
- Gate the GPU/sandbox-disabling Electron flags (--no-sandbox, --disable-gpu,
  etc.) to Windows only via os.platform(); applying them on macOS/Linux was a
  security and rendering regression. This also resolves the unused os import
  that failed lint.
- Add FNXC comments for the Windows GPU flags, desktop user-data isolation, and
  CLI dashboard-server reuse per project comment convention.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 08:13:06 -07:00
gsxdsm
62c1fa14fa build(desktop): allow redirecting staged deploy via FUSION_DESKTOP_DEPLOY_DIR
pnpm deploy's final temp-dir rename hits EPERM on the orca-managed Windows workspace mount and litters
deeply-nested deploy_tmp_* dirs. Let local Windows installer builds redirect the staged closure to an
external plain-NTFS path via FUSION_DESKTOP_DEPLOY_DIR; CI and the default in-tree path are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 07:49:49 -07:00
gsxdsm
6d7715fe9e Merge branch 'main' into desktop-release-issues-report 2026-07-03 07:48:51 -07:00
gsxdsm
75cbc059c2 FN-7464: speed up insights route retry tests
Collapse deliberate retry waits in the insights route test suite while preserving retry coverage.

- Mock node:timers/promises in insights route tests so retry backoff resolves immediately.
- Document the FN-7464 performance rationale with an FNXC dashboard test comment.

Files changed:
 packages/dashboard/src/__tests__/insights-routes.test.ts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Fusion-Task-Id: FN-7464

Fusion-Task-Lineage: a4a77c7e-61ba-4abd-be80-059a2df55add

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 07:47:04 -07:00
gsxdsm
d9ef51492d FN-7462: show mobile chat conversation titles
Mobile direct-chat dropdowns now identify sessions by conversation title instead of model-name text.

- Render the mobile session trigger with the conversation title or Untitled while preserving the provider logo.
- Remove mobile trigger model-tag styling and assert the model badge stays out of the compact header.
- Document the mobile Chat dropdown behavior and add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7462-mobile-chat-dropdown-title.md   |  7 ++++
 docs/dashboard-guide.md                            |  2 +-
 packages/dashboard/app/components/ChatView.css     |  8 -----
 packages/dashboard/app/components/ChatView.tsx     |  8 +++--
 .../__tests__/ChatView.core-contracts.test.tsx     | 25 +++++++++++---
 .../components/__tests__/ChatView.mobile.test.tsx  | 39 +++++++++++++++++++++-
 6 files changed, 72 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-7462
Fusion-Task-Lineage: 6a6e2ac3-ecca-4076-81c5-b4e4a65eb286
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 07:47:03 -07:00
gsxdsm
30a11ac919 FN-7461: count footer queues across task states
Correct the dashboard footer counter contract so active task pressure matches board state coverage.

- Count triage and planning lanes as queued while excluding done, archived, and inactive custom lanes.
- Treat only actionable blockedBy values as blocked tasks and keep running/stuck scoped to in-progress work.
- Cover every visible footer counter, background/overlap segments, and the intentional absence of a Done footer count in regression tests.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-7461-footer-counters.md              |  7 ++
 packages/dashboard/app/api/legacy.ts               |  6 +-
 .../__tests__/ExecutorStatusBar.test.tsx           | 86 +++++++++++++++++++++-
 .../app/hooks/__tests__/useExecutorStats.test.ts   | 59 ++++++++-------
 packages/dashboard/app/hooks/useExecutorStats.ts   | 24 +++++-
 5 files changed, 150 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-7461

Fusion-Task-Lineage: a1eceb98-76b2-4820-95c4-888ad61b4162

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 07:47:03 -07:00
gsxdsm
00afb22bcb FN-7458: default startup theme mode to system
Default fresh dashboard startup and appearance reset to System mode while keeping Shadcn Ember as the color theme.

- Set global themeMode defaults and Settings fallback props to system.
- Resolve pre-hydration web and desktop startup from prefers-color-scheme, including invalid cache and fallback paths.
- Update Appearance reset behavior, focused theme tests, docs, and the release changeset.

Files changed:
 .changeset/fn-7458-system-theme-default.md         |   7 ++
 docs/dashboard-guide.md                            |   3 +-
 docs/settings-reference.md                         |   4 +-
 .../core/src/__tests__/global-settings.test.ts     |  17 +++-
 packages/core/src/__tests__/store-settings.test.ts |   6 +-
 packages/core/src/settings-schema.ts               |   6 +-
 .../app/__tests__/index-html-theme-link.test.ts    |  18 ++++
 .../dashboard/app/components/SettingsModal.tsx     |   8 +-
 .../dashboard/app/components/ThemeSelector.tsx     |   6 +-
 .../components/__tests__/ThemeDropdown.test.tsx    |   9 +-
 .../components/__tests__/ThemeSelector.test.tsx    |   2 +-
 .../dashboard/app/hooks/__tests__/useTheme.test.ts | 111 ++++++++++++++++++++-
 packages/dashboard/app/hooks/useTheme.ts           |  21 +++-
 packages/dashboard/app/index.html                  |  13 ++-
 packages/desktop/src/renderer/index.html           |  13 ++-
 15 files changed, 211 insertions(+), 33 deletions(-)

Fusion-Task-Id: FN-7458
Fusion-Task-Lineage: fb6184b4-9a6a-4131-9f97-f8cd12ef904c
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 07:47:03 -07:00
gsxdsm
7300bf54ce FN-7460: disable WebKit text scaling in terminals
Disable WebKit terminal text scaling so iPhone Safari preserves exact xterm cell metrics.

- Set terminal xterm host subtrees to disable text-size adjustment instead of pinning it at 100%.
- Update terminal CSS contract coverage for modal and session terminal surfaces.
- Document the real-iPhone recurrence and add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-7460-ios-terminal-spacing.md                 |  7 +++++++
 .../ui-bugs/xterm-async-font-remeasure-paste-dedupe.md     |  7 ++++---
 packages/dashboard/app/__tests__/terminal-input.test.ts    | 14 +++++++-------
 packages/dashboard/app/components/SessionTerminal.css      |  7 +++++--
 packages/dashboard/app/components/TerminalModal.css        |  9 ++++++---
 .../app/components/__tests__/TerminalModal.test.tsx        |  7 +++++++
 6 files changed, 36 insertions(+), 15 deletions(-)

Fusion-Task-Id: FN-7460

Fusion-Task-Lineage: 00542017-457b-40b8-9139-084218bc3533

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 07:47:03 -07:00
gsxdsm
95325201a6 FN-7459: remember task popup geometry
Remember task-detail popup geometry so operators can reuse one positioned window across tasks.

- Share a stable persisted geometry key for task-detail FloatingWindow instances while keeping per-task window identity.
- Add regression coverage for shared task popup geometry, malformed persisted data fallback, and isolated non-task windows.
- Document desktop/tablet popup geometry persistence and add a release changeset.

Files changed:
 .changeset/fn-7459-task-popup-geometry.md          |   7 ++
 docs/dashboard-guide.md                            |   5 +-
 docs/settings-reference.md                         |   2 +-
 packages/dashboard/app/App.tsx                     |   5 +
 .../App.taskDetailFloatingGeometry.test.tsx        | 111 +++++++++++++++++++++
 .../dashboard/app/components/FloatingWindow.tsx    |   2 +-
 .../components/__tests__/FloatingWindow.test.tsx   |  83 ++++++++++++++-
 7 files changed, 210 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-7459

Fusion-Task-Lineage: 84674283-024f-4ed5-b7a0-6dade1b77f8b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-03 07:47:03 -07:00
ddonaldson130
4bad0920e2 docs(desktop): field report for Windows desktop release issues
Add reports/desktop-release-issues-2026-07-03.md documenting the
regressions observed in the Fusion 0.52.0 Windows desktop release,
including:

- fusion desktop fails to launch because electron is a devDependency
- native launcher walks ancestor dirs and fails on unrelated workspace JSON
- Manage Projects opens Settings instead of overview
- Windows Terminal Help version dialogs on dashboard load
- packaged preload.cjs missing in unpacked release layout
- port collisions and dashboard/gateway drift on Windows
- GPU/sandbox rendering instability on Windows Electron
- isolated user-data path needed
- CLI desktop command not reusing an already-running dashboard server

Also include the two experimental mitigations we applied locally:
- disable GPU/sandbox Electron flags in desktop.ts
- skip embedded local runtime when FUSION_SERVER_PORT is already set

These changes are intended as supporting evidence and starting points
for the Fusion team, not as a final fix.
2026-07-03 03:36:10 -04:00
gsxdsm
96b2df115e fix(desktop): heal launch-mode/shell split-brain hanging Windows local runtime + fix Windows root build (#1878)
## Windows: local runtime hung at "Starting local Fusion runtime…"

### Root cause
Desktop startup had two independent persisted sources of truth that
could disagree:
- `desktop-launch-mode.json` — decides whether **main** *starts* the
embedded local runtime
- `shell-connections.json` (`desktopMode`) — decides whether the
renderer **launch gate** *waits* for it

`shell:setDesktopMode` persists shell settings **before** the fallible
`startLocalRuntimeOnce()` / `saveDesktopLaunchMode()`. So a first
"local" selection whose runtime start threw or was interrupted left
`shell=local` / `launch-mode=choose` **permanently**. Every later launch
then sat at "Starting local Fusion runtime…" polling a runtime nobody
started → 30s timeout.

### Fix (defense in depth) — `78f0bc31`
- `initializeApp` reconciles: a completed shell `local` selection is
authoritative → heals the launch-mode file and starts the runtime.
- `onDesktopModeChange` / `onDesktopLaunchModeChange` persist
launch-mode **before** the fallible start so it can't re-desync.
- `DesktopLaunchGate` no longer assumes main started the runtime — if
it's not running/starting it actively `setDesktopMode("local")` before
polling.
- Env-gated startup trace (`FUSION_STARTUP_TRACE`) so packaged builds
(which log nothing) are diagnosable.
- Regression tests: split-brain → runtime starts + file heals;
agreement-on-choose → no start.

**Verified end-to-end under real Electron 35 / Node 22.16**: from the
exact split-brain state the runtime now reaches `RUNNING` and the
launch-mode file heals.

### Also: Windows root-build breakages — `bd24bd4c8`
- `scripts/build-workspace.mjs` "run as main" guard compared
`import.meta.url` to `` `file://${process.argv[1]}` ``, which never
matches on Windows → root `pnpm build` silently no-opped (exit 0, no
dist). Now uses `pathToFileURL(process.argv[1]).href`.
- `spawn('pnpm', …)` without `shell:true` (ENOENT on Windows) in
`build-workspace.mjs` and `packages/cli/tsup.config.ts` → pass `shell`
on win32.

### Notes
- `@fusion/desktop` and `@fusion/dashboard` are private → no changeset.
- Build the Windows installer via the `desktop-windows` workflow
(`electron-builder --projectDir deploy`); local `pnpm deploy` staging
hits an unrelated directory-rename race on managed-workspace
filesystems.

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


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

* **New Features**
* Added optional desktop runtime startup tracing (enabled via
environment variable).
* **Bug Fixes**
* Improved local desktop handoff to prevent reload loops and navigate
directly to the embedded local runtime.
* Added “split-brain” healing between persisted launch mode and shell
settings.
* Prevented auto-registration of runtime root/CWD during
desktop/dashboard startup.
* Improved Windows compatibility for CLI/workspace command spawning and
npm install process handling.
* **Tests**
* Expanded local/Electron integration, navigation, and onboarding
regression coverage; improved async flushing for more reliable
initialization.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-03 00:17:58 -07:00
ddonaldson130
fd94f7a191 fix(dashboard): prevent Windows Terminal popup and repair Manage Projects navigation
Two user-facing bugs on Windows:

1. Windows Terminal version dialogs on dashboard load/settings
   - The embedded terminal auto-create flow was spawning a PTY on Windows,
     which could invoke wt.exe and trigger its native "Help" version
     message boxes (Windows Terminal 1.24.11321.0).
   - Fix: skip auto-creation of the first terminal tab on Windows. Users
     can still create a terminal explicitly; the failure no longer recurs
     automatically on every dashboard session.

2. Manage Projects opens Settings instead of project overview
   - handleViewAllProjects only reset viewMode; if the previous taskView was
     "settings", MainContent rendered the Settings page before the overview
     branch because the settings check precedes the overview branch.
   - Fix: also reset taskView to "command-center" when leaving a project so
     the overview surface (ProjectOverview) renders.
   - Thread setTaskView through useProjectActions so the action has access to
     the view router.

Tested on Windows 11 with Fusion 0.52.0 dashboard.
2026-07-03 03:15:17 -04:00
gsxdsm
a436998a65 fix(dashboard): hide right dock by default + defer spurious onboarding project-not-found toast
- Right dock now defaults to HIDDEN when the operator has no stored preference (readStoredRightDockOpen),
  so first-run/onboarding lands on an uncluttered board; users opt in via the Header toggle (persists
  "true"). Combined with the existing taskView="board" default and viewMode->"project" transition, first
  run lands on the board. Updated the design comments and controller Harness tests (seed the open flag)
  and added a focused default-closed assertion.

- useDeepLink deferred the "Project 'X' not found" toast behind a 3s grace window. A project selected
  during onboarding is deep-linked via ?project=<id> before the projects list revalidates to include it,
  so the eager toast fired even though the project loads a beat later. The deferred toast is cancelled as
  soon as the project appears in the list; only a genuinely-absent project past the window still errors.
  Added symptom-verification coverage (project appears within window -> no toast) and updated the
  StrictMode/unknown-project/App-level tests to advance fake timers.

- Removed the stale ModelOnboardingModal test asserting the research-runs note that was intentionally
  removed from onboarding earlier.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 00:12:10 -07:00
gsxdsm
9df13c7ffa fix(dashboard): garbage-collect stale SWR caches and add Clear local data button
Stale SWR hydration entries (per-chat-session/per-room message caches up to
500KB each) were never garbage-collected — readCache returned null for stale
entries but left the bytes on disk, and nothing swept abandoned caches. This
caused localStorage quota exhaustion for users with many projects and chat
sessions.

Three fixes:
- readCache now lazily deletes stale entries (behavior-preserving; every
  reader already treats stale as a miss and re-fetches)
- Boot sweep pruneStaleCacheEntries() in DashboardLoader removes any
  kb-dashboard-* entry older than 24h before hydration hooks read caches
- Settings > General "Browser Data" panel with a Clear local data button
  that wipes all Fusion-owned browser data while preserving the auth token

Also completes the vitest localStorage mock (was missing length/key).
2026-07-02 23:53:26 -07:00
gsxdsm
55f260ad73 fix(dashboard): persist onboarding model default + defer CLI-install banner
Two false-positive first-run banners:

1. "Select Default Model" recommendation appeared even after choosing a model in onboarding.
   The picked model lived only in local state until completeOnboarding ran on the final step, so
   selecting a model then exiting/skipping before the last step lost the choice — and
   defaultProvider/defaultModelId stayed unset, tripping the recommendation. Now the pick is persisted
   immediately in handleModelSelect, and completeOnboarding falls back to the first available model
   when the operator connected a provider but never opened the dropdown. Either path leaves a durable
   global default so the recommendation no longer misfires.

2. "Install the Fusion CLI" banner showed immediately on first run. Added a 3-day grace period keyed
   off the first time the banner becomes eligible; Settings -> General -> CLI Binary still installs on
   demand meanwhile, so this only defers the passive nudge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 23:49:43 -07:00
gsxdsm
914c38ff5d fix(dashboard): poll health so a stale "engine not running" banner clears
useDashboardHealth fetched /api/health once on mount and never again. Right after a project is
created the engine is still starting, so that single fetch reports engine.available=false and the
"AI engine is not running" banner shows — and because health was never refreshed, the banner stayed
up even after the engine came online (the user reported the banner while the engine was in fact
running). Poll every 15s and preserve the last value on transient errors so the banner clears on its
own once the engine reports available.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 23:42:14 -07:00
gsxdsm
424e66ee2e fix(dashboard): project setup asks for folder before name
The project name auto-derives from the chosen directory, so present the folder/directory picker
before the Project Name field — picking the folder first pre-fills a sensible name instead of
asking for a name before there is a folder to base it on.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 23:33:50 -07:00
gsxdsm
0771c34b0b fix(dashboard): mark GitHub onboarding step done when authenticated via gh CLI
On the GitHub onboarding step, when GitHub is authenticated via the gh CLI (no OAuth provider),
the "Continue with gh CLI auth" button called setStep("project-setup") directly, skipping the
completion bookkeeping — so "github" was never added to completedSteps and step 2 never checked
off in the progress indicator. Advance via handleNext when ready via gh CLI (marks the step
completed) and via handleSkip when GitHub isn't connected (marks it skipped).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 23:31:15 -07:00
gsxdsm
4708d0b644 fix(dashboard): tidy first-run onboarding (drop research note; scope remote-connect card)
- Remove the "Research runs require provider credentials and an enabled Research View…" helper note
  from the AI-setup step.
- Show the "Connect remote Fusion server" card only when not already connected to a remote server
  (no active remote profile) — on any host including web — and never in LOCAL desktop mode, where the
  local runtime is already the backend and prompting for a remote URL just confused first-run setup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 23:09:37 -07:00
gsxdsm
776df1ac25 fix(desktop): wire a ModelRegistry so onboarding shows models (not just "connected")
createServer's modelRegistry is optional and, when absent, the /api/models endpoint returns an
empty list — so after connecting a provider (e.g. Anthropic) the onboarding model picker showed
"no models". The desktop wired authStorage but no ModelRegistry.

Add a shared createFusionModelRegistry(authStorage) factory to @fusion/engine (which already depends
on @earendil-works/pi-coding-agent) so non-CLI hosts don't need that dep directly, and pass its
result as modelRegistry from both desktop server paths. Verified against a clean embedded server:
/api/models now returns 24 Claude models instead of an empty list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 23:09:36 -07:00
gsxdsm
f92c255e45 FN-7457: stabilize plugin runner lifecycle hook tests
Replace real timer waits with a bounded microtask flush for plugin runner lifecycle hook tests.

- Add a shared flushMicrotasks helper for fire-and-forget hook assertions.
- Update task lifecycle hook tests to avoid setTimeout-based settling delays.
- Document the test-settling requirement with an FNXC comment.

Files changed:
 .../engine/src/__tests__/plugin-runner.test.ts     | 23 ++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-7457

Fusion-Task-Lineage: 8a4eb36c-4e36-4c97-a88d-d76b8f410dc8

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 22:53:51 -07:00
gsxdsm
666adff1f7 test(desktop): mock createFusionAuthStorage in local-server engine mock
local-server now imports createFusionAuthStorage from @fusion/engine; add it to the test's engine
mock so the startup path resolves.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 22:41:24 -07:00
gsxdsm
98f46cb33a fix(desktop): wire auth storage so first-run onboarding (AI/GitHub) actually opens
The desktop embedded server called createServer WITHOUT an authStorage, so GET /api/auth/status
returned 500 "Authentication is not configured". The dashboard's first-run onboarding hook
(useAuthOnboarding -> fetchAuthStatus) catches that failure silently and never opens the model
onboarding wizard — so the desktop skipped straight to project creation with no AI/GitHub setup,
regardless of onboarding-completion flags (which is why clearing them did nothing). Providers also
couldn't be authenticated at all.

Wire createFusionAuthStorage() (the same storage the CLI dashboard/serve commands use) into both the
primary (local-runtime) and legacy (local-server) desktop server paths. Verified against a clean
embedded server: /api/auth/status now returns 200 with the provider list instead of 500. (Full
API-key provider wrapping stays CLI-only for now; OAuth + CLI providers are available on desktop.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 22:40:46 -07:00
gsxdsm
c976d75d8d fix(dashboard): start the engine on project creation so it isn't reported unavailable
POST /api/projects registered a project but only started its engine lazily on the first scoped
store access, so a freshly-created project — especially the operator's FIRST project on the
desktop, where no other engine is running — left engineManager with no running engine. The
dashboard's project view then showed "AI engine is not running" (EngineUnavailableBanner keys off
/api/health engine.available). Proactively warm the engine via getOrCreateProjectStore (fires the
onProjectFirstAccessed hook -> engineManager.onProjectAccessed -> ensureEngine) right after the
project is activated, fire-and-forget so it never blocks/fails the registration response.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 21:53:05 -07:00
gsxdsm
0c43ed42cf fix: address PR review feedback + typecheck failure
- DesktopLaunchGate: the chooser onPick("local") path still called the removed
  applyServerBaseUrl helper (broke Typecheck and the desktop local chooser flow) —
  call navigateToLocalRuntimeOrigin. Also re-read shell.getState() immediately before the
  self-healing start check so a stale mount snapshot doesn't fire a redundant
  setDesktopMode("local") on normal boots (Greptile).
- register-fn-binary-routes: on Windows the npm install runs under a shell, so a timeout's
  child.kill only stopped cmd.exe and left npm.cmd/node running — kill the whole process tree
  via taskkill /T on win32 (CodeRabbit).
- local-server.test: align with the new resolver contract — assert the runtime never
  auto-registers the root project and starts engine-less when no projects exist (CodeRabbit).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:57:25 -07:00
gsxdsm
b843305144 fix(dashboard): auto-open first-run onboarding even when the provider list is empty
useAuthOnboarding gated its first-run check on `providers.length > 0`, so a brand-new install
(notably the desktop app on first launch, which can report zero configured providers) skipped
onboarding entirely and landed the operator on an empty dashboard with no AI/GitHub setup.

Evaluate first-run onboarding from completion state regardless of the provider list, so brand-new
users are guided through the model-onboarding wizard (AI -> GitHub -> Project) before project
creation. Existing branches (authenticated provider, completed onboarding, local completion,
setup-wizard deferral, one-shot guard) are unchanged. Adds an empty-provider-list regression test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:16:43 -07:00
gsxdsm
b331f26f3d fix(desktop,cli): never auto-create a project in home/cwd; onboard instead
The desktop embedded runtime auto-registered its runtime root (the user's HOME directory) as a
project on first launch, and bare `fusion` / `fn` / `fn dashboard` / `fusion dashboard`
auto-registered the CWD as a project. Both silently created a "cwd-mode" project the operator
never chose and dropped them onto a board for it.

- Desktop: replace ensureDesktopRuntimeProject (which registered home) with
  resolveDesktopRuntimePrimaryProject, which only PICKS an already-registered project as the
  primary engine target and registers nothing. With no projects the server starts engine-less
  (createServer's engine is optional) and the dashboard shows its onboarding empty state.
  Applied to both the primary (local-runtime) and legacy (local-server) desktop server paths.
- CLI dashboard command: ensureCwdProjectRegistered now runs with autoRegister:false, so it uses
  the CWD project only if already registered, else starts with none and the dashboard onboards.
  (serve/daemon keep their existing --no-auto-register flag; the CLI `desktop` launcher unchanged.)

Verified: with zero projects the embedded server starts, /api/health -> 200, /api/projects -> [],
/ serves the client. Unit test asserts resolveDesktopRuntimePrimaryProject registers nothing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:16:42 -07:00
ddonaldson130
c7641f9d5e fix(cli): add electron as runtime dependency for fusion desktop
The published @runfusion/fusion package ships the desktop runtime assets
in dist/desktop/, but the [title-id-drift] db.ts migration normalized 0 active titles
[done-paused-backfill] db.ts migration repaired 0 done task rows
[title-id-drift] archive-db normalized 0 archived titles
[desktop] Auto-registered project "Fusion" at C:\Users\drewd\Tools\fusion-latest
[server:terminal] WebSocket server mounted { path: '/api/terminal/ws' }
[ai-session-store] Cleanup removed stale sessions {
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0,
  maxAgeMs: 604800000,
  operation: 'cleanup-stale-sessions',
  _emittedAt: '2026-07-03T03:03:31.683Z',
  _diagnosticsId: 'bc57bc09-d320-46b1-8717-a139f95bb9b7'
}
[server] AI session cleanup summary {
  message: 'Removed stale AI sessions',
  source: 'initial',
  ttlMs: 604800000,
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0
} command calls require('electron')
to find the Electron binary. Electron was only declared as a built
dependency in pnpm-workspace.yaml, which makes it available during source
builds but does not include it in the published npm package. As a result,
[title-id-drift] archive-db normalized 0 archived titles
[server:terminal] WebSocket server mounted { path: '/api/terminal/ws' }
[ai-session-store] Cleanup removed stale sessions {
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0,
  maxAgeMs: 604800000,
  operation: 'cleanup-stale-sessions',
  _emittedAt: '2026-07-03T03:03:37.491Z',
  _diagnosticsId: 'a0c428a8-133d-4673-ab93-82a092646b13'
}
[server] AI session cleanup summary {
  message: 'Removed stale AI sessions',
  source: 'initial',
  ttlMs: 604800000,
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0
} fails or hangs for npm consumers.

Fix: move electron to the dependencies of @runfusion/fusion so it is
installed alongside the CLI, and remove it from onlyBuiltDependencies.

Fixes: the desktop launcher regression where [title-id-drift] archive-db normalized 0 archived titles
[server:terminal] WebSocket server mounted { path: '/api/terminal/ws' }
[ai-session-store] Cleanup removed stale sessions {
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0,
  maxAgeMs: 604800000,
  operation: 'cleanup-stale-sessions',
  _emittedAt: '2026-07-03T03:03:43.460Z',
  _diagnosticsId: '325b9f28-e5d3-4937-855e-c5d1b95420b8'
}
[server] AI session cleanup summary {
  message: 'Removed stale AI sessions',
  source: 'initial',
  ttlMs: 604800000,
  terminalDeleted: 0,
  orphanedDeleted: 0,
  totalDeleted: 0
} cannot
resolve the Electron binary from a normal npm install.
2026-07-02 23:03:43 -04:00
gsxdsm
b276a98ae0 fix(dashboard): spawn npm with a shell on Windows for CLI install button
The CLI-binary panel's "Install with npm" button (POST /system/fn-binary/install) ran
`spawn("npm", ["install","-g","runfusion.ai"], { shell: false })`. On Windows npm resolves to
npm.cmd, which Node refuses to spawn without a shell (spawn npm ENOENT / EINVAL, CVE-2024-27980),
so the button failed with "spawn npm ENOENT". Use shell on win32; the command/args are fixed
constants with no caller input, so shell quoting is safe. (The npx spawns in cli skills/extension
already set shell:true.)

Verified on Windows: spawn("npm",["--version"],{shell:false}) -> ENOENT; {shell:true} -> ok.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:00:43 -07:00
gsxdsm
ca244c07a2 fix(desktop): load local UI from the runtime origin so /api is reachable
After the runtime starts, the packaged renderer was left on its file:// page and only had
?serverBaseUrl=… appended. But the dashboard client issues RELATIVE /api requests, so on a
file:// origin they resolve to file:///api/… and fail ("Can't reach the Fusion backend /
Failed to fetch"); the embedded server also sends no CORS header, so a cross-origin fetch
would be blocked as well. (The server itself is fine — verified it serves both /api/health
and the client HTML at /.)

Fix: once the runtime is running, navigate the window to the runtime's OWN origin
(http://127.0.0.1:<port>/), which the embedded server serves — making /api same-origin.
This mirrors how remote mode already navigates to its server URL. The gate now treats "page
served over http(s)" as the ready signal (protocol check) instead of a serverBaseUrl URL
param; that also supersedes the previous cached-context handoff check (04fd91f6) and keeps
the reload loop closed, since bootstrapShellHostContext() strips shell query params at load.

Regression tests: navigates to the runtime origin exactly once from file://; renders the app
without navigating when already served over http; starts the runtime first when it isn't
running, then navigates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 19:26:50 -07:00
gsxdsm
f9733341b5 FN-7453: add GitLab enablement controls
Add a settings-controlled GitLab enablement path while preserving saved GitLab configuration.

- Add project and global GitLab enable settings with collapsible Settings UI for URL and token controls.
- Gate GitLab auth, import loading, and import actions when GitLab integration is disabled.
- Preserve global GitLab values separately during global settings saves and document the new behavior.
- Cover enablement resolution, settings save behavior, disabled import UI, and GitLab route/auth gating with tests.

Files changed:
 .changeset/fn-7453-gitlab-enable-disclosure.md     |  7 ++
 docs/dashboard-guide.md                            |  7 ++
 docs/gitlab-parity-inventory.md                    |  1 +
 docs/settings-reference.md                         |  4 ++
 docs/task-management.md                            |  6 +-
 packages/core/src/__tests__/gitlab-config.test.ts  | 17 ++++-
 .../core/src/__tests__/settings-parity.test.ts     | 18 +++--
 packages/core/src/gitlab-config.ts                 | 15 ++++-
 packages/core/src/index.ts                         |  2 +-
 packages/core/src/settings-schema.ts               |  2 +
 packages/core/src/types.ts                         |  5 ++
 .../app/__tests__/settings-save-split.test.ts      | 20 +++---
 .../dashboard/app/components/GitHubImportModal.tsx | 43 +++++++++---
 .../dashboard/app/components/SettingsModal.css     | 77 +++++++++++++++++++++
 .../dashboard/app/components/SettingsModal.tsx     | 34 ++++++++-
 .../__tests__/GitHubImportModal.test.tsx           | 19 ++++++
 .../__tests__/SettingsModal.general.test.tsx       | 78 ++++++++++++++++++++++
 .../SettingsModal.scheduling-merge.test.tsx        |  7 +-
 .../app/components/settings/save-split.ts          |  5 +-
 .../settings/sections/GeneralSection.tsx           | 36 ++++++----
 .../settings/sections/GlobalGeneralSection.tsx     | 71 ++++++++++++--------
 .../components/settings/sections/MergeSection.tsx  | 44 +++++++-----
 .../dashboard/src/__tests__/gitlab-auth.test.ts    | 20 ++++++
 .../dashboard/src/__tests__/routes-gitlab.test.ts  | 11 +++
 packages/dashboard/src/gitlab-auth.ts              | 11 ++-
 25 files changed, 458 insertions(+), 102 deletions(-)

Fusion-Task-Id: FN-7453

Fusion-Task-Lineage: 81fbd39d-675f-49d6-8d13-b7fcb4d25658

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 19:01:09 -07:00
gsxdsm
04fd91f66b fix(desktop): stop local-runtime handoff reload loop (rapid "Starting Fusion" flashing)
After the runtime starts, DesktopLaunchGate calls applyServerBaseUrl() which reloads the
page with ?serverBaseUrl=… so the shell-host bootstrap can route API calls to the embedded
server. But main.tsx runs bootstrapShellHostContext() at module load — BEFORE the gate's
effect — and it strips every shell query param from the URL via history.replaceState. The
gate then checked window.location.search for serverBaseUrl (after an await), always missed
it, and re-ran the handoff → window.location.replace → reload → strip → an infinite reload
loop that renders as rapid "Starting local Fusion runtime…" flashing that never connects.

This was latent until the split-brain fix (78f0bc31) let the runtime actually start and
reach the handoff.

Fix: detect the completed handoff from the CACHED shell-host context
(getShellHostContext().serverUrl), which the bootstrap preserves, instead of the stripped
URL (URL param kept only as a fallback).

Adds a DesktopLaunchGate regression test: with serverUrl present in the cached context but
stripped from the URL, the gate renders children and does NOT reload; on first load it
performs the handoff exactly once. Verified the test fails against the pre-fix gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 18:45:20 -07:00
gsxdsm
7a4b0bf412 FN-7456: fix initial iOS terminal keyboard spacing
Fix iOS mobile terminal measurement so keyboard-open sessions size correctly on first render.

- Seed focused iOS terminal viewport baselines from guarded screen dimensions when the layout height is already keyboard-shrunk.
- Apply the same initial keyboard-open overlap handling to TerminalModal and the shared mobile keyboard hook.
- Add regression coverage for 10px and 12px mobile terminal sizing before repair events, plus a patch changeset.

Files changed:
 .changeset/fn-7456-ios-mobile-terminal-spacing.md  |   7 ++
 .../dashboard/app/components/TerminalModal.tsx     |  31 +++++-
 .../__tests__/SessionTerminal.mobile.test.tsx      |  42 ++++++++
 .../components/__tests__/TerminalModal.test.tsx    | 116 +++++++++++++++++++++
 packages/dashboard/app/hooks/useMobileKeyboard.ts  |  31 +++++-
 5 files changed, 225 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7456

Fusion-Task-Lineage: 8f11fc95-51ca-49b0-b9cd-b3e14501ab92

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 18:28:06 -07:00
gsxdsm
1430a42dd8 FN-7455: fix mobile direct chat header alignment
Keep the mobile direct-chat header on a single left-aligned row without losing accessible context.

- Hide the direct-chat ViewHeader title shell from layout while preserving the accessible Chat heading.
- Keep the back button first and the active session switcher beside it on a non-wrapping mobile row.
- Extend mobile chat coverage for long duplicate session titles, Bot fallback labels, and the CSS layout contract.
- Document the updated mobile Chat header behavior and add a patch changeset.

Files changed:
 .changeset/fn-7455-mobile-chat-header-layout.md    |  7 ++
 docs/dashboard-guide.md                            |  2 +-
 packages/dashboard/app/components/ChatView.css     | 17 +++--
 packages/dashboard/app/components/ChatView.tsx     |  4 +-
 .../components/__tests__/ChatView.mobile.test.tsx  | 80 ++++++++++++++++++++--
 5 files changed, 98 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-7455

Fusion-Task-Lineage: fe14b542-ff6a-437b-ad89-8011c2b3c299

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 18:11:49 -07:00
gsxdsm
78ebeafcec FN-7454: show Linear Import in Plugin Manager
Register Linear Import as a built-in plugin so users can install and manage it from Plugin Manager.

- Add fusion-plugin-linear-import to the built-in plugin catalog.
- Extend Plugin Manager registry and rendering coverage for the Linear Import entry.
- Add a patch changeset documenting the operator-visible plugin visibility fix.

Files changed:
 .changeset/fn-7454-linear-plugin-visibility.md     |  7 ++
 .../dashboard/app/components/PluginManager.tsx     | 11 +++
 .../__tests__/PluginManager.registry.test.tsx      | 72 ++++++++++++++++++-
 .../components/__tests__/PluginManager.test.tsx    | 80 ++++++++++++++++++++++
 4 files changed, 168 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7454

Fusion-Task-Lineage: 1b54adb4-78cc-47cc-ad7a-d675de64fd49

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-02 18:06:00 -07:00
gsxdsm
bd24bd4c82 fix(build): make root workspace build run on Windows
Two Windows-only breakages in the build path:

- scripts/build-workspace.mjs: the "run as main" guard compared import.meta.url
  to `file://${process.argv[1]}`, which never matches on Windows (import.meta.url
  is file:///C:/… with forward slashes and a triple slash; argv[1] is C:\… with
  backslashes and no scheme). So `pnpm build` at the repo root silently no-opped
  (exit 0, no output, no dist) and packaging shipped empty/stale dist. Compare
  against pathToFileURL(process.argv[1]).href instead.

- scripts/build-workspace.mjs runPlannedBuilds and packages/cli/tsup.config.ts
  runWorkspaceCommand spawned `pnpm` without shell:true; on Windows pnpm is a
  .cmd shim Node refuses to spawn without a shell (ENOENT/EINVAL, CVE-2024-27980),
  failing with `spawn pnpm ENOENT`. Pass shell on win32 (args are fixed repo build
  invocations with no shell metacharacters).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 15:20:17 -07:00
gsxdsm
78f0bc3190 fix(desktop): heal launch-mode/shell split-brain that hung local runtime on Windows
Desktop startup used two independent persisted sources of truth that could
disagree: desktop-launch-mode.json decided whether main STARTS the embedded
local runtime, while shell-connections.json (desktopMode) decided whether the
renderer launch gate WAITS for it. shell:setDesktopMode persists shell settings
before the fallible startLocalRuntimeOnce()/saveDesktopLaunchMode(), so a first
"local" selection whose runtime start failed or was interrupted left
shell=local / launch-mode=choose permanently. Every subsequent launch then sat
at "Starting local Fusion runtime…" polling a runtime nobody started, timing out
after 30s.

Fix (defense in depth):
- initializeApp reconciles: a completed shell "local" selection is authoritative;
  it heals the launch-mode file and starts the runtime.
- onDesktopModeChange/onDesktopLaunchModeChange persist launch-mode BEFORE the
  fallible start so an interrupted start cannot re-create the desync.
- DesktopLaunchGate no longer assumes main started the runtime; if it is not
  running/starting it actively (re)starts via setDesktopMode("local") before polling.
- Add env-gated startup trace (FUSION_STARTUP_TRACE) so packaged builds, which
  otherwise log nothing, can diagnose this class of stall.

Regression tests assert the invariant (split-brain -> runtime starts + file heals;
agreement-on-choose -> no start). flushPromises now drains via a macrotask so
run()-based tests observe a fully-initialized app regardless of async chain length.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 15:20:15 -07:00