Commit Graph

8750 Commits

Author SHA1 Message Date
gsxdsm
d2ea10445e Merge: fix iOS chat keyboard collapse via overflow-only viewport lock
Replace the position:fixed body pin for the inline chat composer with an
overflow-only viewport lock so iOS no longer blurs the focused textarea
when the keyboard opens. Modals keep the position:fixed lock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 09:03:53 -07:00
gsxdsm
70655195f2 fix: stop iOS chat keyboard collapse from position:fixed scroll lock
The mobile chat keyboard collapsed the instant it opened on iOS because
the keyboard scroll-lock pinned body to position:fixed a beat after the
composer was already focused — pinning an ancestor to position:fixed
after focus blurs the input on iOS Safari (no visible jump, since the
dashboard base layout is already at scrollY 0).

Add useMobileKeyboardViewportLock: an overflow-only viewport lock
(overflow:hidden on html/body + scrollTo(0,0)) that does NOT touch
position, mirroring the working Quick Chat panel. App-level and ChatView
keyboard pins use it now; modals keep the position:fixed lock unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 09:03:40 -07:00
gsxdsm
75719d015c Merge: fix iOS mobile chat keyboard collapse and Quick Chat FAB open
Keep the iOS soft keyboard up in the main chat composer (drive the
.chat-thread drift transform in JS only on real viewport offset, so a
transformed ancestor never blurs the focused textarea) and make the
Quick Chat FAB open on iPhone (toggle on pointerup since setPointerCapture
suppresses the synthetic click on WebKit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 08:46:59 -07:00
gsxdsm
cbc315772e fix: keep iOS mobile chat keyboard up and reopen Quick Chat FAB
Two iOS Safari-specific fixes for mobile chat:

- ChatView: the main chat keyboard collapsed the instant it opened
  because .chat-thread--keyboard-active declared transform/will-change in
  CSS, keeping a non-none transform on an ancestor of the focused
  composer textarea. iOS blurs a focused input when an ancestor
  establishes a transform containing block. Drive the drift transform in
  JS only when iOS actually shifts the viewport (offsetTop > 0); the
  ancestor stays transform:none on focus so the keyboard stays up.

- QuickChatFAB: the FAB never opened on iPhone because the drag hook
  calls setPointerCapture() in pointerdown, which makes WebKit swallow
  the synthetic click. Fire the open/close toggle from the drag hook's
  pointerup on a tap (a real gesture, so stealth-input focus still raises
  the keyboard); keep onClick for mouse/tests with a timer-cleared dedupe.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 08:45:27 -07:00
gsxdsm
ab040885fb fix: stop iOS chat keyboard collapse by removing destructive resync
The mobile chat keyboard would not reliably stay up on iOS. The cause was
the visibilitychange/pageshow 'resync' effect in ChatView: it only ever
ran while the composer was already focused (its activeElement guard), and
on iOS a programmatic focus() fired from setTimeout has no user-gesture
context, so it could not re-raise the keyboard after the blur(). Every
spurious iOS visibilitychange (Control Center, notification banners, app
switches) therefore dismissed the keyboard mid-session and never restored
it.

Remove the blur()+focus() resync. The visualViewport half-state it
targeted is already handled by useMobileKeyboard, which re-snapshots vv
metrics on visibilitychange/pageshow via its settle tail + rAF stability
poll without ever touching textarea focus.
2026-06-12 08:03:33 -07:00
gsxdsm
df2a0a1b5d fix: keep mobile chat keyboard up by gating iOS-only resync
The mobile resync effect did an unconditional textarea blur()+focus() on
every visibilitychange/pageshow across all platforms. On Android,
focus() after blur() cannot re-raise the soft keyboard, so spurious
visibilitychange events (including those fired mid-keyboard-transition)
collapsed the keyboard. Gate the resync to iOS only (its documented
purpose) and only run it when the document is actually becoming visible.
2026-06-12 08:00:48 -07:00
gsxdsm
4c587d6a80 FN-6285: replace CE cancel buttons with trash icons
Update Compound Engineering cancellation controls to use compact icon-only affordances while preserving accessible labels.

- Render session-list and flow cancel actions as red trash-can icon buttons.
- Add hover, focus, disabled, and inline layout styling for the compact cancel controls.
- Update README wording and tests to assert icon-only accessible cancel buttons.

Files changed:
 .../fusion-plugin-compound-engineering/README.md   |  2 +-
 .../src/dashboard/CeFlow.tsx                       |  7 +++-
 .../src/dashboard/CompoundEngineeringView.css      | 46 ++++++++++++++++++++--
 .../src/dashboard/CompoundEngineeringView.tsx      |  6 ++-
 .../src/dashboard/__tests__/CeFlow.test.tsx        |  8 +++-
 .../__tests__/CompoundEngineeringView.test.tsx     |  9 ++++-
 6 files changed, 68 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-6285

Fusion-Task-Lineage: 307d96e0-a234-4a3b-a13f-98342374eb38
2026-06-12 07:52:04 -07:00
gsxdsm
7ffea9f4a6 FN-6290: expose Google Generative AI custom providers
Expose Google Generative AI as a selectable custom-provider API type across settings UI and docs.

- Add Google Generative AI options to custom-provider add and edit dropdowns.
- Cover add, edit, and existing Google-provider selection behavior with dashboard tests.
- Document the supported API type and add localized provider labels.
- Add a changeset for the published Fusion package.

Files changed:
 .changeset/fn-6290-expose-google-generative-ai.md  |  5 ++
 docs/dashboard-guide.md                            |  5 +-
 docs/settings-reference.md                         |  2 +-
 .../app/components/CustomProvidersSection.tsx      |  2 +
 .../__tests__/CustomProvidersSection.test.tsx      | 62 ++++++++++++++++++++++
 packages/i18n/locales/en/app.json                  |  1 +
 packages/i18n/locales/es/app.json                  |  1 +
 packages/i18n/locales/fr/app.json                  |  1 +
 packages/i18n/locales/ko/app.json                  |  1 +
 packages/i18n/locales/zh-CN/app.json               |  1 +
 packages/i18n/locales/zh-TW/app.json               |  1 +
 11 files changed, 79 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-6290

Fusion-Task-Lineage: 295cbba2-cae1-4998-9456-d6a306be6e34
2026-06-12 07:13:00 -07:00
gsxdsm
2085610e9e FN-6246: move AI merge clean rooms into repo storage
Move AI merge clean-room worktrees into a repo-local ignored root while preserving legacy temp cleanup.

- Add repo-local `.fusion/ai-merge` resolution and ignore handling for AI merge worktrees.
- Sweep both repo-local clean rooms and legacy tempdir worktrees with active-session and age safeguards.
- Prune stale git worktree metadata after cleanup and classify missing clean-room errors as transient.
- Update cleanup tests, architecture docs, and changeset coverage for the relocation.

Files changed:
 .changeset/fn-6246-ai-merge-cleanroom-relocation.md       |   5 +
 AGENTS.md                                          |   2 +-
 docs/architecture.md                               |   6 +-
 .../merger-ai-cleanup-active-session.test.ts       |  22 ++-
 .../engine/src/__tests__/merger-ai-cleanup.test.ts |  48 +++++-
 .../ai-merge-worktree-cleanup.test.ts              |  26 ++-
 .../__tests__/self-healing-tempdir-sweep.test.ts   |  34 ++++
 .../transient-merge-error-classifier.test.ts       |   2 +
 packages/engine/src/merger-ai.ts                   | 144 ++++++++++-------
 packages/engine/src/self-healing.ts                | 180 ++++++++++++---------
 .../engine/src/transient-merge-error-classifier.ts |  14 +-
 11 files changed, 325 insertions(+), 158 deletions(-)

Fusion-Task-Id: FN-6246
Fusion-Task-Lineage: f6fe8ef2-aa7b-4cc3-903f-b7a5cc165487
2026-06-12 06:49:29 -07:00
gsxdsm
3bd8353fc2 FN-6288: fix mobile viewport screen mocking
Align the mobile auto-merge integration test viewport mock with screen dimensions.\n\n- Add explicit mobile width and height media-query handling to the viewport mock.\n- Mock window.screen dimensions alongside innerWidth and innerHeight.\n- Restore the original screen object after each test.\n\nFiles changed:\n ...-merge-toggle-blank.mobile-integration.test.tsx | 23 ++++++++++++++++++++++\n 1 file changed, 23 insertions(+)

Fusion-Task-Id: FN-6288

Fusion-Task-Lineage: 3c929d54-b482-41f3-a03e-0a22df0aa9e9
2026-06-12 06:08:37 -07:00
gsxdsm
40b9d553dd FN-6286: document custom provider model selection
Document how custom providers are configured and surfaced in model pickers.

- Add Custom Providers dashboard guide coverage for adding, editing, deleting, detecting models, and masked API key behavior.
- Explain that saved custom provider models appear in Project Models and workflow model dropdowns.
- Add a stable settings-reference anchor for the customProviders setting.

Files changed:
 docs/dashboard-guide.md    | 64 ++++++++++++++++++++++++++++++++++++++++++++++
 docs/settings-reference.md |  2 +-
 2 files changed, 65 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-6286

Fusion-Task-Lineage: 79520376-d448-4048-af43-a532fba68853
2026-06-12 05:26:08 -07:00
gsxdsm
bd1c533120 FN-6280: stabilize self-healing recovery patch test
Stabilize the self-healing dirty worktree recovery test by avoiding timer and async cleanup races.

- Force real timers for branch conflict reclaim tests.
- Provide explicit integration branch settings and dispatcher behavior for the recovery path.
- Use synchronous fixture setup and cleanup around the recovery patch assertion.

Files changed:
 packages/engine/src/__tests__/self-healing.test.ts | 77 +++++++++++++---------
 1 file changed, 46 insertions(+), 31 deletions(-)

Fusion-Task-Id: FN-6280

Fusion-Task-Lineage: ef93f14a-1d16-4cca-ac6d-3cfd7249ca21
2026-06-12 05:12:00 -07:00
gsxdsm
89654b2a90 FN-6282: isolate vitest worker temp roots
Use per-invocation Vitest worker roots to keep compound-engineering tests from timing out on stale temp fixtures.

- Allocate a fresh FUSION_TEST_WORKER_ROOT during Vitest global setup and remove it during teardown.
- Preserve per-worker fallback root creation when global setup is not available.
- Clean compound-engineering harness project roots on close and cover the setup invariants with regression tests.

Files changed:
 packages/core/src/__test-utils__/vitest-setup.ts   | 20 +++++++---
 .../core/src/__test-utils__/vitest-teardown.ts     | 38 +++++++++++--------
 .../src/__tests__/_harness.ts                      |  7 +++-
 .../src/__tests__/setup-invariant.test.ts          | 43 ++++++++++++++++++++++
 4 files changed, 85 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-6282

Fusion-Task-Lineage: 8b842dd0-4f51-44de-b2db-8e8bfa97239c
2026-06-12 04:19:42 -07:00
gsxdsm
ec4b247a86 FN-6284: refire deferred agent assignments
Ensure assigned agents resume task work even when their heartbeat loop is idle.

- add deferred assignment refiring when an agent is assigned work without an active heartbeat run
- track in-process runtime activity so scheduled work is not double-started
- cover idle, active, and concurrent heartbeat assignment paths with scheduler and runtime tests
- document the deferred assignment wake-up behavior and add a changeset

Files changed:
 .changeset/fn-6284-deferred-assignment-refire.md   |   5 +
 docs/agents.md                                     |   2 +
 docs/architecture.md                               |   1 +
 .../src/__tests__/heartbeat-scheduler.test.ts      | 174 ++++++++++++++++++++-
 packages/engine/src/agent-heartbeat.ts             | 109 ++++++++++++-
 .../runtimes/__tests__/in-process-runtime.test.ts  |  24 +++
 packages/engine/src/runtimes/in-process-runtime.ts |   3 +
 7 files changed, 311 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-6284
Fusion-Task-Lineage: cf8a9abe-163e-45c6-961a-095891e45ea5
2026-06-12 03:00:45 -07:00
gsxdsm
0077b10ef7 Fix masked API key echoed back when editing custom providers
The custom provider edit form seeded the API key input with the masked
value (e.g. "abc•••••wxyz") returned by the sanitized GET. Saving or
running "Detect Models" without retyping echoed that mask back — the
probe endpoint rejects it and a persisted mask broke HTTP header
encoding. The field now starts blank with a "leave blank to keep" hint;
an empty field omits apiKey so the stored credential is preserved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 01:06:33 -07:00
gsxdsm
f0d2415c20 Fix custom provider sends failing on masked API key
The settings UI displays saved API keys masked with '•' (U+2022). Saving
a provider without retyping the key echoed that mask back, and the PUT
handler persisted it as the real credential. The masked key then flowed
into an Authorization/x-api-key header, throwing "Cannot convert argument
to a ByteString ... value 8226" at request time.

Treat masked values echoed back on update as "unchanged" so the stored
key is preserved, and reject masked values on create/probe. Add tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 00:10:38 -07:00
gsxdsm
5301e16ff1 Remove .beads issue-tracking directory
Removes the beads/dolt issue tracker scaffolding added in bd init.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 00:06:18 -07:00
gsxdsm
a83c2d89fe Fix custom provider models missing from model dropdowns
The /models endpoint restricted results to providers configured in
Fusion's auth.json/models.json stores, but custom providers live in
global settings and register under customProviderRegistryKey(). Their
keys were never added to the allowlist, so their models were filtered
out before reaching the dropdowns. Add the custom provider registry
keys to the configured-providers set.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 00:05:10 -07:00
gsxdsm
b9ec794f47 bd init: initialize beads issue tracking 2026-06-11 23:39:12 -07:00
gsxdsm
22d6562494 FN-6261: map IR-only workflow nodes to editor types
Normalize graph-only workflow node kinds before rendering them in the workflow editor.\n\n- Add a typed mapping from IR-only merge, retry, recovery, branch, and PR node kinds to supported editor node kinds.\n- Keep same-kind editor node handling type-safe and fall back unknown graph-only kinds to prompt nodes.\n- Cover policy-node, foreach-template, merge-seam, and PR special cases in workflow-flow mapping tests.\n\nFiles changed:\n .../__tests__/workflow-flow-mapping.test.ts        | 101 ++++++++++++++++++++-\n .../app/components/workflow-flow-mapping.ts        |  71 ++++++++++-----\n 2 files changed, 149 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-6261

Fusion-Task-Lineage: 7c7ccb71-77b6-4759-95ab-6f577473fdb6
2026-06-11 22:55:48 -07:00
gsxdsm
44b756d927 FN-6258: allow deferred built-in workflow selection
Allow branching built-in workflows to stay selectable while deferring legacy step materialization.\n\n- Treat interpreter-deferred built-in compile errors as valid zero-step selections or default fallbacks.\n- Update builtin:coding merge-region layout expectations and documentation for workflow-native merge primitives.\n- Cover explicit selection, create-time selection, and project-default fallback cases for deferred built-ins.\n- Add a patch changeset for the published CLI package.\n\nFiles changed:\n .changeset/fuzzy-workflows-branching.md            |  5 ++\n docs/workflow-steps.md                             |  4 +-\n .../core/src/__tests__/builtin-workflows.test.ts   | 53 +++++++++++++++--\n packages/core/src/builtin-workflows.ts             | 10 +++-\n packages/core/src/store.ts                         | 43 ++++++++++----\n packages/core/src/workflow-compiler.ts             | 66 +++++-----------------\n 6 files changed, 109 insertions(+), 72 deletions(-)

Fusion-Task-Id: FN-6258

Fusion-Task-Lineage: 0958f522-029e-4f2a-9292-b408c2a4c208
2026-06-11 22:48:59 -07:00
gsxdsm
2efa833357 FN-6250: add Compound Engineering session cancellation
Add cancel controls and backend support for preserving interrupted Compound Engineering sessions.

- Add an orchestrator cancel path and POST route that stops live work without deleting session history.
- Wire dashboard APIs, hooks, and UI buttons to cancel active, launching, or awaiting-input sessions.
- Cover cancellation behavior across orchestrator, routes, hooks, flow controls, and session panel tests.
- Document the cancel versus discard workflow in plugin docs and README.

Files changed:
 docs/plugins/compound-engineering.md               |  13 ++-
 .../fusion-plugin-compound-engineering/README.md   |  11 ++-
 .../src/__tests__/orchestrator-cancel.test.ts      | 101 +++++++++++++++++++++
 .../src/__tests__/session-routes.test.ts           |  35 +++++++
 .../src/dashboard/CeFlow.tsx                       |  16 +++-
 .../src/dashboard/CompoundEngineeringView.css      |  20 ++++
 .../src/dashboard/CompoundEngineeringView.tsx      |  40 +++++++-
 .../src/dashboard/__tests__/CeFlow.test.tsx        |  20 ++++
 .../__tests__/CompoundEngineeringView.test.tsx     |  53 ++++++++++-
 .../hooks/__tests__/useCeSessions.test.tsx         |  44 ++++++++-
 .../src/dashboard/hooks/api.ts                     |  10 ++
 .../src/dashboard/hooks/useCeSessions.ts           |  23 ++++-
 .../src/routes/session-routes.ts                   |  11 +++
 .../src/session/orchestrator.ts                    |  20 ++++
 14 files changed, 404 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-6250

Fusion-Task-Lineage: e9997056-364c-44e1-b846-00b08a1ff8fc
2026-06-11 22:42:21 -07:00
gsxdsm
b4dcd291eb FN-6256: enforce recursive raw rgba CSS hygiene
Extend the dashboard component CSS hygiene guard so raw rgb/rgba checks cover nested component styles.

- Recursively discover dashboard component CSS files instead of only scanning the top-level components directory.
- Report stable component-relative paths for violations across nested folders.
- Add focused coverage for raw rgba detection while preserving var() fallback allowance.

Files changed:
 .../__tests__/component-css-no-raw-rgba.test.ts    | 85 +++++++++++++++++-----
 1 file changed, 65 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-6256

Fusion-Task-Lineage: c8e84ab4-1da9-4cf0-9e04-d8ca4038eafa
2026-06-11 22:36:22 -07:00
gsxdsm
73990e4212 FN-6253: index workflow policy ownership map
Index the workflow policy ownership documentation from the docs landing page.

- Add workflow-policy-ownership-map.md to docs/README.md's reference table.
- Summarize the map's merge, retry, scheduling, and recovery policy coverage.

Files changed:
 docs/README.md | 1 +
 1 file changed, 1 insertion(+)

Fusion-Task-Id: FN-6253

Fusion-Task-Lineage: bf04e915-7cd1-436c-9edc-a0bde285f551
2026-06-11 22:31:35 -07:00
gsxdsm
6f5be09edb FN-6276: suppress repeated queued overlap recovery logs
Deduplicate self-healing log entries for queued tasks that remain blocked by the same active file-scope overlap.

- Track the last active overlap blocker logged per task and skip duplicate preserved-queued log entries across self-healing passes.
- Clear the memo when blockers change, resolve, or the manager stops so legitimate future recoveries are still logged.
- Cover unchanged blockers, blocker changes, resolved blockers, stop/reset behavior, and FN-5488 stale-blockedBy preservation with regression tests.

Files changed:
 packages/engine/src/__tests__/self-healing.test.ts | 123 +++++++++++++++++++++
 packages/engine/src/self-healing.ts                |  61 ++++++++--
 2 files changed, 177 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-6276

Fusion-Task-Lineage: 169d4402-ec4e-4fa9-8225-2f545c11a3f7
2026-06-11 22:25:41 -07:00
gsxdsm
d73d8f4036 FN-6241: rescue quarantined engine tests
Rescue quarantined engine tests by adding deterministic seams and fake-timer flushing.\n\n- Add an injectable staged-files reader for squash file-scope invariant checks while preserving the production git-backed default.\n- Update file-scope invariant tests to use the deterministic staged-files seam instead of child_process mocking.\n- Stabilize project engine reconciliation retry coverage by avoiding mixed real timers in fake-timer tests.\n- Remove the rescued engine tests from Vitest excludes and the quarantine ledger.\n\nFiles changed:\n .../__tests__/merger-file-scope-invariant.test.ts  | 39 ++++++++++++----------\n .../src/__tests__/project-engine-manager.test.ts   | 18 +++++-----\n packages/engine/src/merger.ts                      | 22 ++++++++----\n packages/engine/vitest.config.ts                   |  3 --\n scripts/lib/test-quarantine.json                   | 10 ------\n 5 files changed, 48 insertions(+), 44 deletions(-)

Fusion-Task-Id: FN-6241

Fusion-Task-Lineage: c1c0d40c-7581-4bcf-8244-688ea04d12b9
2026-06-11 22:17:55 -07:00
gsxdsm
d23c5d901f FN-6247: refresh PR controls from live auto-merge setting
Keep task detail PR and review affordances synchronized with the current project auto-merge setting.

- Thread the live auto-merge value into task detail modals and list split-pane detail views.
- Prefer the live auto-merge setting over the stale fetched modal snapshot while preserving task-level overrides.
- Cover PR and review tab behavior for auto-merge on/off and document the dashboard behavior.
- Evict flaky engine gate entries and add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-6247-automerge-off-modal-stale.md    |   5 +
 docs/dashboard-guide.md                            |   1 +
 packages/dashboard/app/App.tsx                     |   3 +-
 packages/dashboard/app/components/AppModals.tsx    |   2 +
 packages/dashboard/app/components/ListView.tsx     |   3 +
 .../dashboard/app/components/TaskDetailModal.tsx   |   4 +-
 .../__tests__/TaskDetailModal.create-pr.test.tsx   | 171 ++++++++++++++++++++-
 packages/engine/vitest.config.ts                   |   2 -
 8 files changed, 182 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-6247

Fusion-Task-Lineage: 1321c03a-216d-4b15-bf4f-95621d68c9ae
2026-06-11 22:11:44 -07:00
gsxdsm
65251d2e6b FN-6252: stop agent pauses from pausing tasks
Agent pause and sleep flows now leave task pause state under explicit task controls.\n\n- Remove automatic task pausing from heartbeat pauseAgent and dashboard fallback state changes.\n- Default resume task cascade to off while retaining legacy opt-in unpause cleanup.\n- Cover agent sleep, heartbeat execution, and dashboard fallback pause behavior with regression tests.\n- Document task pause ownership and add a patch changeset.\n\nFiles changed:\n .changeset/fn-6252-no-agent-task-autopause.md      |  5 ++\n docs/agents.md                                     |  2 +-\n docs/architecture.md                               |  4 ++\n .../src/__tests__/routes-agent-runs.test.ts        | 32 +++++++++\n .../src/routes/register-agent-runtime-routes.ts    | 17 -----\n .../src/__tests__/heartbeat-executor.test.ts       | 75 ++++++++++++++++++++--\n packages/engine/src/agent-heartbeat.ts             | 29 +++------\n 7 files changed, 121 insertions(+), 43 deletions(-)

Fusion-Task-Id: FN-6252

Fusion-Task-Lineage: f7a0ef30-0c99-4f9c-b0c1-43217d613187
2026-06-11 22:03:29 -07:00
gsxdsm
4fc00b6e1f FN-6251: rehydrate compound answers before resuming
Allow interrupted compound engineering sessions to answer pending questions after the live handle is lost.

- Rehydrate missing live session handles before sending answer turns.
- Keep detached answer resumes active while background rehydration completes.
- Cover route and orchestrator resume paths for old interrupted sessions.
- Document the resume behavior and add a patch changeset.

Files changed:
 .changeset/fn-6251-ce-answer-rehydrate.md          |   5 +
 .../fusion-plugin-compound-engineering/README.md   |   5 +-
 .../orchestrator-interrupt-resume.test.ts          | 156 ++++++++++++++++++++-
 .../src/__tests__/session-routes.test.ts           |  72 +++++++++-
 .../src/session/orchestrator.ts                    |  52 +++++--
 5 files changed, 276 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-6251
Fusion-Task-Lineage: b6930c72-6106-4da9-a0c3-4bcf882f20da
2026-06-11 21:37:10 -07:00
gsxdsm
b0967984b3 FN-6249: theme Compound Engineering textareas
Compound Engineering plugin textareas now use dashboard theme input styling.

- Apply dashboard surface, text, border, radius, font, focus, and placeholder tokens to CE free-text and guidance textareas.
- Add CSS token coverage for standard, degraded fallback, guidance, focus, and placeholder textarea states.

Files changed:
 .../src/dashboard/CompoundEngineeringView.css      | 19 ++++++
 .../src/dashboard/__tests__/theme-tokens.test.ts   | 71 ++++++++++++++++++++++
 2 files changed, 90 insertions(+)

Fusion-Task-Id: FN-6249

Fusion-Task-Lineage: d3c4dd30-1a94-4af2-a672-a2b814eb2c0d
2026-06-11 21:32:02 -07:00
gsxdsm
c0ff360737 FN-6243: keep mobile auto-merge toggles visible
Keep the mobile dashboard pinned while offscreen auto-merge controls are toggled.

- Reset document horizontal scroll during mobile board stabilization and immediately after auto-merge toggles.
- Cover portrait and landscape mobile scroll realignment in the auto-merge integration test.
- Document the real-browser blank-dashboard root cause and add a patch changeset.

Files changed:
 .changeset/FN-6243-mobile-auto-merge-blank.md      |  5 ++
 ...bile-auto-merge-toggle-document-scroll-blank.md | 55 ++++++++++++++++++++++
 packages/dashboard/app/components/Board.tsx        | 47 ++++++++++++++++--
 ...-merge-toggle-blank.mobile-integration.test.tsx | 49 +++++++++++++++++++
 4 files changed, 152 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-6243

Fusion-Task-Lineage: 91f74de2-667f-4732-a840-47b792288bec
2026-06-11 21:26:59 -07:00
gsxdsm
143a724a99 FN-6239: map workflow merge nodes in the editor
Render workflow-owned merge and recovery IR nodes with existing dashboard editor shapes.

- Map merge gate, retry, recovery, and branch-group IR node kinds to supported editor node types.
- Update the workflow mapping assertion for merge-attempt failure routing.
- Quarantine the flaky QuickEntryBox dashboard test without reintroducing the rescued self-healing quarantine entry.

Files changed:
 .../app/components/__tests__/WorkflowNodeEditor.test.tsx    |  2 +-
 packages/dashboard/app/components/workflow-flow-mapping.ts  | 13 +++++++++++++
 packages/dashboard/vitest.config.ts                         |  2 +-
 scripts/lib/test-quarantine.json                            |  5 +++++
 4 files changed, 20 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-6239

Fusion-Task-Lineage: 2ab31bd4-6fd7-4b71-b7cd-6cc99cce3bbb
2026-06-11 21:22:06 -07:00
gsxdsm
de6e493e2a FN-6238: stabilize self-healing test and quarantine merger AI suite
Rescue the already-merged self-healing real-git test while quarantining a separate flaky merger AI suite.

- Call the already-merged recovery path directly in the rescued test and assert specific audit event types instead of exact total counts.
- Remove self-healing-already-merged.real-git.test.ts from the engine default quarantine list and ledger.
- Add merger-ai.test.ts to the engine default quarantine list and quarantine ledger with FN-6238 evidence.

Files changed:
 .../self-healing-already-merged.real-git.test.ts     | 20 +++++++++++++-------
 packages/engine/vitest.config.ts                     |  2 +-
 scripts/lib/test-quarantine.json                     | 10 +++++-----
 3 files changed, 19 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-6238

Fusion-Task-Lineage: b04451e3-fbd3-4dee-aca2-f542d1036d20
2026-06-11 21:10:00 -07:00
gsxdsm
fb2c6e5098 FN-6235: source reviewer prompts from workflow IR
Deduplicate reviewer policy text by making workflow IR review seams the engine's built-in prompt source.

- Move the canonical built-in reviewer prompt into core agent prompts and export seam prompt resolution helpers.
- Resolve reviewer prompts from explicit role overrides first, then workflow IR review seams, with the built-in prompt as a fallback.
- Update prompt cache and reviewer tests to cover single-source reviewer prompt behavior.
- Add a patch changeset for the published Fusion package.

Files changed:
 .../FN-6235-reviewer-prompt-single-source.md       |   5 +
 packages/core/src/__tests__/agent-prompts.test.ts  |   8 +-
 packages/core/src/agent-prompts.ts                 | 109 +++++++++--
 packages/core/src/index.ts                         |   2 +
 packages/core/src/workflow-ir-resolver.ts          |  31 ++-
 .../src/__tests__/prompt-cache-integration.test.ts |  10 +-
 .../reviewer-prompt-single-source.test.ts          | 160 +++++++++++++++
 packages/engine/src/__tests__/reviewer.test.ts     |  97 ++++-----
 packages/engine/src/prompt-layers.ts               |   2 +-
 packages/engine/src/reviewer.ts                    | 217 ++-------------------
 10 files changed, 370 insertions(+), 271 deletions(-)

Fusion-Task-Id: FN-6235

Fusion-Task-Lineage: 725932d1-2469-4507-a0f9-0946c83a1572
2026-06-11 21:00:23 -07:00
gsxdsm
e22afece56 FN-6233: add typed triage policy settings
Render triage planning thresholds from typed workflow settings instead of hard-coded prompt constants.

- Add typed triage threshold/default workflow settings, migration coverage, exports, and docs.
- Render built-in triage prompt placeholders before engine prompt execution and tests.
- Remove the duplicate standard triage prompt from engine in favor of the core workflow IR source.
- Add regression coverage for default and customized triage policy rendering.

Files changed:
 .changeset/FN-6233-triage-threshold-settings.md    |   7 +
 docs/settings-reference.md                         |  19 ++
 docs/workflow-steps.md                             |   2 +-
 packages/core/src/__tests__/agent-prompts.test.ts  |  16 +-
 .../builtin-workflow-settings-triage.test.ts       |  63 ++++
 .../src/__tests__/settings-consistency.test.ts     |  24 +-
 .../core/src/__tests__/settings-migration.test.ts  |  12 +-
 .../src/__tests__/workflow-ir-settings.test.ts     |  11 +-
 packages/core/src/agent-prompts.ts                 |  20 +-
 packages/core/src/builtin-workflow-settings.ts     | 154 ++++++++-
 packages/core/src/index.ts                         |   7 +-
 packages/core/src/moved-settings.ts                |  13 +-
 .../triage-planning-prompt-single-source.test.ts   |   9 +-
 .../__tests__/triage-threshold-settings.test.ts    |  84 +++++
 packages/engine/src/__tests__/triage.test.ts       |  17 +-
 packages/engine/src/triage.ts                      | 343 +--------------------
 packages/engine/vitest.config.ts                   |   5 +-
 17 files changed, 423 insertions(+), 383 deletions(-)

Fusion-Task-Id: FN-6233

Fusion-Task-Lineage: b2a986df-fa37-4297-a359-84d8463b0867
2026-06-11 20:53:01 -07:00
gsxdsm
905d5bf849 FN-6228: prioritize project model overrides
Ensure saved project model settings outrank stale durable-agent runtime models across AI lanes.

- Document the updated task, heartbeat, validator, merger, and summarizer model precedence.
- Add model-resolution regression coverage for project lanes, globals, defaults, runtime fallback, and test-mode mock forcing.
- Route AI merge body summarization through the shared title-summarizer settings resolver.
- Preserve upstream triage prompt coverage for TRIAGE_POLICY_PROMPT while resolving conflicts.

Files changed:
 docs/agents.md                                     |  18 +--
 docs/settings-reference.md                         |  32 ++--
 .../core/src/__tests__/model-resolution.test.ts    |  98 ++++++++++++
 packages/core/vitest.config.ts                     |   1 +
 .../src/__tests__/agent-session-helpers.test.ts    | 173 +++++++++++++++++++++
 .../src/__tests__/merger-ai-merge-body.test.ts     |  85 +++++++++-
 packages/engine/src/agent-session-helpers.ts       |   4 +
 packages/engine/src/merger.ts                      |  26 +---
 8 files changed, 392 insertions(+), 45 deletions(-)

Fusion-Task-Id: FN-6228

Fusion-Task-Lineage: a6c03f2a-dde7-4037-bdcd-a1c92a8b7fae
2026-06-11 20:44:52 -07:00
gsxdsm
7763ba5fab FN-6278: preflight reusable merge worktree cwd
Stabilize reusable merge worktree cwd resolution before merge-runner git spawns.

- Add a reusable merge integration root preflight that detects missing, empty, or de-registered task worktrees before using them as cwd.
- Reacquire/repair unusable reuse-task-worktree roots before merge execution and reject unusable roots during handoff.
- Cover vanished and unregistered worktree recovery paths plus focused preflight unit cases.
- Document the FN-6278 preflight behavior alongside transient merge recovery and merge integration worktree contracts.

Files changed:
 docs/architecture.md                               |   4 +-
 .../__tests__/merger-integration-worktree.test.ts  |  82 ++++++++
 .../merge-runner-spawn-enoent-prevention.test.ts   | 233 +++++++++++++++++++++
 packages/engine/src/merger-integration-worktree.ts |  71 +++++++
 packages/engine/src/merger.ts                      |  19 +-
 5 files changed, 396 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-6278

Fusion-Task-Lineage: ceecf70f-9e2d-4ffe-8c6f-a9a5b673d72d
2026-06-11 20:27:29 -07:00
gsxdsm
64d831576d FN-6225: persist workflow model lanes on Settings save
Persist default workflow model lane edits through the Settings modal's primary save path.

- Register a Project Models section save handler so workflow lane overrides flush before closing Settings.
- Surface typed workflow setting rejections without closing the modal or showing a success toast.
- Remove the separate workflow-model save button and update coverage/docs for the unified save behavior.

Files changed:
 docs/dashboard-guide.md                            |  2 +-
 docs/settings-reference.md                         | 17 +++++---
 .../dashboard/app/components/SettingsModal.tsx     | 11 ++++-
 .../components/__tests__/SettingsModal.test.tsx    | 50 ++++++++++++++++------
 .../settings/sections/ProjectModelsSection.tsx     | 42 ++++++++++--------
 .../app/components/settings/sections/context.ts    |  3 ++
 6 files changed, 83 insertions(+), 42 deletions(-)

Fusion-Task-Id: FN-6225

Fusion-Task-Lineage: 98338f85-c742-46c2-8bdf-f676a6f7e32e
2026-06-11 20:21:30 -07:00
gsxdsm
40cb0d3d45 FN-6223: keep usage dialog near the top
Keep usage dialog positioning consistently top-biased across viewport surfaces.

- Clamp desktop popover placement to the upper viewport while preserving anchor alignment and saved sizing.
- Add overlay styling so modal and mobile sheet presentations start near the top.
- Extend UsageIndicator tests across desktop, mobile, saved-size, and data-state surfaces.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/top-usage-dialog.md                     |   5 +
 .../dashboard/app/components/UsageIndicator.css    |   8 ++
 .../dashboard/app/components/UsageIndicator.tsx    |  18 ++-
 .../components/__tests__/UsageIndicator.test.tsx   | 139 ++++++++++++++++++++-
 4 files changed, 162 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-6223

Fusion-Task-Lineage: a35e82f4-ddef-4d68-81f0-6fee420f0392
2026-06-11 20:14:54 -07:00
gsxdsm
ac342f5012 FN-6220: harden AI merge worktree cleanup
Harden AI merge cleanup so temporary clean-room worktrees are removed and audited reliably.

- Canonicalize AI merge cleanup paths and prune stale git worktree metadata after removals.
- Treat already-absent or de-registered cleanup paths as idempotent success while still auditing genuine failures.
- Add regression coverage for successful, no-op, retry, thrown, orphaned, and dangling-registration cleanup paths.
- Document the inline and self-healing cleanup lifecycle for AI merge temp worktrees.

Files changed:
 docs/architecture.md                               |   4 +-
 .../engine/src/__tests__/merger-ai-cleanup.test.ts |  28 +-
 .../ai-merge-worktree-cleanup.test.ts              | 284 +++++++++++++++++++++
 packages/engine/src/merger-ai.ts                   | 108 +++++---
 4 files changed, 392 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-6220

Fusion-Task-Lineage: b002313c-4349-49c2-8d0f-cd1853369d84
2026-06-11 20:02:21 -07:00
gsxdsm
1c2b68386b FN-6210: cap chat sidebar width during keyboard flicker
Keep the chat sidebar bounded when tablet keyboard viewport changes briefly report mobile sizing.

- Add a desktop max-width guard to the chat sidebar with a mobile override.
- Cover simulated tablet keyboard viewport-mode flicker in the mobile render tests.
- Document the ChatView sidebar defense alongside the tablet viewport-mode solution.

Files changed:
 .../ui-bugs/tablet-keyboard-viewport-mode-flip.md  |  3 ++
 packages/dashboard/app/components/ChatView.css     |  2 +
 .../__tests__/ChatView.mobile-render.test.tsx      | 53 ++++++++++++++++++++++
 3 files changed, 58 insertions(+)

Fusion-Task-Id: FN-6210

Fusion-Task-Lineage: b3aca9d5-dc16-45e2-8f2c-5c2d51c7d021
2026-06-11 19:51:19 -07:00
gsxdsm
02ae5a9340 FN-6213: prevent keyboard from forcing mobile layout
Keep tablet and desktop layouts stable when the virtual keyboard shrinks viewport height.

- Gate short-height mobile detection on phone-class physical screen size.
- Reuse the shared mobile viewport helper across board, terminal, and workflow editor layout decisions.
- Cover tablet keyboard and landscape phone viewport behavior with regression tests and document the UI bug pattern.
- Preserve quarantine exclusions while resolving the squash merge conflict.

Files changed:
 .../ui-bugs/tablet-keyboard-viewport-mode-flip.md  | 54 +++++++++++++
 packages/dashboard/app/components/Board.tsx        |  4 +-
 .../dashboard/app/components/SessionTerminal.tsx   | 16 +---
 .../app/components/WorkflowNodeEditor.tsx          | 41 +++++-----
 .../__tests__/SessionTerminal.mobile.test.tsx      | 57 ++++++++++----
 .../app/hooks/__tests__/useViewportMode.test.ts    | 90 +++++++++++++++++++++-
 packages/dashboard/app/hooks/useViewportMode.ts    | 26 ++++++-
 packages/engine/vitest.config.ts                   |  1 +
 scripts/lib/test-quarantine.json                   |  5 ++
 9 files changed, 239 insertions(+), 55 deletions(-)

Fusion-Task-Id: FN-6213

Fusion-Task-Lineage: 01af6489-8c34-4318-9cff-1bceb1fa5a5d
2026-06-11 19:37:25 -07:00
gsxdsm
1eb256bbf6 FN-6207: quarantine active-session cleanup pruning test
Quarantines the flaky active-session pruning coverage without hiding the rest of merger cleanup tests.

- Move the active-session pruning scenario into its own focused test file.
- Keep the broader merger cleanup suite in the reliability project.
- Point the quarantine ledger and engine default exclude at only the isolated flaky test.

Files changed:
 .../merger-ai-cleanup-active-session.test.ts       | 60 ++++++++++++++++++++++
 .../engine/src/__tests__/merger-ai-cleanup.test.ts | 22 ++------
 packages/engine/vitest.config.ts                   |  2 +-
 scripts/lib/test-quarantine.json                   |  4 +-
 4 files changed, 66 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-6207

Fusion-Task-Lineage: b5e806cb-aec8-4893-83ef-d27164250a5c
2026-06-11 19:18:05 -07:00
gsxdsm
9a71b1c7d1 FN-6242: recover transient spawn merge failures
Recover retry-exhausted in-review merge tasks when the merger failed before spawning its git command.

- Classify spawn ENOTDIR and spawn ENOENT errors as bounded transient merge failures.
- Requeue retry-exhausted in-review tasks for auto-merge while preserving the transient recovery budget.
- Cover the classifier and self-healing recovery paths for process-spawn failures.
- Document the transient merge recovery classes and bounded budget behavior.

Files changed:
 docs/architecture.md                               |   1 +
 packages/engine/src/__tests__/self-healing.test.ts | 101 +++++++++++++++++++++
 .../transient-merge-error-classifier.test.ts       |  40 ++++++++
 .../engine/src/transient-merge-error-classifier.ts |  11 +++
 4 files changed, 153 insertions(+)

Fusion-Task-Id: FN-6242
Fusion-Task-Lineage: 3ca0ab1b-7184-4808-85ad-3becc9c99329
2026-06-11 18:41:49 -07:00
gsxdsm
94c3cce7bc FN-6257: make AI merge cleanup idempotent for absent worktrees
AI merge cleanup now tolerates already-removed worktrees without failing a landed merge.

- Treat ENOENT and de-registered worktree removal errors as successful idempotent cleanup.
- Register AI merge temp paths before worktree creation and keep raw/canonical paths active.
- Add cleanup regression coverage and include the cleanup suite in reliability tests.
- Document the idempotent cleanup telemetry contract.

Files changed:
 docs/architecture.md                               |   2 +-
 .../engine/src/__tests__/merger-ai-cleanup.test.ts |  48 +++++++-
 .../ai-merge-cleanup-enoent-idempotent.test.ts     | 128 +++++++++++++++++++++
 packages/engine/src/merger-ai.ts                   |  73 +++++++++---
 packages/engine/vitest.config.ts                   |   5 +-
 5 files changed, 239 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-6257

Fusion-Task-Lineage: c669fa1e-2c92-4e2f-8726-4939a3146955
2026-06-11 18:14:45 -07:00
gsxdsm
9a78814418 FN-6245: keep default auto-merge tasks on live settings
Keep tasks without explicit auto-merge overrides tied to the live global setting instead of freezing it at review entry.

- Stop in-review entry effects from copying the project autoMerge setting onto tasks.
- Preserve explicit per-task auto-merge overrides while allowing default tasks to follow later global toggles.
- Add regression coverage for move-to-review behavior and live auto-merge resolution.
- Document the default auto-merge behavior and add a patch changeset.

Files changed:
 .changeset/fn-6245-automerge-toggle.md             |  5 ++
 docs/settings-reference.md                         |  2 +-
 .../__tests__/move-task-characterization.test.ts   | 48 ++++++++++++++---
 packages/core/src/__tests__/store-movement.test.ts | 63 +++++++++++++++-------
 packages/core/src/__tests__/task-merge.test.ts     | 12 ++++-
 packages/core/src/default-workflow-hooks.ts        | 28 ++++++----
 packages/core/src/store.ts                         | 13 ++---
 7 files changed, 121 insertions(+), 50 deletions(-)

Fusion-Task-Id: FN-6245
Fusion-Task-Lineage: 1f349f0c-e513-4d82-b77a-9d0c353c163c
2026-06-11 18:08:17 -07:00
gsxdsm
3cb0f9f371 FN-6231: enlarge tablet modal and expose triage prompt
Increase tablet task detail modal height while keeping triage prompt contracts testable.\n\n- Set tablet task detail modal height to 92vh with a dynamic viewport max-height guard.\n- Add CSS regression coverage for desktop, tablet, mobile, and embedded modal height invariants.\n- Export the standard triage prompt and include it in invariant wording tests.\n\nFiles changed:\n .../dashboard/app/components/TaskDetailModal.css   |   2 +\n .../__tests__/core-modals-mobile.test.tsx          |  74 ++++-\n packages/engine/src/__tests__/triage.test.ts       |   5 +-\n packages/engine/src/triage.ts                      | 333 +++++++++++++++++++++\n 4 files changed, 406 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-6231

Fusion-Task-Lineage: 58e990dd-2dbb-4c6e-869d-661b02699cef
2026-06-11 17:15:24 -07:00
gsxdsm
39b2478f01 FN-6227: handle non-empty worktree removals
Recover native worktree cleanup when git refuses to remove a non-empty worktree.

- Detect recoverable git worktree remove errors and fall back to filesystem removal plus admin pruning.
- Add a worktree remove fallback audit event for recovery visibility.
- Cover non-empty removal recovery with unit and real-git regression tests.
- Keep flaky-test quarantine exclusions merged with current main.

Files changed:
 docs/architecture.md                               |   4 +-
 ...tree-remove-non-empty-recovery.real-git.test.ts | 139 +++++++++++++++++++++
 .../engine/src/__tests__/worktree-backend.test.ts  | 113 ++++++++++++++++-
 packages/engine/src/run-audit.ts                   |   1 +
 packages/engine/src/worktree-backend.ts            |  57 ++++++++-
 packages/engine/vitest.config.ts                   |   1 +
 scripts/lib/test-quarantine.json                   |   5 +
 7 files changed, 311 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-6227

Fusion-Task-Lineage: 98673303-8109-4fe8-8d9f-eb867fb28bdd
2026-06-11 16:15:07 -07:00
gsxdsm
3e69d3990d FN-6244: protect active AI merge worktrees
Ensure AI merge cleanup only reaps stale, inactive temp worktrees.

- Register live AI merge clean-room paths in the active session registry while merges run.
- Add a minimum temp-worktree reap age and conservative lookup-error handling to sweep and prune paths.
- Expand cleanup tests and release the repaired AI merge cleanup test from quarantine.

Files changed:
 docs/architecture.md                               |  2 +-
 .../engine/src/__tests__/merger-ai-cleanup.test.ts | 38 ++++++++++++++--
 .../__tests__/self-healing-tempdir-sweep.test.ts   | 52 +++++++++++++++++++---
 packages/engine/src/active-session-registry.ts     |  2 +-
 packages/engine/src/merger-ai.ts                   | 29 +++++++++++-
 packages/engine/src/self-healing.ts                | 28 +++++++++---
 packages/engine/vitest.config.ts                   |  1 -
 scripts/lib/test-quarantine.json                   |  5 ---
 8 files changed, 132 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-6244

Fusion-Task-Lineage: 5c8ced12-d38f-4e45-9ea0-119b3236a2cb
2026-06-11 15:54:49 -07:00
gsxdsm
8eb99ed0f8 FN-6217: prevent visibility-driven quick entry focus
Limit Quick Entry focus restoration to successful submissions instead of dashboard visibility changes.

- Gate desktop focus restoration behind an in-component successful submit marker.
- Remove the stale touch-driven suppressRefocus blur/timer path so touch actions do not force unexpected blurs.
- Cover mount, remount, mobile, submit, duplicate-confirm, Escape, Plan, and Subtask focus behavior in QuickEntryBox tests.
- Add a patch changeset for the published CLI package.

Files changed:
 .changeset/FN-6217-quick-entry-focus.md            |   5 +
 .../dashboard/app/components/QuickEntryBox.tsx     |  36 ++---
 .../components/__tests__/QuickEntryBox.test.tsx    | 167 +++++++++++++++++++--
 3 files changed, 174 insertions(+), 34 deletions(-)

Fusion-Task-Id: FN-6217

Fusion-Task-Lineage: cf8c55c0-583e-42f5-98af-8f3406c86d8c
2026-06-11 14:55:19 -07:00