Commit Graph

9955 Commits

Author SHA1 Message Date
gsxdsm
6dc8eb7161 perf: snapshot migrated in-memory DB to skip per-test migrations
db.init() replays SCHEMA_SQL + ~129 migrations on every fresh in-memory
DB (~40ms each), which is minutes of pure setup across thousands of
DB-backed tests. Add a test-only migrated-schema snapshot: migrate ONE
in-memory DB per test file, serialize it, and deserialize a fresh copy
per test instead of re-migrating. Each test still gets a brand-new,
fully-isolated in-memory DB; only the migration cost is amortized.

- sqlite-adapter: expose serialize()/deserialize() (node:sqlite + bun)
- db.ts: setInMemoryTemplateSnapshot() hook (test-only, null in prod) +
  serializeSnapshot(); constructor deserializes the snapshot for
  in-memory DBs so init() short-circuits migrate()+compat at v129
- store-test-helpers: install/clearInMemoryDbSnapshot harness
- dashboard: db-snapshot-helper mirror (core __tests__ is cross-package)
- convert agent-store, mission-store, workflow-routes suites

Measured (raw db.init(): 43ms -> 5ms, 8x):
- agent-store      13.12s -> 3.32s
- mission-store    17.62s -> 5.69s (min of 3)
- workflow-routes  tests 4.38s -> 2.79s (min of 5; not init-dominated)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 16:48:56 -07:00
gsxdsm
744aa2cc05 feat(engine): scope verification to changed files + scope-aware timeout
Diff-proportional verification (deriveFileScopedPnpmTestCommand) + scope-aware
verification timeout, so merge/step checks finish in seconds. Propagated to this
worktree directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 16:11:45 -07:00
gsxdsm
3513d5f6f8 FN-7002: fix mobile New Task dialog affordances
Keep mobile New Task dialog controls reachable and tappable under keyboard-constrained viewports.

- Re-enable hit testing on the New Task sheet while preserving desktop overlay click-through behavior.
- Bound GitHub, dependency, and agent picker popups so mobile users can scroll them inside the sheet.
- Add regression coverage for mobile dialog affordances and document the mobile behavior.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-7002-mobile-new-task-affordances.md  |  7 ++
 docs/dashboard-guide.md                            |  2 +-
 packages/dashboard/app/components/NewTaskModal.css | 18 +++++
 .../app/components/__tests__/NewTaskModal.test.tsx | 87 +++++++++++++++++++++-
 .../__tests__/core-modals-mobile.test.tsx          | 32 ++++++++
 5 files changed, 144 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7002

Fusion-Task-Lineage: 31c2504e-56fd-4395-bbe3-e753aab04e23
2026-06-25 16:11:45 -07:00
gsxdsm
4349f6a72f fix(engine): make merge/step verification timeout scope-aware (#1771)
## Problem

Fusion's verification gate (the merger, and the executor's per-step
auto-gate) runs the project's configured `testCommand`/`buildCommand`
bounded by a **flat 10-minute** default
(`VERIFICATION_COMMAND_TIMEOUT_MS = 600_000`) when no
`verificationCommandTimeoutMs` override is set. A **workspace-scoped**
command (a full suite that legitimately takes ~10+ min) hits that wall
and is killed as an **infra `timedOut`** — blocking the merge — even
though nothing is actually hung. Meanwhile a **package-scoped** command
got a too-generous bound. The `fn_run_verification` tool already derived
its default from scope (300s/900s); the merger/executor did not.

## Change

Make the shared `runVerificationCommand` (used by both the merger and
the executor auto-gate) **scope-aware**, mirroring the tool:
- **package-scoped** (`pnpm --filter`/`-F …`) → **300s**
- **workspace-scoped** (root command like `pnpm test`) → **900s**

An explicit project `verificationCommandTimeoutMs` still overrides, and
the 30-min hard cap (`VERIFICATION_COMMAND_HARD_CAP_MS`) still clamps.
New `classifyVerificationScope` / `defaultVerificationTimeoutMs` helpers
mirror `run-verification-tool`'s `DEFAULT_TIMEOUT_PACKAGE_SEC` (300) /
`DEFAULT_TIMEOUT_WORKSPACE_SEC` (900).

## Verification
- `verification-utils.test.ts` (new scope-classification + default
cases), `run-verification-command.test.ts`,
`merger-verification.test.ts` — **143 tests pass**.
- Lint clean. `patch` changeset added.

Note: a workspace command needing >900s should be **scoped** (FN-5048 /
the bounded-verification guidance), or set
`verificationCommandTimeoutMs` explicitly.

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

<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1771">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

* **New Features**
* Verification (merge/step gate) timeouts are now scope-aware:
package-scoped commands default to 300s and workspace-scoped commands
default to 900s.
* If a custom timeout is provided, it still overrides the default, while
the safety hard cap remains enforced.

* **Bug Fixes**
* Prevents verification jobs from using an overly generic fixed timeout,
reducing unnecessary early timeouts or excessive waits.

* **Tests**
* Expanded coverage to validate scope detection and the new default
timeout behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 16:11:36 -07:00
gsxdsm
826045d50b fix(dashboard): repair CSS token/contrast regressions and ~19 stale tests (#1770)
Follow-up to #1765 (which fixed the first 30). Fixes ~19 more
deterministic dashboard test failures that were pre-existing on `main`
in the non-blocking full-suite lane. Mix of **real product fixes** and
stale-test reconciliation — no appeasement (no widened timeouts, skips,
or weakened assertions). Rebased onto latest `main`.

## Real product fixes (guards caught genuine regressions)
- **Info-toast contrast (WCAG AA):** shadcn-custom light theme had
white-on-`#0284c7` (4.10 < 4.5); enrolled it in the light-mode dark-text
correction.
- **27 undefined CSS token references** (typos/foreign tokens) renamed
to canonical tokens; defined the genuinely-intended `--border-strong`
and `--right-dock-min/max-width`.
- **Raw `rgba()` box-shadow** tokenized to `color-mix`; dev-server
mobile header split into its own responsive rule.

## Stale tests reconciled with intentional product changes
- `workflowColumns` graduated to always-on (`buildBoardWorkflowsPayload`
unit test).
- Workflow optional-steps source re-pointed to v2 `optional-group`
nodes.
- Command-center pricing docs (filled one real gap: `openai-codex:*`
keying).
- SetupWizardModal `detectWorkspace` + `workspaceMode`/`taskPrefix`
payload.
- board-mobile listener-count assertion → unmount no-throw behavior.
- CommandCenterControls / ThemeSelector "Default" → "Fusion Legacy"
relabel.
- ProjectOverview / WorkflowNodeEditor header divider intentionally
removed.

## Verification
- foundation-ui lane fully green (56 files / 487 tests); all
originally-failing files pass.
- All CSS hygiene/token-validity guards green post-tokenization (no new
violations).
- `patch` changeset added (toast-contrast + tokenization ship in
`@runfusion/fusion`).

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

<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1770">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved dashboard styling consistency across several screens,
including better contrast for toast messages and more reliable theme
colors, shadows, and spacing.
* Fixed mobile and responsive layout behavior in dashboard views so
headers, dropdowns, and terminal controls render more cleanly.
* Updated labels and wording in theme-related UI to match the current
experience.
* Resolved a few stale dashboard tests to align with recent product
changes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 16:11:01 -07:00
gsxdsm
5c9f8b0040 test(engine): update sandbox-wiring timeout assertion for scope-aware default
echo ok is workspace-scoped, so the default verification budget is now 900s
(VERIFICATION_TIMEOUT_WORKSPACE_MS) rather than the retired flat 600s. Assert via
defaultVerificationTimeoutMs so the expectation tracks the scope-aware default.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 14:59:31 -07:00
gsxdsm
efa5d9b5f6 fix(engine): make merge/step verification timeout scope-aware
The merger and executor verification gate (shared runVerificationCommand) used
a flat 10-min default (VERIFICATION_COMMAND_TIMEOUT_MS) for any configured
test/build command, while the fn_run_verification tool already derived its
default from command scope. A workspace-scoped command (a full suite, ~10+ min)
hit the flat 10-min wall and was killed as an infra timeout; a package-scoped
command got a too-generous bound.

Derive the default from command scope to match the tool: package-scoped
(pnpm --filter/-F ...) → 300s, workspace-scoped (root command like pnpm test)
→ 900s. An explicit project verificationCommandTimeoutMs still overrides, and
the 30-min hard cap still clamps the result. Covers both the merger and the
executor per-step auto-gate, which share runVerificationCommand.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 14:43:41 -07:00
gsxdsm
b293525751 fix(dashboard): repair CSS token/contrast regressions and stale tests
Fixes ~19 deterministic dashboard test failures pre-existing on origin/main
(non-blocking full-suite lane). Mix of real product fixes and stale-test
reconciliation; no appeasement (no widened timeouts, skips, or weakened
assertions).

Product CSS fixes (real regressions the guards caught):
- Info toast contrast: shadcn-custom light theme had white-on-#0284c7 (4.10,
  below WCAG AA 4.5); enrolled it in the light-mode dark-text correction.
- 27 undefined CSS token references (typos/foreign tokens) renamed to canonical
  defined tokens; defined the genuinely-intended --border-strong and
  --right-dock-min/max-width.
- Raw rgba() box-shadow fallback tokenized to color-mix; dev-server mobile
  header split into its own responsive rule.

Stale tests reconciled with intentional product changes:
- workflowColumns graduated to always-on (board-workflows unit test).
- workflow optional-steps source re-pointed to v2 optional-group nodes.
- command-center pricing docs (one doc gap filled: openai-codex:* keying).
- SetupWizardModal added detectWorkspace + workspaceMode/taskPrefix payload.
- board-mobile listener-count assertion → unmount no-throw behavior.
- CommandCenterControls / ThemeSelector: default theme relabeled "Fusion Legacy".
- ProjectOverview / WorkflowNodeEditor: header divider intentionally removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 14:37:52 -07:00
gsxdsm
9c24440e21 chore: Tier-1 storage optimization (LFS doc images + gc) (#1768)
Follow-up to #1767. Safe, track-forward storage cleanup — **no history
rewrite, no force-push.**

## What
- Extend the Git LFS policy from GIFs to **documentation/marketing PNG
screenshots** (`docs/screenshots/**`, `demo/**`, top-level
`screenshots/**`) — 53 PNGs converted to LFS pointers.
- Ran `git gc --prune=now` locally: consolidated 7 packfiles → 1 and
pruned loose objects (**local `.git` 421M → 300M**; this is a
local-clone benefit, not a remote-history change).

## Deliberately excluded (stay as real blobs)
These are build/runtime assets — an LFS-less build env would otherwise
embed a 132-byte pointer stub and break them:
- `packages/dashboard/app/public/icons/*.png` — PWA manifest icons
(served)
- `packages/desktop/src/icons/*.png` — Electron app/tray icons
(packaged)
- `packages/dashboard/app/public/fonts/SymbolsNerdFontMono-Regular.ttf`
— `@font-face` source (served)

## Verified
- No runtime icon/font asset entered LFS (`git lfs ls-files` excludes
`icons/`, `fonts/`, `.ttf`).
- `docs-screenshot-links` test still passes — it checks path existence,
and LFS pointer files satisfy `existsSync`.

## Not in scope
The ~300MB of stale binary history (old GIF/PNG revisions) is only
reclaimable via a history rewrite (force-push + re-clone) — tracked
separately as Tier 2.

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

<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1768">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

## Summary by CodeRabbit

* **New Features**
* Workflow editing now opens in a floating window with improved drag,
sizing, and close behavior.
* Workflow switchers now pass the selected workflow into the editor, so
the chosen workflow opens directly.

* **Bug Fixes**
* Improved mobile and desktop layout behavior for the workflow editor,
including overlay sizing and scroll handling.
* Updated navigation and onboarding flows to match the latest sidebar
and empty-state behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 13:29:31 -07:00
gsxdsm
3320558a7a chore: route demo reel GIFs through Git LFS (#1767)
## What
Routes `demo/assets/*.gif` through **Git LFS** and converts the 20
existing reel GIFs to LFS pointers. Adds a Git LFS setup note to
`docs/contributing.md`.

## Why
The demo reel GIFs dominate repo size: the same captures get re-shot and
re-committed, and git keeps every old blob forever (~118 MB of GIF
history backing a ~421 MB `.git`). Routing them through LFS keeps the
binaries out of the packfile so future regenerations stop bloating
history.

## Scope / blast radius
- **Track-forward only** — existing history is left intact. No
`filter-repo` rewrite, no force-push, no re-clone required.
- This does **not** shrink the current `.git` (old blobs remain in
history); it stops the bleeding going forward.
- Contributors must have `git lfs install` configured, or the GIFs
arrive as pointer stubs — documented in `docs/contributing.md`.

## Notes
- GitHub free LFS tier is 1 GB storage + 1 GB/month bandwidth; live GIFs
are ~49 MB. Worth keeping an eye on LFS bandwidth for a trafficked
public repo.

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

<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1767">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

* **Chores**
* Added Git LFS tracking for GIFs in the demo assets folder to help keep
the repository size manageable.

* **Documentation**
* Updated contributor setup instructions with Git LFS guidance,
including installation, pulling existing large files, and how new GIFs
are handled automatically.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 13:29:15 -07:00
gsxdsm
c202053725 fix(dashboard): make embedded Planning view scroll on mobile
The global mobile fullscreen modal rule (`.modal-lg`, `.modal:not(.confirm-dialog)`)
forced the embedded Planning shell to 100dvh, overflowing its bounded `.planning-view`
pane. `overflow:hidden` then clipped the footer action buttons and blocked scrolling.
Qualify the mobile embedded override as `.planning-view.open .planning-modal--embedded`
so it outranks the global rule, and re-pin `max-height:100%` so the inner flex scroll
chain works. Adds a CSS regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 13:27:37 -07:00
gsxdsm
ad246e8bd2 FN-7001: repair dashboard changed-test expectations
Repair dashboard changed-test expectations for graduated navigation and workflow behavior.

- Update App tests to use the left-sidebar default and keep graduated Todo/Goals destinations available when stale flags are false.
- Align route tests with workflow-column graduation and live promote branches.
- Adjust dashboard test fixtures for command-center pricing settings and current spinner/viewport listener contracts.

Files changed:
 .../app/components/__tests__/App.test.tsx          | 43 +++++++++++++++++++---
 .../__tests__/PlanningModeModal.initial.test.tsx   |  6 ++-
 .../__tests__/board-mobile-initial-render.test.tsx | 12 +++++-
 .../register-command-center-routes.auth.test.ts    | 10 +++++
 .../routes/__tests__/board-workflows-route.test.ts | 19 ++++++----
 .../src/routes/__tests__/promote-route.test.ts     | 13 ++-----
 6 files changed, 77 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-7001

Fusion-Task-Lineage: 23c0b18d-6895-4a94-a77a-17c7438f477a
2026-06-25 13:27:37 -07:00
gsxdsm
6c51bd1d44 FN-6989: make workflow editor float
Make workflow editing open in the shared floating window shell.

- Replace the workflow editor modal overlay with FloatingWindow drag, resize, and geometry persistence.
- Let graph and header workflow switcher callbacks forward the selected workflow id into the editor.
- Update workflow editor sizing styles and mobile full-screen behavior for the floating shell.
- Add regression coverage for floating-window behavior, resize ownership, and workflow id forwarding.

Files changed:
 .../app/components/GraphWorkflowSwitcherSlot.tsx   |   6 +-
 .../app/components/HeaderWorkflowSwitcherSlot.tsx  |   6 +-
 .../app/components/WorkflowNodeEditor.css          |  51 +++++++--
 .../app/components/WorkflowNodeEditor.tsx          |  33 +++---
 .../__tests__/GraphWorkflowSwitcherSlot.test.tsx   |  11 ++
 .../__tests__/HeaderWorkflowSwitcherSlot.test.tsx  |  10 ++
 .../__tests__/WorkflowNodeEditor.css.test.ts       |  21 ++--
 .../__tests__/WorkflowNodeEditor.test.tsx          | 126 +++++++++++++++++----
 8 files changed, 208 insertions(+), 56 deletions(-)

Fusion-Task-Id: FN-6989

Fusion-Task-Lineage: cf762608-37d5-43be-8cbe-20fd1ae56296
2026-06-25 13:27:28 -07:00
gsxdsm
bf4a4de347 chore: route doc/demo PNG screenshots through Git LFS
Extend the LFS track-forward policy from GIFs to documentation and marketing
PNG screenshots (docs/screenshots, demo, top-level screenshots). Scoped to
doc/demo dirs only; app-runtime/build images (PWA icons, Electron tray icons,
the served Nerd Font) stay as real blobs so LFS-less build envs never embed a
pointer stub. No history rewrite / force-push. Stacks on the GIF LFS change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 13:23:17 -07:00
gsxdsm
5fe76a6c44 docs: note Git LFS setup for demo reel GIFs
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 13:21:43 -07:00
gsxdsm
e3564c2333 chore: route demo/assets GIFs through Git LFS
Track demo/assets/*.gif via Git LFS and convert the 20 existing reel GIFs
to LFS pointers. Stops binary GIF regenerations from bloating .git going
forward; existing history is left intact (no rewrite/force-push).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 13:21:43 -07:00
gsxdsm
893c1dfa27 test(dashboard): fix 30 pre-existing pnpm-test failures on main (#1765)
## What & why

`pnpm test` on `main` failed **30 tests** across 5 dashboard files. All
ran in the **non-blocking full-suite lane** (not the merge gate), so
they went unnoticed despite being deterministic. Every one is a **stale
test trailing an intentional product change** — fixes are **test-only**,
with **no product code changed** and **no appeasement** (no widened
timeouts, no `.skip`, no weakened assertions).

## Root causes & fixes

| File | Failures | Root cause | Fix |
|---|---:|---|---|
| `App.test.tsx` | 26 | Sidebar-destination tests (view switching, chat
unread, GitHub import, board branch filters) never set `leftSidebarNav:
true`; the shared `defaultSettings` keeps it `false` to preserve legacy
header-nav tests, so the sidebar never rendered. The backend-unreachable
recovery test asserted a setup wizard that **intentionally no longer
auto-opens** on zero projects (`useViewState` FNXC:Onboarding
2026-06-22-05:06) with `modelOnboardingComplete: true`. | Opt each
sidebar describe/test into `leftSidebarNav: true`; assert recovery to
the dashboard shell instead of the retired auto-wizard. |
| `board-workflows-route.test.ts` | 1 | `workflowColumns` flag
**graduated to always-on** (`isWorkflowColumnsEnabled` returns `true`;
stale persisted `false` treated as enabled) — the flag-OFF empty-shape
branch is retired. | Assert the graduation invariant (persisted `false`
→ `flagEnabled: true`). |
| `promote-route.test.ts` | 1 | Same graduation: the flag-OFF → `400`
branch is dead, so the route proceeds and 500s on the incomplete mock. |
Assert persisted `false` proceeds to the engine (no legacy 400). |
| `register-command-center-routes.auth.test.ts` | 1 |
`/command-center/tokens` now reads `modelPricingOverrides` via
`getGlobalSettingsStore()`; `MockStore` lacked it → 500. | Add the
`getGlobalSettingsStore()` stub. |
| `PlanningModeModal.initial.test.tsx` | 1 | The shared `.spin` loader
keyframe was renamed `spin` → `fusion-spinner-spin` for
collision-proofing. | Update the CSS regex to the current keyframe. |

## Verification
- All 5 files together: **161 passed / 0 failed** (`App.test.tsx`
128/128).
- ESLint on all 5 files: exit 0.
- `git diff` touches **test files only** — confirmed no product/source
file changed, and no `timeout:`/`.skip`/removed-`expect` introduced.

## Notes
- No changeset (test-only).
- Diagnosis confirmed by instrumenting `App.tsx` (reverted): after
settings load, `leftSidebarNavEnabled` flipped to `false` because the
fixture set `leftSidebarNav: false`.

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

<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1765">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

## Summary by CodeRabbit

* **Bug Fixes**
* Dashboard navigation now consistently follows the new default sidebar
layout.
* Restored dashboard recovery flow after a backend outage so the normal
shell returns cleanly when service resumes.
* Workflow-related actions and board views now behave as enabled even
when older saved settings say otherwise.


<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 13:17:35 -07:00
gsxdsm
bdd0bed4bd test(dashboard): fix 30 pre-existing pnpm-test failures on main
These deterministic failures lived in the non-blocking full-suite lane
(App.test.tsx + three API-backfill route tests + one modal test), so the
merge gate never surfaced them. All are stale tests trailing intentional
product changes — fixes are test-only; no product code and no appeasement
(no widened timeouts, no skips, no weakened assertions).

App.test.tsx (26): sidebar-destination tests (view switching, chat unread,
GitHub import, board branch filters) never opted into leftSidebarNav:true,
so with the shared defaultSettings keeping it false (to preserve legacy
header-nav tests) the sidebar never rendered. Enable leftSidebarNav per
sidebar describe/test. The backend-unreachable recovery test asserted a
setup wizard that intentionally no longer auto-opens on zero projects
(useViewState FNXC:Onboarding 2026-06-22-05:06) with modelOnboardingComplete
true — assert recovery to the dashboard shell instead.

board-workflows-route + promote-route: the workflowColumns flag graduated to
always-on (isWorkflowColumnsEnabled returns true; stale persisted false is
treated as enabled), retiring the flag-OFF 400/empty-shape branches. Update
both "flag OFF" tests to assert the graduation invariant.

register-command-center-routes.auth: the /command-center/tokens handler now
reads modelPricingOverrides via getGlobalSettingsStore(); MockStore lacked it,
yielding a 500. Add the stub.

PlanningModeModal.initial: the shared .spin loader keyframe was renamed
spin -> fusion-spinner-spin for collision-proofing; update the CSS regex.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 12:44:20 -07:00
gsxdsm
2669bb17e7 FN-6980: fix inherited workflow details
Fix task workflow details so inherited board defaults render consistently in the live Workflow tab.

- Resolve null task workflow selections through board workflow mappings or the project default for read-only detail surfaces.
- Load workflow graphs and optional steps from the effective workflow while preserving explicit selector state.
- Add coverage for default inheritance, explicit custom workflows, cleared selections, stale workflow ids, and task detail progress fixtures.

Files changed:
 .../app/components/WorkflowResultsTab.tsx          |  60 ++++++++---
 ...skDetailModal.models-progress-workflow.test.tsx |  63 +++++++++++
 .../__tests__/TaskDetailModal.test-helpers.ts      |  23 ++++
 .../__tests__/WorkflowResultsTab.test.tsx          | 118 ++++++++++++++++++++-
 4 files changed, 243 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-6980

Fusion-Task-Lineage: 2ee9ca68-4053-4d69-a4da-e2bfc22cfe43
2026-06-25 12:25:14 -07:00
gsxdsm
4880a0f857 FN-6970: fix live token usage refreshes
Keep Command Center token usage surfaces mounted and updated during live analytics polling.

- Preserve existing analytics data while background polls are in flight so token surfaces revalidate without disappearing.
- Add live refresh intervals for Overview and Tokens token-usage data.
- Cover in-place token stat, chart, and model-row updates with Command Center and area tests.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-6970-command-center-token-live.md    |   7 ++
 .../components/command-center/CommandCenter.tsx    |   4 +
 .../__tests__/CommandCenter.test.tsx               |  81 +++++++++++++--
 .../components/command-center/areas/AreaShell.tsx  |   3 +
 .../components/command-center/areas/TokensArea.tsx |   4 +
 .../command-center/areas/__tests__/areas.test.tsx  | 111 +++++++++++++++++++--
 .../command-center/areas/useAnalyticsArea.ts       |  12 ++-
 7 files changed, 208 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-6970

Fusion-Task-Lineage: 670bb5ac-bc7d-47d8-abed-ef6748292cc6
2026-06-25 12:25:14 -07:00
gsxdsm
419d58f65c FN-6974: fix tablet planning summary action wrapping
Prevent Planning Mode summary footer buttons from overlapping in tablet-width panes.

- Add tablet-specific wrapping rules for Planning Mode summary actions.
- Keep the action groups width-constrained so buttons wrap within the details pane.
- Add a CSS regression test and patch changeset for the published CLI bundle.

Files changed:
 .changeset/fn-6974-planning-tablet-actions.md      |  7 +++
 .../dashboard/app/components/PlanningModeModal.css | 29 ++++++++++++
 .../__tests__/PlanningModeModal.css.test.ts        | 52 ++++++++++++++++++++++
 3 files changed, 88 insertions(+)

Fusion-Task-Id: FN-6974

Fusion-Task-Lineage: 25d63165-38a2-47fd-8d81-9eec24b3fb6f
2026-06-25 12:25:14 -07:00
gsxdsm
4cc9c2f3f1 FN-6972: add browser-native file previews
Files modal now renders common media and PDF files with browser-native previews while preserving editor flows for text and unknown binaries.

- Add shared extension-based preview classification for images, videos, audio, and PDFs.
- Render preview-only files from workspace-safe download URLs and skip binary editor loading/saving actions for those selections.
- Update preview styling, localized labels, documentation, tests, and release notes.

Files changed:
 .changeset/fn-6972-browser-file-previews.md        |   7 +
 docs/dashboard-guide.md                            |   1 +
 packages/dashboard/app/components/FileBrowser.css  |  39 ++-
 .../dashboard/app/components/FileBrowserModal.tsx  | 107 +++++---
 .../components/__tests__/FileBrowserModal.test.tsx | 302 ++++++++++-----------
 .../app/utils/__tests__/file-preview-kind.test.ts  |  40 +++
 packages/dashboard/app/utils/file-preview-kind.ts  |  70 +++++
 packages/i18n/locales/en/app.json                  |   4 +-
 packages/i18n/locales/es/app.json                  |   4 +-
 packages/i18n/locales/fr/app.json                  |   4 +-
 packages/i18n/locales/ko/app.json                  |   4 +-
 packages/i18n/locales/zh-CN/app.json               |   4 +-
 packages/i18n/locales/zh-TW/app.json               |   4 +-
 13 files changed, 381 insertions(+), 209 deletions(-)

Fusion-Task-Id: FN-6972

Fusion-Task-Lineage: 04b07def-e490-43f7-8b92-39ca704b20b6
2026-06-25 12:25:13 -07:00
gsxdsm
0049fb99d4 FN-6964: Close task details before browser Back navigation
Dashboard Back navigation now dismisses task detail surfaces before leaving the current context.

- Add full-panel task-detail history entries that restore board/list state or the previous nested detail.
- Route modal task-detail Back handling through the same close path as explicit dismissal so deep-link cleanup runs.
- Cover board-opened, nested, and modal popstate flows and document the Back behavior.
- Add a patch changeset for the published Fusion dashboard behavior.

Files changed:
 .changeset/fn-6964-dashboard-back-navigation.md    |  7 ++
 docs/dashboard-guide.md                            |  3 +-
 packages/dashboard/app/App.tsx                     | 50 ++++++++++--
 packages/dashboard/app/components/AppModals.tsx    | 31 ++++++--
 .../app/components/__tests__/App.test.tsx          | 90 ++++++++++++++++++++++
 .../app/components/__tests__/AppModals.test.tsx    |  5 +-
 .../app/components/dashboard/MainContent.tsx       |  6 +-
 .../dashboard/app/components/dashboard/types.ts    |  1 -
 8 files changed, 173 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-6964

Fusion-Task-Lineage: 2308b603-a6ac-4978-9a6a-a6028b9bc38c
2026-06-25 12:25:13 -07:00
gsxdsm
b891f8f601 FN-6709: document schema version test expectation
Document why the goals schema-version test follows the exported schema constant.

- Add an FNXC note explaining that fresh database version assertions should track SCHEMA_VERSION.
- Preserve the dynamic schema-version expectation so migration bumps do not leave stale literals behind.

Files changed:
 packages/core/src/__tests__/goals-schema.test.ts | 4 ++++
 1 file changed, 4 insertions(+)

Fusion-Task-Id: FN-6709

Fusion-Task-Lineage: 05abc460-0816-4f31-a83c-fb0d3ae427e1
2026-06-25 12:25:13 -07:00
gsxdsm
575e211b04 FN-6977: harden Planning Mode payload normalization
Normalize Planning Mode runtime payloads so malformed AI summaries cannot crash UI or API flows.

- Normalize summary, question option, subtask dependency, and priority fields at planning session boundaries.
- Reuse summary normalization for persisted session reads, task creation, and planning breakdown generation.
- Add regression coverage for malformed planning arrays and publish a patch changeset.

Files changed:
 .changeset/fn-6977-planning-array-normalization.md |   7 +
 .../dashboard/app/components/PlanningModeModal.tsx | 135 +++++++++---
 .../PlanningModeModal.planning-flow.test.tsx       | 231 +++++++++++++++++++++
 .../src/__tests__/routes-planning.test.ts          | 124 ++++++++++-
 packages/dashboard/src/planning.ts                 |  88 +++++++-
 packages/dashboard/src/routes.ts                   |  16 +-
 .../src/routes/register-planning-subtask-routes.ts |  43 +---
 7 files changed, 569 insertions(+), 75 deletions(-)

Fusion-Task-Id: FN-6977
Fusion-Task-Lineage: 538907b8-1037-4c12-9237-c73830621b73
2026-06-25 12:25:13 -07:00
gsxdsm
04f0b31ee3 fix(engine): use fork pool for engine-core Vitest gate (#1764)
## Summary
- Switches the engine-core Vitest project from thread workers to fork
workers to avoid the Node 24/macOS libuv kqueue SIGABRT while preserving
real failure semantics.
- Adds a small policy regression test covering the gate pool, warning
behavior, and engine-core allow-list expectations.

## Test Plan
- node --test scripts/__tests__/engine-vitest-gate-policy.test.mjs
- corepack pnpm --filter @fusion/engine test:core

<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1764">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

* **Bug Fixes**
* Improved reliability of the engine’s Vitest test execution on newer
macOS/Node setups by scoping a safer worker strategy to the core
merge-gate suite.
* Prevented configuration and gate-script changes that could otherwise
break consistent test behavior.
* **Tests**
* Added automated “gate policy” checks to validate Vitest configuration
constraints and ensure core/test-gate scripts run with the expected
command and allow-listed test patterns.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 12:23:53 -07:00
gsxdsm
ff9bbaec7b fix(core): export package metadata (#1761)
## Summary
- Exposes @fusion/core/package.json through package exports so agent
inspection/self-diagnostics that resolve package metadata do not crash
under Node package exports enforcement.

## Test Plan
- corepack pnpm --filter @fusion/core exec node - <<'NODE'
const { createRequire } = require('node:module');
const req = createRequire(process.cwd() + '/packages/cli/dist/bin.js');
const pkg = req('@fusion/core/package.json');
if (pkg.name !== '@fusion/core') throw new Error('unexpected package
name');
console.log(pkg.name, pkg.version);
NODE
- corepack pnpm --filter @fusion/core build

<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1761">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

## Summary by CodeRabbit

* **Chores**
* Added a new package subpath export for `package.json`, improving
compatibility for tools and integrations that need to read package
metadata directly.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 11:22:08 -07:00
Phil Larson
b62b4b0e30 fix(FN-798): scope engine vitest fork pool
Fusion-Task-Id: FN-798
2026-06-25 11:21:46 -07:00
gsxdsm
425a94e6f4 test: speed up slow dashboard test suites (#1763)
## What & why

Cuts feedback-loop wall-time on the slowest dashboard test files
(FN-5048 velocity). Profiled the velocity baseline's top offenders; all
changes are **behavior-preserving** — no assertions, timeouts, or
worker/concurrency knobs changed.

## Changes

| File | Root cause | Fix | Result (verified locally) |
|---|---|---|---|
| `SettingsModal.test.tsx` (#1, ~60.5s) | 231 tests in one sequential
worker; flat ~250ms/test | Split into 4 sibling files sharing
`SettingsModal.test-harness.tsx`; the settings project parallelizes them
across workers | shard **60.5s → ~25s** (−58%) |
| `insights-routes.test.ts` (#2, ~26.5s) | Double `TaskStore.init()` per
test; only 1 of 24 tests needs the project-b store | Lazy-init `storeB`
on first use | tests **5.78s → 3.66s** (−37%) |
| `evals-routes.test.ts` | Same double-init pattern | Same lazy `storeB`
| tests ~0.98s |

### SettingsModal split mechanics
- Test bodies moved **verbatim** — static `it()` count preserved at
**231**.
- `vi.mock` factories stay in each test file (they only apply per
module) and reference the ~61 mock fns imported from the harness.
- Shared `beforeEach`/`afterEach` registered via the harness's exported
`installSettingsModalEnv()`.
- `vitest.config.ts`: `qualityAppSettingsOnlyTests` now points at the 4
new files; bare `"SettingsModal"` dropped from
`qualityAppComponentTests`/`isolatedQualityAppComponentTests`.

## Verification
- All 4 split files green; independent run: **518 passed / 0 failed** (4
files × 2 project collections × 259 assertions). Original profile = 259
assertions / 231 `it()`s — matches.
- ESLint exit 0 on all new/changed files; `check-test-inventory
--dashboard-curated` passed.
- `insights-routes` 24/24 and `evals-routes` 7/7 pass.

## Notes
- No changeset (test-only + CI config, behavior-preserving — per
AGENTS.md).
- Stale references to the old filename remain only in generated
snapshots (`test-timings.json`, `line-count-baseline.json`,
`test-velocity-history.json`); they refresh on the next `pnpm
test:velocity` run.

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

<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1763">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

* **Tests**
* Expanded dashboard settings coverage with focused suites for General,
Authentication, Scheduling/Merge, and Remote/Notifications.
* Added a shared SettingsModal test harness to centralize rendering,
readiness, and persistence assertions, improving reliability and
maintainability.
* Updated Evals/Insights route tests to lazily initialize and clean up
project-scoped task storage.
* Adjusted Vitest configuration to isolate the new SettingsModal shards
and prevent duplicate execution, keeping test runs faster and cleaner.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 11:20:48 -07:00
gsxdsm
a1e7602c1f Address PR review feedback (#1763)
- Exclude the 4 SettingsModal split files from the app backfill project
  (greptile P1): the split dropped the bare "SettingsModal" entry from
  qualityAppComponentTests, which had excluded the curated file from
  backfill; without spreading qualityAppSettingsOnlyTests into
  backfillAppExclude the split files matched the backfill `app/**` glob
  and ran in two projects, doubling their wall-time. Now collected by
  exactly one project (dashboard-app-quality-settings).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 11:03:35 -07:00
Phil Larson
fa8e9fa817 fix(FN-798): stabilize engine vitest gate pool
Fusion-Task-Id: FN-798

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-06-25 10:56:43 -07:00
gsxdsm
003740d018 test: speed up slow dashboard test suites
Reduce feedback-loop wall-time on the slowest dashboard test files
(FN-5048 velocity), behavior-preserving — no assertions, timeouts, or
worker counts changed.

- SettingsModal.test.tsx (231 tests, ~60.5s in one sequential worker)
  split into 4 sibling files sharing SettingsModal.test-harness.tsx so
  the settings project parallelizes them across workers (~60.5s -> ~25s
  wall). Test bodies moved verbatim; static it() count preserved at 231.
  vi.mock factories stay per-file and reference the harness-exported
  mock fns; shared beforeEach/afterEach via installSettingsModalEnv().
- insights-routes.test.ts: lazily init the project-b store (only 1 of 24
  tests needs it) instead of a second TaskStore.init() per test
  (tests 5.78s -> 3.66s).
- evals-routes.test.ts: same lazy storeB pattern.
- vitest.config.ts: point the settings-only project at the 4 new files;
  drop the bare "SettingsModal" entry from the component shards.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 10:50:50 -07:00
Phil Larson
c808ca8b9f fix(core): export package metadata 2026-06-25 10:50:26 -07:00
gsxdsm
9a46b7a27f fix(i18n): fill missing translations for dashboard and workflow keys (#1760)
## Summary

Fill in proper translations for three i18n keys that were added as empty
strings to all non-English locales. Also adds the `{{mergingSuffix}}`
interpolation to `workflowSwitcher.countsAria` to match the English
catalog.

## Changes

Keys fixed across zh-CN, zh-TW, fr, es, ko:

| Key | Change |
|-----|--------|
| `dashboard.title` | Empty string -> proper translation |
| `workflowSwitcher.merging` | Empty string -> proper translation |
| `workflowSwitcher.mergingTitle` | Empty string -> proper translation |
| `workflowSwitcher.countsAria` | Added missing `{{mergingSuffix}}`
interpolation |

## Verification

- `pnpm --filter @fusion/i18n vitest run src/__tests__/parity.test.ts
src/__tests__/i18n-gate-coverage.test.ts` passes (7/7 tests)


<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1760">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

## Summary by CodeRabbit

* **New Features**
* Added localized dashboard titles for Spanish, French, Korean,
Simplified Chinese, and Traditional Chinese.
* Added/updated workflow switcher text for the merging state, including
clearer task-count messaging and new labels in the same languages.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 09:50:32 -07:00
gsxdsm
17614b1dba fix(i18n): fill in missing translations for new dashboard/workflow keys
Three keys (dashboard.title, workflowSwitcher.merging,
workflowSwitcher.mergingTitle) were added as empty strings to all
non-en locales. Fill in proper translations and add the
{{mergingSuffix}} interpolation to workflowSwitcher.countsAria to
match the English catalog.

Locales updated: zh-CN, zh-TW, fr, es, ko
2026-06-25 09:46:55 -07:00
gsxdsm
e46ea00ff5 FN-6827: add engine status banner
Add project-scoped engine connectivity remediation to the dashboard.

- Add engine status/start API helpers and server routes that can resume paused projects or start missing engines.
- Render a project banner with dashboard-only guidance, polling, disabled starting state, localized copy, and focused tests.
- Document the engine status banner behavior and add a changeset for the published CLI package.

Files changed:
 .changeset/fn-6827-engine-disconnected-banner.md   |   7 +
 docs/dashboard-guide.md                            |   8 +
 packages/dashboard/app/api/legacy.ts               |  20 +++
 .../app/components/EngineStatusBanner.css          |  87 +++++++++++
 .../app/components/EngineStatusBanner.tsx          |  62 ++++++++
 .../__tests__/EngineStatusBanner.test.tsx          | 145 +++++++++++++++++
 .../app/components/dashboard/DashboardBanners.tsx  |   3 +
 .../app/hooks/__tests__/useEngineStatus.test.ts    | 171 +++++++++++++++++++++
 packages/dashboard/app/hooks/useEngineStatus.ts    | 111 +++++++++++++
 packages/dashboard/src/__tests__/server.test.ts    | 129 ++++++++++++++++
 packages/dashboard/src/server.ts                   |  89 +++++++++++
 packages/i18n/locales/en/app.json                  |  10 ++
 packages/i18n/locales/es/app.json                  |  10 ++
 packages/i18n/locales/fr/app.json                  |  10 ++
 packages/i18n/locales/ko/app.json                  |  10 ++
 packages/i18n/locales/zh-CN/app.json               |  10 ++
 packages/i18n/locales/zh-TW/app.json               |  10 ++
 17 files changed, 892 insertions(+)

Fusion-Task-Id: FN-6827

Fusion-Task-Lineage: 56821ca3-04c8-4674-9400-3639f10e463d
2026-06-25 08:35:44 -07:00
gsxdsm
6df4043059 FN-6942: preserve mission workflow selection
Missions now carries the selected header workflow through feature and slice triage so created tasks land in the intended lane.

- Add a reusable header workflow switcher slot and share it between Planning and Missions.
- Thread the selected workflow through mission triage UI, API client calls, routes, and MissionStore task creation.
- Cover mission workflow triage behavior with core, dashboard UI, and route tests.
- Document Missions workflow behavior and add a patch changeset.

Files changed:
 .changeset/fn-6942-mission-workflow-selection.md   |   7 +
 docs/dashboard-guide.md                            |  11 ++
 packages/core/src/__tests__/mission-store.test.ts  | 114 ++++++++++++
 packages/core/src/mission-store.ts                 |   8 +
 packages/dashboard/app/api/legacy.ts               |  10 +-
 .../app/components/HeaderWorkflowSwitcherSlot.tsx  |  99 +++++++++++
 .../dashboard/app/components/MissionManager.tsx    |  23 ++-
 .../components/PlanningWorkflowSwitcherSlot.tsx    |  81 +--------
 .../__tests__/HeaderWorkflowSwitcherSlot.test.tsx  | 124 +++++++++++++
 .../MissionManager.workflow-triage.test.tsx        | 191 +++++++++++++++++++++
 .../app/components/dashboard/MainContent.tsx       |  15 +-
 packages/dashboard/src/mission-routes.ts           |  21 ++-
 .../mission-workflow-triage-route.test.ts          | 149 ++++++++++++++++
 13 files changed, 765 insertions(+), 88 deletions(-)

Fusion-Task-Id: FN-6942

Fusion-Task-Lineage: 53d7b2ea-01cc-4eb6-bdda-988fb684602c
2026-06-25 08:35:44 -07:00
gsxdsm
9fabc9d750 FN-6962: ignore hidden overlap paths by default
Hidden dot paths no longer create file-overlap blockers unless operators opt back into legacy behavior.

- Add the ignoreHiddenOverlapPaths project setting, schema default, API sanitization, and Settings UI toggle.
- Filter hidden dot segments from scheduler, gridlock, and self-healing overlap checks by default while preserving explicit ignore paths.
- Cover default and opt-out behavior across core parity, dashboard settings routes, scheduler, gridlock, and self-healing tests.
- Document the setting and add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-6962-hidden-overlap-paths.md         |   7 ++
 docs/settings-reference.md                         |   1 +
 .../core/src/__tests__/settings-parity.test.ts     |   7 ++
 packages/core/src/settings-schema.ts               |   1 +
 packages/core/src/types.ts                         |   7 ++
 .../dashboard/app/components/SettingsModal.tsx     |   4 +-
 .../components/__tests__/SettingsModal.test.tsx    |  69 ++++++++++++++
 .../settings/sections/SchedulingSection.tsx        |  10 ++
 .../src/__tests__/routes-settings.test.ts          |  30 ++++++
 packages/dashboard/src/routes.ts                   |   9 ++
 .../src/routes/register-settings-memory-routes.ts  |   6 +-
 .../engine/src/__tests__/gridlock-detector.test.ts |  32 +++++++
 .../__tests__/scheduler-overlap-starvation.test.ts | 102 ++++++++++++++++++++-
 packages/engine/src/__tests__/self-healing.test.ts |  24 +++++
 packages/engine/src/gridlock-detector.ts           |   5 +-
 packages/engine/src/scheduler.ts                   |  40 +++++---
 packages/engine/src/self-healing.ts                |   2 +-
 packages/i18n/locales/en/app.json                  |   2 +
 packages/i18n/locales/es/app.json                  |  11 ++-
 packages/i18n/locales/fr/app.json                  |  11 ++-
 packages/i18n/locales/ko/app.json                  |  11 ++-
 packages/i18n/locales/zh-CN/app.json               |  11 ++-
 packages/i18n/locales/zh-TW/app.json               |  11 ++-
 packages/i18n/src/resources.d.ts                   |   2 +
 24 files changed, 379 insertions(+), 36 deletions(-)

Fusion-Task-Id: FN-6962
Fusion-Task-Lineage: c79120d3-fd9e-439d-b2cf-439f9e2e6952
2026-06-25 08:35:44 -07:00
gsxdsm
93fdc073e3 FN-7004: expect merge abort errors in dependency install test
Align the dependency-install abort regression test with the merge layer's canonical abort error.

- Update the dependency-sync abort expectation from AbortError to MergeAbortedError.
- Document why landOneRepo normalizes inner AbortError values through throwIfAborted.

Files changed:
 .../engine/src/__tests__/merger-ai-dependency-install.slow.test.ts  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7004

Fusion-Task-Lineage: 7b8a515a-cbbf-4e57-91cd-05a9a1001fd5
2026-06-25 08:35:44 -07:00
gsxdsm
ae98ec37a6 FN-7005: close cached plugin store with TaskStore
TaskStore shutdown now tears down its cached plugin store to avoid leaking plugin database handles.

- Dispose the cached PluginStore during TaskStore.close(), clear the cache, and remove listeners before closing.
- Keep close idempotent when no plugin store was created or after a prior teardown.
- Add regression coverage for direct TaskStore.close() and disk-backed harness reopen lifecycle.

Files changed:
 .../src/__tests__/store-plugin-store-close.test.ts | 63 ++++++++++++++++++++++
 packages/core/src/store.ts                         | 15 ++++++
 2 files changed, 78 insertions(+)

Fusion-Task-Id: FN-7005
Fusion-Task-Lineage: fe2242d8-7004-4d29-904d-58ee77861d99
2026-06-25 08:35:44 -07:00
gsxdsm
e42e17023a FN-7003: stabilize core test fixture state
Stabilize @fusion/core tests by resetting stale plugin-store database handles and aligning fixture assertions.

- Add a PluginStore close method that disposes local and central database connections.
- Reset the lazy plugin store before the shared test harness clears global settings storage.
- Cover plugin-store reopening from the built-in workflow harness.
- Assert the runtime FN task-prefix fallback without requiring serialized defaults.

Files changed:
 packages/core/src/__tests__/builtin-workflows.test.ts |  6 ++++++
 packages/core/src/__tests__/store-test-helpers.ts     |  8 ++++++++
 packages/core/src/__tests__/test-project.test.ts      |  8 +++++++-
 packages/core/src/plugin-store.ts                     | 12 ++++++++++++
 4 files changed, 33 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7003

Fusion-Task-Lineage: ec4d6e45-61ea-4e6a-b296-3af3acf7ba4b
2026-06-25 08:35:44 -07:00
gsxdsm
9e3bb85b19 FN-6986: align task chat tool-call status expectations
Align TaskChatTab tests with lowercase tool-call status labels.

- Update result tool-call assertion to expect lowercase status text.
- Update error tool-call assertion to expect lowercase status text.

Files changed:
 packages/dashboard/app/components/__tests__/TaskChatTab.test.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-6986

Fusion-Task-Lineage: 1eb16aa3-9747-45d0-a18b-067c47892f1c
2026-06-25 08:34:44 -07:00
gsxdsm
0744ab3814 FN-6961: restore dashboard spinner animations
Restore Fusion dashboard loading indicators by preventing spinner keyframe collisions.

- Move shared spinner utilities onto the collision-proof fusion-spinner-spin keyframe.
- Rename component-local spin keyframes and scoped spinner utility overrides so lazy CSS chunks cannot override global loaders.
- Extend spinner CSS contract coverage across shared utilities, CSS-only loaders, and renamed loading affordances.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-6961-spinner-animation.md            |   7 +
 .../app/__tests__/spinner-animation.css.test.ts    | 149 +++++++++++++++++----
 .../dashboard/app/components/AgentMentionPopup.css |   6 -
 .../app/components/CustomProvidersSection.css      |   2 +-
 .../app/components/CustomProvidersSection.tsx      |   6 +-
 .../dashboard/app/components/FileMentionPopup.css  |   8 +-
 .../dashboard/app/components/GitHubImportModal.css |   2 +-
 packages/dashboard/app/components/Header.css       |   4 +-
 .../dashboard/app/components/IssueMentionPopup.css |   8 +-
 packages/dashboard/app/components/NodesView.css    |   8 +-
 packages/dashboard/app/components/ScriptsModal.css |   8 +-
 packages/dashboard/app/components/TaskCard.css     |  15 ++-
 .../dashboard/app/components/TaskDetailModal.css   |   4 +-
 .../dashboard/app/components/TerminalModal.css     |   6 -
 packages/dashboard/app/components/TodoView.css     |   4 +-
 .../app/components/WorkflowResultsTab.css          |   4 +-
 packages/dashboard/app/styles.css                  |  13 +-
 17 files changed, 178 insertions(+), 76 deletions(-)

Fusion-Task-Id: FN-6961

Fusion-Task-Lineage: 464e0a50-52c3-4b89-ac72-2f0227d97ce2
2026-06-25 08:34:44 -07:00
gsxdsm
d984fce0ad FN-6984: fix mission draft discard scoping
Fix mission interview draft discard so the Missions view can remove the intended draft without crossing project or tab ownership boundaries.

- Send the current session tab id when discarding drafts from MissionManager.
- Scope backend discard handling to mission-interview rows in the requested project.
- Cover desktop, mobile, stale, locked, project-scoped, and owning-tab discard cases.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-6984-mission-draft-discard.md        |   7 ++
 .../dashboard/app/components/MissionManager.tsx    |   8 +-
 .../MissionManager.delete-confirm.test.tsx         | 137 +++++++++++++++++++++
 .../mission-interview-drafts-routes.test.ts        |  46 +++++++
 packages/dashboard/src/mission-interview.ts        |  28 ++++-
 packages/dashboard/src/mission-routes.ts           |   5 +-
 6 files changed, 223 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-6984

Fusion-Task-Lineage: dff01077-6e37-4ff9-9e5e-7eb24f0e010a
2026-06-25 08:34:44 -07:00
gsxdsm
f5e1b966ab FN-6943: add worktree file copy settings
Add configurable file-copy seeding for new task worktrees.

- Add the worktreeCopyFiles setting to project settings, schema validation, and dashboard settings UI.
- Copy selected files into acquired worktrees after checkout and record audit events for copied/skipped files.
- Document the new Worktrees setting and cover it with core, dashboard, and engine tests.

Files changed:
 .changeset/fn-6943-worktree-copy-files.md          |   7 +
 docs/dashboard-guide.md                            |   4 +
 docs/settings-reference.md                         |   1 +
 packages/core/src/__tests__/store-settings.test.ts |  24 ++++
 packages/core/src/settings-schema.ts               |   5 +
 packages/core/src/types.ts                         |   7 +
 .../app/__tests__/settings-sections.test.tsx       |  66 +++++++++
 .../dashboard/app/components/SettingsModal.tsx     | 146 ++++++++++++++++++++
 .../components/__tests__/SettingsModal.test.tsx    |  91 +++++++++++++
 .../settings/sections/WorktreesSection.tsx         |  51 ++++++-
 .../src/__tests__/worktree-acquisition.test.ts     |  69 +++++++++-
 .../src/__tests__/worktree-copy-files.test.ts      | 112 ++++++++++++++++
 packages/engine/src/run-audit.ts                   |   6 +
 packages/engine/src/worktree-acquisition.ts        |  32 ++++-
 packages/engine/src/worktree-copy-files.ts         | 147 +++++++++++++++++++++
 15 files changed, 765 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-6943

Fusion-Task-Lineage: fd1ded06-25f9-4496-8f50-6416446d2f29
2026-06-25 08:34:44 -07:00
gsxdsm
0c53f46afb FN-6983: remove branch reattachment warning
Remove the stale branch reattachment affordance from Task Detail while preserving self-healing as the recovery path.

- Remove unused rebind banner styles and mobile action-shell rules.
- Drop stale recoverBranchBinding mocks from TaskDetailModal tests.
- Add rendering coverage proving Task Detail and embedded content do not show reattachment affordances across missing, populated, workspace, and mobile branch states.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-6983-task-detail-rebind-warning.md   |  7 ++
 .../dashboard/app/components/TaskDetailModal.css   | 42 +-----------
 .../TaskDetailModal.create-pr-e2e.test.tsx         |  1 -
 .../TaskDetailModal.create-pr-integration.test.tsx |  1 -
 .../__tests__/TaskDetailModal.rendering.test.tsx   | 80 ++++++++++++++++++++++
 .../__tests__/TaskDetailModal.test-helpers.ts      |  1 -
 6 files changed, 88 insertions(+), 44 deletions(-)

Fusion-Task-Id: FN-6983

Fusion-Task-Lineage: 1a45c38e-f7d0-4df7-94cf-7d1309758e0d
2026-06-25 08:34:44 -07:00
gsxdsm
2d2dd50f32 FN-6998: fix mobile mission detail back navigation
Ensure mobile Missions exits detail tabs back to the mission list before outer navigation.

- Track mobile detail visibility instead of selected mission IDs when adding navigation entries.
- Avoid duplicate history entries for Structure/Activity tab switches and mission refreshes.
- Cover browser back and visible Back button behavior across mobile tabs while desktop stays unchanged.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-6998-mobile-mission-back.md          |   7 ++
 .../dashboard/app/components/MissionManager.tsx    |  35 +++++--
 .../__tests__/MissionManager.swipe-back.test.tsx   | 114 ++++++++++++++++++---
 3 files changed, 131 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-6998

Fusion-Task-Lineage: d3dbf3b7-0195-498f-a57f-ed83c6a422e7
2026-06-25 08:34:44 -07:00
gsxdsm
d08e8db2c3 FN-6932: repair dashboard copy assertions
Repair dashboard copy and keep changed-only assertions aligned with current navigation behavior.

- Restore TaskChat tool-call pluralization and inline result/error casing.
- Replace JSX entity defaults in Settings helper copy with literal apostrophes.
- Refresh dashboard tests for embedded navigation destinations and theme option parity.
- Add a patch changeset for the dashboard copy repairs.

Files changed:
 .changeset/fn-6932-dashboard-copy-repairs.md       |  7 ++
 packages/dashboard/app/components/TaskChatTab.tsx  | 27 ++++++-
 .../app/components/__tests__/App.test.tsx          | 94 +++++++++++++++++-----
 .../components/__tests__/ThemeSelector.test.tsx    |  7 +-
 .../settings/sections/GlobalGeneralSection.tsx     |  2 +-
 .../components/settings/sections/MergeSection.tsx  | 12 +--
 .../settings/sections/SchedulingSection.tsx        |  2 +-
 .../settings/sections/WorktreesSection.tsx         |  4 +-
 8 files changed, 119 insertions(+), 36 deletions(-)

Fusion-Task-Id: FN-6932

Fusion-Task-Lineage: 262f40e3-5a04-49c7-b2d4-8122d88ac488
2026-06-25 08:34:43 -07:00
gsxdsm
ef6e4599b1 FN-6985: pack embedded automations panes
Keep the embedded Automations pane list and detail content top-packed instead of spreading vertically.

- Add grid row and alignment rules so narrow embedded Automations content stays content-sized.\n- Cover populated embedded list/detail rendering and CSS contracts for mobile and wide layouts.\n- Add a patch changeset for the published Fusion package.\n\nFiles changed:\n .changeset/fn-6985-automations-spacing.md          |  7 +++\n packages/dashboard/app/components/ScriptsModal.css | 14 +++++-\n .../__tests__/ScheduledTasksModal.test.tsx         | 52 ++++++++++++++++++++++\n 3 files changed, 72 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-6985

Fusion-Task-Lineage: ba2b117a-4dc5-4bc9-9ecb-7bc008cd79cd
2026-06-25 08:34:43 -07:00
gsxdsm
f1b3bd8854 FN-6978: fix Planning Mode liveness watchdog
Replace the fixed Planning Mode generation wall-clock cap with progress-aware liveness handling.\n\n- Refresh the generation watchdog when meaningful thinking or text output advances.\n- Abort repeated identical output as a deterministic loop while preserving user-stop errors.\n- Cover inactivity, progress refresh, loop detection, displaced generations, and manual stop behavior.\n- Add a patch changeset for the Planning Mode liveness fix.\n\nFiles changed:\n .changeset/fn-6978-planning-liveness.md            |   7 +\n .../src/__tests__/session-error-recovery.test.ts   | 193 ++++++++++++++++++++-\n packages/dashboard/src/planning.ts                 |  99 +++++++++--\n 3 files changed, 281 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-6978

Fusion-Task-Lineage: cf23956e-db79-47ac-a10b-657538aa5440
2026-06-25 08:34:43 -07:00