Commit Graph

12092 Commits

Author SHA1 Message Date
gsxdsm
84d7306bd3 FN-8546: fix ideation candidate discovery
Expose persisted ideation candidate identities so agents can select a candidate for convergence.

- Render candidate IDs, provenance, source references, and content in show and diverge responses.
- Cover discover-to-converge behavior, duplicate content, empty sessions, and missing sessions.
- Document the direct candidate-ID convergence workflow and add a patch changeset.

Files changed:
 .changeset/fn-8546-ideation-candidate-ids.md       |  7 ++
 docs/agent-tool-surface-full-loop.md               |  4 +-
 docs/ideation/persisted-diverge-converge.md        |  6 +-
 .../src/__tests__/agent-ideation-tools.test.ts     | 93 +++++++++++++++++++---
 packages/engine/src/agent-tools.ts                 | 23 +++++-
 5 files changed, 116 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-8546

Fusion-Task-Lineage: 7232701f-5c6b-40fc-8d46-d65b97af9c0a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 12:26:02 -07:00
gsxdsm
ff165ecb5a fix: scope beta release notes to that beta's changesets; stable keeps full-cycle rollup
Pre-mode preserves consumed changeset .md files, so every beta's distilled notes and GitHub prerelease body aggregated the entire cycle since the last stable (v0.73.0-beta.4 shipped the full 0.72.0→0.73.0 aggregate). Betas now distill only changesets not yet recorded in pre.json's consumed ledger, and fail loudly when a beta would ship nothing new. Stable promotion still feeds the full preserved set, keeping its notes an explicit rollup of every beta in the cycle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 12:18:24 -07:00
gsxdsm
c4292b25ef FN-8539: make Planning Mode selection-driven
Make Planning Mode refine repository-grounded plans through successive operator choices.

- Offer concrete directions and Other for vague planning openers
- Rebuild running plans around selected options, multi-selections, and Other responses
- Add selection-loop coverage and operator documentation

Files changed:
 .changeset/fn-8539-option-driven-planning.md       |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 .../__tests__/planning-infinite-interview.test.ts  | 131 ++++++++++++++++++++-
 .../planning-interview-formatters.test.ts          |  37 ++++--
 packages/dashboard/src/planning.ts                 |  34 +++---
 5 files changed, 185 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-8539

Fusion-Task-Lineage: 585bae1e-6d9e-4733-b787-77b70a7d1259

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 12:08:58 -07:00
gsxdsm
3f976e3dca FN-8538: give Planning Mode a dedicated collaborative prompt
Planning Mode now uses a standalone collaborative prompt rather than inherited task-triage instructions.

- Resolve the Planning Mode default independently of workflows and triage assignments.
- Preserve explicit full-system prompt overrides and update prompt-setting documentation.
- Cover dedicated prompt behavior and add the published-package changeset.

Files changed:
 .changeset/fn-8538-planning-prompt.md              |  7 +++
 docs/dashboard-guide.md                            |  3 +-
 .../core/src/__tests__/prompt-overrides.test.ts    |  7 +++
 packages/core/src/prompt-overrides.ts              |  8 ++-
 packages/dashboard/app/utils/builtinPrompts.ts     |  8 ++-
 .../__tests__/planning-infinite-interview.test.ts  | 60 +++++++++++++++++++++-
 .../__tests__/planning-prompt-resolution.test.ts   | 47 ++++++++++-------
 packages/dashboard/src/planning.ts                 | 46 +++++------------
 8 files changed, 130 insertions(+), 56 deletions(-)

Fusion-Task-Id: FN-8538

Fusion-Task-Lineage: 36e0665d-7995-4bc5-9c73-948f7f4e9131

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 11:41:15 -07:00
gsxdsm
d6d8a5e919 FN-8537: keep planning actions visible on mobile
Keep Planning Refine and Proceed controls visible across mobile plan-review hosts.

- Make the plan document pane the responsive scroll owner while preserving its action rail.
- Cover portrait and short-landscape embedded and modal layouts with CSS and browser tests.
- Add a patch changeset for the mobile planning action fix.

Files changed:
 .changeset/fn-8537-mobile-planning-actions.md      |  7 ++++++
 .../dashboard/app/components/PlanningModeModal.css | 25 ++++++++++++++++++++++
 .../__tests__/PlanningModeModal.css.test.ts        | 17 +++++++++++++++
 .../src/__tests__/planning-browser-e2e.test.ts     | 20 +++++++++++++++--
 4 files changed, 67 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-8537

Fusion-Task-Lineage: 7a53aa74-859d-4c76-bf26-ab6ea72873dd

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 11:03:33 -07:00
gsxdsm
2499803c73 fix: guard CE sessions against concurrent-turn displacement and harden JSON-protocol parsing
Port the planning turn-admission invariant (FNXC:PlanningTurnAdmission,
2026-07-22) into the Compound Engineering orchestrator: at most one turn
(opening/answer/resume-rehydration) is admitted per CE session, reserved
synchronously and held until the turn settles — a re-entered mobile view
re-submitting a turn now gets CeTurnInProgressError (HTTP 409) instead of
displacing the in-flight turn's live agent, which surfaced as "Failed to
parse agent response: AI returned no valid JSON". cancel()/discard()
force-clear the reservation; releases are token-scoped so a stale release
can't drop a newer turn's slot.

In the engine interactive-ai-session seam: bump the reformat retry from
one to two attempts (non-Anthropic default models comply less reliably
with the JSON-only protocol), and log every failed parse with a bounded
raw-response snippet plus resolved provider/model — including a distinct
empty-assistant-message marker — so support can diagnose these reports
without a repro.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 10:31:22 -07:00
gsxdsm
492d375e8f FN-8536: fix planning retry ownership after failure
Release a settled retry token so a later planning error can start the next bounded attempt.

- Clear only the matching retry owner before scheduling its successor.
- Cover distinct stream errors after retry settlement.
- Add a patch changeset for the recovery fix.

Files changed:
 .changeset/fn-8536-planning-retry.md                           |  7 +++++++
 packages/dashboard/app/components/PlanningModeModal.tsx        | 10 ++++++++++
 .../__tests__/PlanningModeModal.planning-flow.test.tsx         |  5 +++++
 3 files changed, 22 insertions(+)

Fusion-Task-Id: FN-8536

Fusion-Task-Lineage: cccb0793-390e-4bdb-b459-939760e644bb

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 10:25:16 -07:00
gsxdsm
2df0c7e90b fix(#2411): recover from a stale postmaster.pid instead of joining a dead port
After a hard host crash (SIGKILL, power loss), postmaster.pid survives with no
postmaster behind it. The optimistic join handed every subsequent boot a URL to
the dead port, so the dashboard could never start again without a manual pid
delete. Probe the recorded pid with signal 0: provably dead (ESRCH) rebuts the
live-lock presumption and the boot takes an owned start — PostgreSQL itself
re-validates and reclaims the stale lock file, so a recycled live pid keeps the
old join-then-fail behavior and a genuinely live postmaster still surfaces the
lock collision we already join on. EPERM counts as alive (fail-closed).

Verified end to end: real cluster started, postmaster SIGKILLed leaving the pid
file + interrupted WAL, fresh lifecycle detected the stale lock, ran an owned
start, and crash recovery preserved the marker row.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 10:00:09 -07:00
gsxdsm
5a5796bca2 fix: show session loader instead of Generating while planning mode hydrates from DB
Reloading Planning re-entered the generation view ("Generating initial
plan…", Stop button, elapsed timer, 8s watchdog) while merely fetching a
persisted session. A new session_loading view state renders a neutral
"Loading session…" spinner during hydration; the generating view is
reserved for sessions the server reports as generating. Unrecognized
persisted session shapes now land in the retryable error view instead of
spinning forever.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 09:55:52 -07:00
gsxdsm
b4856e3c1e fix: separate Docker app root from project mount so -v host mounts work (#2414)
The runner stage installed the application at /project, which was also the
documented bind-mount point — mounting a host project there shadowed the CLI
and the container exited with MODULE_NOT_FOUND on packages/cli/dist/bin.js.

- Install the app under /app and run the entrypoint by absolute path.
- Reserve /workspace (empty in the image, container workdir) as the project
  mount point.
- Update docs/docker.md: mount at /workspace, and document that embedded
  Postgres/global state lives in /home/node/.fusion with a named-volume
  example so persistence actually captures it.

Verified: image builds; `docker run -v host:/workspace` boots, embedded
Postgres initializes, /api/health returns ok.

Fixes #2414

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 09:50:24 -07:00
gsxdsm
42fe154abe FN-8533: add mobile planning comment actions
Make contextual plan comments reachable from the mobile action rail and restore focus after editing.

- Add responsive desktop and mobile comment triggers with contextual styling and documentation.
- Preserve the selected quote and restore the remounted trigger after canceling or adding a comment.
- Cover action placement, focus restoration, and browser interaction behavior.

Files changed:
 .changeset/fn-8533-mobile-planning-comments.md     |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 .../dashboard/app/components/PlanningModeModal.css |  20 ++++
 .../dashboard/app/components/PlanningModeModal.tsx |  44 ++++++-
 .../__tests__/PlanningModeModal.css.test.ts        |  10 ++
 .../PlanningModeModal.planning-flow.test.tsx       |  40 +++++--
 .../PlanningModeModal.ui-interactions.test.tsx     |   5 +
 .../dashboard/app/planning-browser-e2e-fixture.tsx |   3 +-
 .../src/__tests__/planning-browser-e2e.test.ts     | 133 +++++++++++++++++++--
 packages/dashboard/vitest.config.ts                |  11 +-
 scripts/lib/test-quarantine.json                   |   5 -
 11 files changed, 242 insertions(+), 38 deletions(-)

Fusion-Task-Id: FN-8533
Fusion-Task-Lineage: e0d561be-ecc8-456e-807e-a1dc677b5d9c
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 09:33:25 -07:00
gsxdsm
75e1e735a5 FN-8535: stabilize planning modal retry tests
Stabilize PlanningModeModal retry-flow coverage by isolating shared state and awaiting delayed claims.

- Add a test-only reset seam for persistent planning retry budgets.
- Reset modal test state and timers between cases.
- Cover delayed active-create claims before a new session starts.

Files changed:
 packages/dashboard/app/components/PlanningModeModal.tsx | 11 +++
 packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx | 83 ++++++++++++++++++++--
 2 files changed, 89 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-8535

Fusion-Task-Lineage: dd770632-d73c-4d18-9bb3-d8f0a7eec397

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 09:16:39 -07:00
gsxdsm
dc132071d5 fix(#2411): let embedded PostgreSQL crash recovery finish instead of racing it
beta.4 follow-up from the issue thread: on an interrupted (not-cleanly-shut-down)
cluster, the elevated Windows launcher declared readiness on a bare TCP accept
while crash recovery still rejected every connection with 57P03, so
ensureDatabase failed and the start cleanup fast-shutdown the recovering
postmaster ~0.2s after launch; the retry then joined the instance it had just
told to stop, got ECONNREFUSED, and parked the dashboard in a dead shell. The
30s ".pgrunner sharing violation" stall was recovery's SyncDataDirectory fsync
walk hitting Fusion's own pgctl log inside the data dir.

- Move the pgctl runner dir to a sibling .pgrunner-<dataDirName> outside the
  data dir (and sweep the legacy in-dataDir .pgrunner), so recovery's fsync
  walk can never contend with the postmaster's inherited log handle.
- Ignore 57P03 recovery rejections in the elevated readiness fatal scan.
- Owned starts wait for the cluster to genuinely accept connections (retrying
  57P03/socket errors, bounded by the start timeout) before ensureDatabase —
  never stop a postmaster that is still in recovery.
- Join-path database verify retries the 57P03 recovery signal for up to 15s;
  socket errors keep the instant optimistic-join contract for stale pids.
- startup-factory's joined-instance-unreachable retry backs off across ~15s
  instead of a single 500ms attempt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 09:13:21 -07:00
gsxdsm
d2e41e490f FN-8534: honor workflow planning-model precedence
Honor selected workflow planning models for Planning Mode sessions.

- Resolve selected workflow planning lanes against the project baseline.
- Route complete request and workflow pairs through canonical planning-model resolution.
- Cover new and draft planning sessions, test mode, and settings documentation.

Files changed:
 .changeset/fn-8534-planning-workflow-model.md      |  7 ++
 docs/settings-reference.md                         |  2 +
 .../__tests__/workflow-settings-resolver.test.ts   | 73 ++++++++++++++++
 packages/core/src/index.gate.ts                    |  1 +
 packages/core/src/index.ts                         |  1 +
 packages/core/src/workflow-settings-resolver.ts    | 80 +++++++++++-------
 .../src/__tests__/routes-planning.test.ts          | 97 ++++++++++++++++++++++
 .../src/routes/register-planning-subtask-routes.ts | 48 ++++++++---
 8 files changed, 267 insertions(+), 42 deletions(-)

Fusion-Task-Id: FN-8534

Fusion-Task-Lineage: e6b5b546-b9f1-49c5-b680-90f24e856458

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 08:53:06 -07:00
gsxdsm
575171c54c FN-8532: fix planning stream validation state
Keep planning streams non-terminal until explicit validation.

- Clear stale generation metadata when validating a planning session
- Cover replay and response flows that defer completion until validation

Files changed:
 .../src/__tests__/routes-planning.test.ts          | 113 ++++++++++++++++-----
 packages/dashboard/src/planning.ts                 |  10 ++
 2 files changed, 97 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-8532

Fusion-Task-Lineage: 8c0ec4fc-c438-47c9-b0b0-12b116a2debd

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 01:46:50 -07:00
gsxdsm
3b45364180 FN-8531: fix planning route test plugin store setup
Restore planning route fixtures for the plugin-store context binding and current validation checkpoint flow.

- provide inert plugin-store and durable planning creation mocks
- update planning stream and response assertions for validation questions
- keep terminal stream fixtures settled before completion events

Files changed:
 .../src/__tests__/routes-planning-tracking.test.ts | 13 ++++
 .../src/__tests__/routes-planning.test.ts          | 73 ++++++++++++++++------
 2 files changed, 66 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-8531

Fusion-Task-Lineage: e1e2fae5-2410-4b02-a2e6-6994f936ee56

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 01:28:41 -07:00
gsxdsm
ebbb5948ab FN-8529: add contextual plan review comments
Enable operators to submit selected-plan suggestions through the existing Planning Mode revision flow.

- Capture text selections, batch suggestions, and retain retryable comment submissions in the Planning Mode UI.
- Validate bounded comment payloads and format them for the existing planning session update path.
- Document the workflow and add coverage for ordering, retry behavior, and selection boundaries.

Files changed:
 .changeset/fn-8529-planning-comments.md            |   7 +
 docs/dashboard-guide.md                            |   4 +
 packages/dashboard/app/api/legacy.ts               |   1 +
 packages/dashboard/app/api/planning.ts             |   9 +-
 .../dashboard/app/components/PlanningModeModal.css |  86 ++++++++++++
 .../dashboard/app/components/PlanningModeModal.tsx | 144 ++++++++++++++++++++-
 .../PlanningModeModal.planning-flow.test.tsx       |  39 ++++++
 .../PlanningModeModal.ui-interactions.test.tsx     |  10 ++
 .../__tests__/planning-infinite-interview.test.ts  |  62 +++++++++
 packages/dashboard/src/planning.ts                 |  76 ++++++++++-
 .../src/routes/register-planning-subtask-routes.ts |  27 +++-
 11 files changed, 455 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-8529

Fusion-Task-Lineage: c7064d76-effd-4597-a2b4-03f344dd59b9

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 00:56:47 -07:00
gsxdsm
5f3f7709da FN-8530: link GitHub Import to source issues
Make GitHub import provenance a direct, single source-issue link.

- Link the GitHub Import label whenever source metadata contains a URL.
- Preserve a plain provenance label when no source URL is available.
- Cover desktop, compact, nonstandard URL, and absent URL rendering.

Files changed:
 .../dashboard/app/components/TaskDetailModal.tsx   | 38 +++++++------
 .../__tests__/TaskDetailModal.rendering.test.tsx   | 66 ++++++++++++++--------
 2 files changed, 64 insertions(+), 40 deletions(-)

Fusion-Task-Id: FN-8530

Fusion-Task-Lineage: 03f899c2-2a3b-4b27-9bb6-b4db12667bb0

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-23 00:38:18 -07:00
gsxdsm
a45d82d09b chore(release): v0.73.0-beta.4
Version bump via changesets.
2026-07-23 00:16:34 -07:00
gsxdsm
616653588c refactor: package code organization wave 15 (#2394)
## Summary

Wave 15 of package code organization.

### Peels
- `types/settings-scope.ts` — global/project settings (~2.2k lines)
- `types/archive-planning.ts` — archive, mesh/multi-project, planning
sessions
- `task-store/project-store-ops.ts` — rename of `remaining-ops-1` (last
numbered ops module)

### LOC
- `types.ts` ~5872 → ~3074

## Test plan
- [x] `@fusion/core` typecheck
- [ ] CI merge gate

**Stack:** this PR → #2397 → #2398

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

* **Refactor**
* Reorganized and expanded the core public type surface into dedicated
modules for settings, archive/planning, board, tasks, todo lists, plugin
activation, and multi-project setup.
* Improved the browser-safe type exports to keep the public contracts
consistent.
* Updated internal project-level operation wiring to use the correct
project implementations.
* **Bug Fixes**
* Fixed a workflow creation test hook to inject the correct pre-insert
behavior for workflow-definition collision/allocator scenarios.
* **Chores**
  * Refreshed internal headers and updated line-count baselines.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-23 00:01:24 -07:00
gsxdsm
6111a6e3f2 fix(ci): full-suite bookkeeping v31 after origin/main (#2408)
## Summary

Restore full-suite green after latest `origin/main` landings. PR #2392
already merged; this branch starts from current main.

- **ExecutorStatusBar mobile utility test:** assert `Waiting` (product
rename from Queued) and that the In Review segment is gone.
- **AppearanceSection task-popup help:** assert FN-8478 fallback copy
(board deep-tab chips + List row/card + right-dock → movable popup).
- **Changeset format gate:** shorten
`mobile-board-pointercancel-settle.md` summary to ≤120 chars (was
blocking `pnpm test:gate` on main).

## Context

Latest main Full Suite run failed primarily on dashboard app quality
backfill:
- https://github.com/Runfusion/Fusion/actions/runs/29970703115

## Test plan

- [x] `pnpm test:gate` ×2
- [x] `utility-mobile.test.tsx` + `AppearanceSection.test.tsx`
- [x] `settings-default-descriptions.test.tsx`
- [ ] CI PR checks / Full Suite on this branch

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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved mobile board column snapping when resting mid-screen,
flinging past columns, or making unintended swipes.
* Updated task status labels to show “Waiting,” “Running,” and
“Blocked.”
* Refined help text for opening tasks as popups, including click-target
and subsequent-task behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-23 00:00:45 -07:00
gsxdsm
016221c6a8 feat(chat): ground agent chat answers in live codebase investigation (#2416)
## Summary

- Add `CHAT_CODEBASE_ACCURACY_GUIDANCE` so agent chat (direct +
multi-agent rooms) investigates the live checkout with tools before
answering code/architecture questions.
- Soften chat’s pure brevity default for repo questions: still lead
short, but keep real path/symbol evidence (parity with the investigation
pressure that makes Planning Mode more accurate).
- Cover the constant and assembly via unit tests; include a patch
changeset for `@runfusion/fusion`.

## Why

Users reported Planning Mode was more accurate about the codebase than
agent chat. Plan mode inherits the triage seam’s “read/grep first, name
real files” contract; chat only had a short helpful-assistant persona
plus a brevity default, so models often answered from priors.

## Test plan

- [x] `pnpm --filter @fusion/dashboard exec vitest run
src/__tests__/chat-system-prompt.test.ts
src/__tests__/chat-manager.test.ts`
- [ ] Manually ask agent chat a project-specific architecture question
and confirm it greps/reads before answering with real paths
- [ ] Confirm non-code chat still stays short/crisp
- [ ] Confirm multi-agent room responders also receive the new guidance

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

* **Improvements**
* Improved repository/code answers by investigating the live codebase
first and prioritizing verified paths and symbols over speculation.
* Refined response-length behavior so code questions stay
evidence-focused, while non-code questions remain concise.
* Applied consistent accuracy guidance across both direct and room-based
conversations.
* **Bug Fixes**
* Prevented chat instructions from depending on unavailable mailbox
functionality, improving reliability for agentless/room flows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-23 00:00:22 -07:00
gsxdsm
fc4f5aa0e4 fix(dashboard): stop Planning Mode duplicate generations, 'AI returned no valid JSON' errors, and context-overflow failures (#2417)
## Symptom

Users reported Planning Mode regularly failing with **"AI returned no
valid JSON.. Retry this planning session or start a new one."**, and
that leaving and returning to the interface mid-generation **duplicates
the generation — infinitely**. Every app-tab switch unmounts the
Planning view, so the leave/return path is the *normal* path, not an
edge case.

## Root causes

1. **Check-then-act turn admission.** `activeGenerations.has()` was
checked at turn entry, but the record was only created inside
`runGenerationWithTimeout`, after several awaits. Overlapping turn
entries (remounted view re-submitting, racing auto-retries, duplicate
start of an existing session) both passed the guard; the second
displaced the first, and the displaced teardown disposed the
**session-shared agent the surviving turn was actively prompting** —
which then read an empty assistant message and failed parse with "AI
returned no valid JSON".
2. **Per-mount auto-retry budget.** The client reset its 3-attempt
auto-retry budget on every mount, so each return to an errored session
re-ran a full-turn regeneration (agent rebuild + complete history
replay) — forever.
3. **SSE replay appended onto existing output.** Fresh stream
connections replay buffered thinking; the client pre-seeded from
persisted `thinkingOutput` (or kept prior output on silent reconnect)
and then appended the replay — visibly doubling the generation on every
reconnect. The 100-event buffer only held a suffix of a turn, forcing
that pre-seed.
4. **Raw `session.prompt()` at context limits.** A long interview that
overflowed the model's context window errored terminally, and auto-retry
replayed the full history into a fresh agent — overflowing again,
unrecoverably.

## Fix

- Synchronous per-session **turn reservation** shared by
`submitResponse`, `retrySession`, `startExistingSession`, and the
initial turn; losers get `GenerationInProgressError` instead of
displacing the winner. Duplicate starts of a generating session are
no-ops. Rewind aborts an active generation through its own teardown
first.
- Client auto-retry budget is **module-scoped per session** (survives
remounts); exhausted budget shows the error view instead of a stuck
spinner. Retry rejections for "already in progress" rejoin the live run.
- Fresh SSE connections **clear streamed output before the buffered
replay**; buffer deepened to a full turn (2000 events); rejoin paths
reconnect cleanly instead of seeding persisted thinking.
- All six planning prompt sites route through the engine's
**`promptWithFallback`**, recovering context-window overflows via
prompt/memory compaction and `session.compact()`.
- Cosmetic: no more doubled period in the retryable parse error message.

## Symptom Verification

- **Original symptom:** "AI returned no valid JSON" after answering
questions; generations duplicating on leave/return.
- **Exact reproduction:** concurrent turn entries on one session
(submit×2, retry×2, start-while-generating) — previously
displaced/disposed the live agent mid-prompt.
- **Assertion it is gone:** `planning-turn-admission.test.ts` asserts
exactly one turn is admitted per race, the winner completes with a
question and no session error, and the shared agent is never disposed;
`planning-context-compaction.test.ts` asserts every planning prompt
routes through `promptWithFallback` (signal forwarded) and that a
recovered context overflow leaves the turn healthy.

## Verification

- `vitest run` on all 7 planning server test files + the 2 new
regression files: **40/40 pass**.
- `routes-planning*` failures at main tip are pre-existing (identical
103/126 + 3/6 counts with and without this diff; main is mid-refactor on
route wiring). `planning-answered-question-reemit` 3 timeouts also
reproduce on clean main.
- `pnpm verify:fast` green; dashboard `tsconfig.json` +
`tsconfig.app.json` typechecks clean; eslint clean on touched files.

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

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

* **Bug Fixes**
* Prevented Planning Mode from duplicating generations and triggering
“AI returned no valid JSON” errors when leaving and re-entering mid-run.
* Made planning turn handling concurrency-safe and idempotent across
submit, retry, rewind, and duplicate start actions.
* Improved SSE reconnect recovery: clearer replay after reconnect, no
duplicated “thinking” output, and preserved auto-retry limits across
remounts.
* Improved long-context recovery via fallback prompting and cleaned up
retry error formatting.

* **Tests**
* Expanded coverage for concurrent Planning actions, reconnect replay,
context compaction, rewind behavior, and retry formatting; improved
parallel test-harness reliability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 23:59:31 -07:00
gsxdsm
e5d6be4123 Fix Windows embedded PostgreSQL 0xC0000142 crashes (issue #2411) (#2418)
## Summary

Two-part fix for #2411 — Windows embedded PostgreSQL backends dying with
exception `0xC0000142` and taking the whole dashboard down.

### 1. Crash hardening + recovery (FN-8522)
- Child-only native `PATH` hardening so forked backends can always
resolve their runtime DLLs.
- Non-blocking `.pgrunner` log monitoring (shared read), eliminating the
self-inflicted ~30s `sharing violation` retry window at boot.
- Detection of the ordered 0xC0000142 shutdown sequence with a single
automatic restart of owned clusters on their resolved port, plus
operator diagnostics.

### 2. Platform-aware `max_connections` default (follow-up from
[operator
report](https://github.com/Runfusion/Fusion/issues/2411#issuecomment-5054900702))
On Windows every PostgreSQL connection is a separate process; the
embedded cluster's unconfigured `max_connections=500` cap lets backend
spawn bursts exhaust the non-interactive desktop heap, which kills
forked backends with exactly `0xC0000142`. The reporter confirmed
stability after lowering the cap.

- `embeddedPostgresMaxConnections` is now schema-unset so the server can
distinguish "operator never set it" from an explicit choice
(`getSettings()` merges schema defaults, which previously pinned 500
unconditionally and made the runtime fallback dead code).
- New `resolveEmbeddedMaxConnections()` resolves the unset default
platform-aware: **150 on win32, 500 elsewhere**. Explicit settings are
honored on every platform, clamped to [32, 2000] as before.
- Settings UI renders the cap empty ("auto") with platform-aware help
copy across all six locales.
- Fixed a latent reset bug this exposed: global "Reset this menu" wrote
`undefined` for undefined-default keys, which JSON serialization drops —
the stored value silently survived reset. Now uses null-as-delete.

## Testing
- New unit tests for `resolveEmbeddedMaxConnections` (platform defaults,
clamping, non-integer handling).
- Updated settings-defaults, default-descriptions, and SettingsModal
tests; embedded lifecycle + recovery coverage from FN-8522.
- `@fusion/core` builds clean; changesets included for both parts.

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 23:41:48 -07:00
gsxdsm
7a552832f4 FN-8528: normalize Settings navigation icon sizing
Normalize Settings navigation icons into uniform fixed slots across desktop rows.

- Move scope-icon styling into the Settings modal component stylesheet.
- Reserve consistent non-shrinking icon dimensions for custom and fallback section icons.
- Add desktop and mobile regression coverage for icon-slot behavior.

Files changed:
 .../dashboard/app/components/SettingsModal.css     | 14 +++++++++----
 .../__tests__/SettingsModal.navResize.test.tsx     | 24 ++++++++++++++++++++++
 .../components/__tests__/settings-mobile.test.tsx  |  3 ++-
 packages/dashboard/app/styles.css                  | 12 -----------
 4 files changed, 36 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-8528

Fusion-Task-Lineage: fd78495d-a2d3-4786-bc1a-919d51049e66

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 23:11:47 -07:00
Victor Canô
64661c3ae1 feat(dashboard): stable theme token contract and plugin overlay layering (#2415)
## Summary

Gives dashboard integrators (plugin views, embedded panels, theming
tools) a supported way to match the dashboard's look and to layer
overlay UI correctly — instead of scraping computed styles and guessing
z-index values. This implements the CSS-token bridge slice of
`docs/proposals/2026-07-01-dashboard-theme-plugin-system.md`.

Two additions, both inert unless used:

1. **Documented theme-token contract.** A "Theme tokens" section in
`docs/dashboard-guide.md` (referenced from `docs/PLUGIN_AUTHORING.md`)
declares the stable set of CSS custom properties — colors, surfaces,
status colors — that integrators may read. Tokens resolve to raw color
strings (e.g. `#161b22`) in every theme, including the newer ones. A
sync test (`theme-token-contract-docs.test.ts`) parses the doc's token
table and asserts each documented token has a real definition in the
dashboard CSS, so the contract cannot silently drift from the code.

2. **Overlay layering surface.** Overlay-style UI (palettes, pickers,
floating panels) currently has no supported way to sit above the
floating-window stack — the effective max z-index is runtime state
inside `floatingWindowStack.ts`. This PR exposes it:
- `--fusion-max-z` on `:root` — kept in sync by `floatingWindowStack`
(written at module load and after every `nextFloatingZ()` claim), so it
always reflects the true top of the dashboard-managed stack. Boot/floor
value is `11001`, chosen to clear the highest statically-declared layer
(the body-portaled model-combobox dropdown at `z-index: 11000`).
- `#plugin-overlay-root` — an empty, `pointer-events: none` sibling of
`#root` stacked at `calc(var(--fusion-max-z) + 1)`. React never renders
into it, so it is hydration-safe; integrators portal into it and
re-enable pointer events on their own elements.
- The layer bands (base UI / floating windows / toasts / dropdown /
overlay root) are documented in `styles.css` and the guide, and a guard
test (`dashboard-max-z-guard.test.ts`) scans the structural + component
CSS and fails if any static `z-index` is ever introduced above the floor
— keeping the contract honest as the codebase evolves.

## Behavior

No visual or behavioral change for existing users: `floatingWindowStack`
still returns the same values from `nextFloatingZ()`; the overlay root
is empty and click-through; tokens were already defined — this only
documents and guards them.

## Tests

- `theme-token-contract-docs.test.ts` — docs ↔ CSS sync
(non-tautological: anchored matching against real definitions).
- `floatingWindowStack.max-z.test.ts` — `--fusion-max-z` boot value and
live tracking as the stack claims z-indexes.
- `dashboard-max-z-guard.test.ts` — no static dashboard z-index above
the floor (decorative `public/theme-data.css` INT_MAX scanline overlay
deliberately excluded; it's non-interactive grain, documented in the
test).
- Changeset included (`minor`, `category: feature`). Typecheck clean.

## Open question for maintainers

The token is named `--fusion-max-z`. The existing scale uses `--z-*`
names (`--z-dropdown`, `--z-modal`) on a lower band — happy to rename to
`--z-max` / `--z-plugin-overlay` or anything that fits your convention;
the name is the only bikeshed here, the sync mechanism is independent of
it.

## AI assistance disclosure

Parts of this change were authored with AI assistance (Anthropic's
Claude); the commit carries a `Co-authored-by` trailer accordingly.
Everything was human-reviewed before submission, and the test suite and
typecheck were run locally against the current `main`.

If squash-merging with a rewritten message, please keep the attribution:

```
Co-authored-by: Claude <noreply@anthropic.com>
```


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

- **New Features**
- Added stable dashboard theme tokens for consistent plugin/integration
styling.
- Introduced a dedicated plugin overlay mount point with click-through
defaults and an overlay stacking ceiling.
- Overlay z-index now stays in sync with floating window layering
automatically.

- **Documentation**
- Added an explicit stable “theme token contract” and “overlay layering
contract,” including interaction and z-index usage rules and deprecation
expectations.

- **Bug Fixes**
- Improved reliability of plugin overlay stacking so overlay content
renders above intended dashboard layers.

- **Tests**
- Added guards validating CSS z-index ceilings and enforcing the
documented theme token contract.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-22 23:04:33 -07:00
gsxdsm
a224c11110 fix(dashboard): keep chat Latest button centered while pressed
The jump-to-latest button is centered via transform: translateX(-50%), and
the global .btn:active scale transform replaced it wholesale on mousedown,
shifting the button out from under the cursor mid-click. Compose both
transforms on :active (same fix as the DevServer new-logs button).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 23:01:51 -07:00
gsxdsm
4ef94e667d FN-8523: gate retained SQLite scans by completion marker
Keep completed SQLite migration sources inert across PostgreSQL startups.

- Gate core, central identity, and plugin reads on independent completion markers.
- Preserve PostgreSQL project identity before recording a legacy-central migration as complete.
- Cover completed backup and pending-core central-marker startup paths.

Files changed:
 .changeset/fn-8523-skip-completed-sqlite-rescan.md |   7 ++
 docs/storage.md                                    |   2 +
 .../src/__tests__/postgres/sqlite-migrator.test.ts |  15 +++
 .../postgres/startup-factory-integration.test.ts   | 111 ++++++++++++++++++++-
 packages/core/src/postgres/sqlite-migrator.ts      |  28 ++++--
 packages/core/src/postgres/startup-factory.ts      |  86 +++++++++++-----
 6 files changed, 212 insertions(+), 37 deletions(-)

Fusion-Task-Id: FN-8523

Fusion-Task-Lineage: 1a05b90d-23df-4423-8346-abd6ef35f4df

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 22:57:41 -07:00
gsxdsm
e16204deef FN-8522: fix Windows embedded PostgreSQL crash recovery
Harden Windows embedded PostgreSQL startup and recover once from owned-cluster DLL initialization crashes.

- Provide child-only native PATH hardening and non-blocking runner-log monitoring.
- Detect the ordered 0xC0000142 shutdown sequence and restart only owned clusters on their resolved port.
- Add lifecycle coverage and operator diagnostics for recovery behavior.

Files changed:
 .../fn-8522-windows-embedded-postgres-recovery.md  |   7 ++
 docs/diagnostics.md                                |  10 ++
 docs/storage.md                                    |   6 +
 .../__tests__/postgres/embedded-lifecycle.test.ts  |  87 ++++++++++++++
 .../postgres/embedded-windows-elevated.test.ts     |  49 ++++++++
 packages/core/src/postgres/embedded-lifecycle.ts   | 128 ++++++++++++++++++---
 .../core/src/postgres/embedded-windows-elevated.ts | 119 +++++++++++++++++--
 7 files changed, 382 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-8522

Fusion-Task-Lineage: f256e421-d82e-4afb-9f81-b5c18f1c7100

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 22:43:51 -07:00
gsxdsm
de5d446b5c FN-8526: add custom workflow column descriptions
Enable custom workflow authors to define and display descriptions for board columns.

- Persist optional descriptions in workflow column definitions and API responses.
- Add editor controls and board tooltips for column descriptions.
- Cover validation, API, and dashboard behavior with tests and documentation.

Files changed:
 .changeset/fn-8526-workflow-column-descriptions.md |  7 +++
 docs/dashboard-guide.md                            |  4 ++
 .../src/__tests__/workflow-ir-validation.test.ts   | 30 +++++++++++
 packages/core/src/workflow-ir-types.ts             |  4 ++
 packages/core/src/workflow-ir.ts                   |  9 ++++
 packages/dashboard/app/api/board-workflows.ts      |  2 +
 packages/dashboard/app/components/Board.tsx        |  3 ++
 packages/dashboard/app/components/Column.tsx       | 14 +++--
 .../app/components/WorkflowColumnPanel.tsx         | 31 ++++++++++++
 .../app/components/WorkflowNodeEditor.css          | 41 +++++++++++++++
 .../app/components/__tests__/Column.test.tsx       | 19 +++++++
 .../__tests__/WorkflowColumnPanel.test.tsx         | 38 ++++++++++++++-
 .../app/components/__tests__/WorkflowNodeEditor.test.tsx | 19 +++++++
 .../app/components/workflow-flow-mapping.ts        |  1 +
 packages/dashboard/app/styles.css                  |  8 +++
 .../src/__tests__/board-workflows.test.ts          | 59 ++++++++++++++++++++++
 packages/dashboard/src/routes/board-workflows.ts   |  3 ++
 17 files changed, 288 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-8526

Fusion-Task-Lineage: df26b7c0-301c-4875-b100-d63d0cfecf85

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 22:37:51 -07:00
gsxdsm
25cd42d020 FN-8527: theme imported task stats links
Make imported-source links in the shared Stats panel follow the active dashboard theme.

- Style imported task links with the dashboard accent and accessible focus treatment.
- Cover safe themed external links across shared Stats surfaces.
- Add a patch changeset for the user-facing visual fix.

Files changed:
 .changeset/fn-8527-themed-stats-link.md            |  7 +++++
 .../app/components/TaskTokenStatsPanel.css         | 15 +++++++++++
 .../app/components/TaskTokenStatsPanel.tsx         |  7 ++++-
 .../__tests__/TaskTokenStatsPanel.test.tsx         | 30 ++++++++++++++++++++++
 4 files changed, 58 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-8527

Fusion-Task-Lineage: c7ee16ea-23e7-462d-a5c6-799fe0ede62d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 22:20:03 -07:00
gsxdsm
adf51e21d7 fix(dashboard): dispatch plugin routes dynamically per request
Plugin-defined HTTP routes were a boot-time snapshot of the launch
project's PluginLoader, while dashboard views/UI slots resolve a
project-scoped loader live per request. Two failure modes survived the
961edf214 no-engine mount fix: a plugin enabled after boot rendered its
view while every API route 404'd until restart, and a plugin enabled
only in a non-launch project never got routes mounted at all (Compound
Engineering "Failed to load sessions: Not found" on v0.73.0-beta.3).

Routes are now dispatched per request through the same
getProjectPluginLoader cache (moved from the plugins registrar into
routes/context.ts) that serves dashboard-views and enable/disable, with
the host loader + PluginRunner tables unioned in (project entries win,
loader beats runner). The compiled dispatch sub-router is cached per
resolved loader and rebuilt only when the route signature changes, so
views and routes agree by construction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 22:11:31 -07:00
gsxdsm
28e8c0abc9 FN-8524: cover workspace manifests in Docker builds
Ensure the builder install layer includes every selected workspace manifest.

- Copy the five omitted plugin manifests before frozen installation.
- Validate pre-install Dockerfile coverage against pnpm workspace entries.
- Document the manifest coverage requirement and focused test command.

Files changed:
 Dockerfile                                         |   8 +-
 docs/docker.md                                     |   3 +-
 .../dockerfile-workspace-manifests.test.mjs        | 111 +++++++++++++--------
 3 files changed, 78 insertions(+), 44 deletions(-)

Fusion-Task-Id: FN-8524

Fusion-Task-Lineage: 16a4d9df-ff08-4051-9e53-0da414ef6a85

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 22:04:32 -07:00
gsxdsm
059b9549a9 FN-8521: separate runtime installation from toggles
Keep built-in runtime installation distinct from project-scoped enablement.

- Show enable/disable toggles only for installed runtime plugins.
- Prevent toggles from registering or reinstalling uninstalled runtimes.
- Update plugin lifecycle documentation and regression coverage.

Files changed:
 .../fn-8521-separate-plugin-install-toggle.md      |  7 ++
 docs/dashboard-guide.md                            |  2 +-
 docs/plugin-management.md                          |  2 +-
 .../dashboard/app/components/PluginManager.tsx     | 74 ++++------------------
 .../components/__tests__/PluginManager.test.tsx    | 30 ++++++---
 .../__tests__/PluginManager.toggle.test.tsx        | 51 +++++++--------
 6 files changed, 67 insertions(+), 99 deletions(-)

Fusion-Task-Id: FN-8521

Fusion-Task-Lineage: 0de225f4-1d9c-411e-b5cc-851d3579a2ec

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 20:55:27 -07:00
gsxdsm
0e2aa49f8d FN-8520: hide uninstalled runtimes from Settings
Keep Settings runtime navigation synchronized with installed runtime plugins.

- Filter runtime sections to installed plugins while preserving disabled installed runtimes
- Refresh runtime navigation after plugin lifecycle events and direct plugin mutations
- Add Settings coverage and document runtime visibility behavior

Files changed:
 .changeset/fn-8520-runtime-sidebar.md              |  7 +++
 docs/dashboard-guide.md                            |  2 +-
 .../dashboard/app/components/PluginManager.tsx     | 10 +++-
 .../dashboard/app/components/SettingsModal.tsx     | 70 +++++++++++++++++++++-
 .../__tests__/SettingsModal.general.test.tsx       | 58 ++++++++++++++++++
 .../__tests__/SettingsModal.test-harness.tsx       |  2 +
 .../components/__tests__/settings-mobile.test.tsx  |  1 +
 .../settings/sections/PluginsSection.tsx           |  6 +-
 8 files changed, 149 insertions(+), 7 deletions(-)

Fusion-Task-Id: FN-8520

Fusion-Task-Lineage: 914ae503-e1b0-4051-bc01-4da950bf55b3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 20:38:25 -07:00
Fusion
96a9da7979 FN-8505: notify operators of terminal task wedges
Deliver durable, actionable notifications when terminal task recovery wedges.

- Persist and deduplicate terminal wedge notification episodes across task updates and service restarts.
- Classify terminal failure and self-healing escalation states, then deliver actionable ntfy and mailbox alerts.
- Align PostgreSQL baseline and upgrade migration registration for the durable wedge field.

Files changed:
 .changeset/fn-8505-task-wedge-notifications.md     |   7 +
 docs/agents.md                                     |   4 +
 docs/architecture.md                               |   4 +
 .../core/src/postgres/migrations/0000_initial.sql  |   2 +
 .../migrations/0033_fn-8505_wedge_notification.sql |   5 +
 packages/core/src/postgres/schema-applier.ts       |  29 +++-
 packages/core/src/postgres/schema/project.ts       |   1 +
 packages/core/src/store.ts                         |  22 ++-
 packages/core/src/task-store/persistence.ts        |   2 +
 packages/core/src/task-store/serialization.ts      |   1 +
 packages/core/src/task-store/task-row-mappers.ts   |   2 +-
 packages/core/src/task-store/task-update.ts        |   5 +
 packages/core/src/types.ts                         |  14 ++
 packages/core/src/types/workflow-steps.ts          |   2 +
 .../src/__tests__/notification-service.test.ts     |  20 +++
 packages/engine/src/__tests__/notifier.test.ts     |  26 +++-
 packages/engine/src/__tests__/self-healing.test.ts |   9 +-
 .../__tests__/notification-service.test.ts         |  34 ++++-
 .../__tests__/task-wedge-notification.test.ts      | 134 +++++++++++++++++
 .../src/notification/notification-service.ts       | 108 +++++++++++++-
 packages/engine/src/notification/ntfy-provider.ts  |  11 ++
 .../src/notification/task-wedge-notification.ts    | 160 +++++++++++++++++++++
 packages/engine/src/notifier.ts                    |   3 +
 packages/engine/src/self-healing.ts                |  17 +++
 24 files changed, 610 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-8505
Fusion-Task-Lineage: eee85220-18ba-475d-9d01-dc96e2b923e6
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 20:07:48 -07:00
gsxdsm
2cbb80c501 chore(release): v0.73.0-beta.3
Version bump via changesets.
2026-07-22 19:37:44 -07:00
gsxdsm
e8317e703f fix(core,dashboard): review fixes — reject date/UUID dedup anchors; gate provenance issueUrl links to http(s)
Code-review findings on 085f7b99c: a bare date like 2026-07-22 qualified
as a distinctive slug, so unrelated failure reports quoting the same date
silently converged (and the date outranked a real file-path anchor in the
sorted-first pick); reject slugs whose segments are all hex/numeric.
Also render non-http(s) sourceMetadata.issueUrl values as plain text to
block javascript:-scheme links from API-supplied metadata.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 19:28:51 -07:00
gsxdsm
8814925209 FN-8504: restore in-flight chat state after re-entry
Restore authoritative streaming state when users return to an active chat session.

- Delay stream attachment until the authoritative session snapshot is loaded
- Guard stream callbacks and SSE updates by selection incarnation
- Cover re-entry, stale refresh, and transcript restoration scenarios
- Add a patch changeset for the chat-state fix

Files changed:
 .changeset/fn-8504-chat-reentry-state.md           |   7 +
 .../__tests__/ChatView.streaming-thread.test.tsx   |  47 ++++
 .../dashboard/app/hooks/__tests__/useChat.test.ts  | 245 ++++++++++++++++++++-
 packages/dashboard/app/hooks/useChat.ts            | 159 +++++++++----
 4 files changed, 408 insertions(+), 50 deletions(-)

Fusion-Task-Id: FN-8504

Fusion-Task-Lineage: 0b339eb9-78d1-4db5-ae3a-e8314380662c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 19:20:55 -07:00
gsxdsm
24a60dbba3 FN-8510: shorten mobile board changeset summary
Clarify the mobile board fix in the published changeset summary.

- Describe interrupted swipes, flings, and vertical card scrolling
- Preserve the existing patch release metadata

Files changed:
 .changeset/mobile-board-pointercancel-settle.md | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)

Fusion-Task-Id: FN-8510

Fusion-Task-Lineage: 7dd3b7f8-3eb5-4ef9-93d6-404408b3608b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 19:14:02 -07:00
gsxdsm
085f7b99c8 fix(core): converge cross-parent duplicate follow-ups naming the same failing file; surface task provenance in Stats tab
Widen computeCrossParentDiagnosticClaim so repair tasks phrased as
'exceeds limit / oversized / blocking X / so X passes' converge on a
file-path or distinctive-slug anchor at creation time (FN-8510/8511/
8513/8514 incident: four executors on unrelated parents filed the same
oversized-changeset follow-up and none deduped before triage).

Add a Provenance section to the Task Detail Stats tab showing source
type, parent task, creating agent, imported-issue link, and the triage
near-duplicate marker.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 19:10:06 -07:00
gsxdsm
fd9e4b2a30 FN-8509: create Coding Ideas Start tasks in Todo
Coding Ideas Start now atomically creates tasks in the validated Todo column.

- Resolve Todo only from captured, visible Coding Ideas workflow metadata.
- Preserve explicit Start destinations through Board and List create hosts without a follow-up move.
- Add regression coverage, documentation, and a patch changeset.

Files changed:
 .changeset/fn-8509-coding-ideas-start-todo.md      |  7 +++++
 docs/dashboard-guide.md                            |  4 +--
 packages/dashboard/app/components/Column.tsx       |  8 +++++-
 packages/dashboard/app/components/ListView.tsx     |  5 ++++
 .../dashboard/app/components/QuickEntryBox.tsx     | 17 +++++++-----
 .../app/components/__tests__/Column.test.tsx       | 16 ++++++++++-
 .../app/components/__tests__/ListView.test.tsx     | 31 +++++++++++++++++++++-
 .../components/__tests__/QuickEntryBox.test.tsx    | 31 ++++++++++------------
 .../app/utils/__tests__/quickAddStart.test.ts      | 25 ++++++++++++++++-
 packages/dashboard/app/utils/quickAddStart.ts      | 21 ++++++++++++++-
 10 files changed, 134 insertions(+), 31 deletions(-)

Fusion-Task-Id: FN-8509

Fusion-Task-Lineage: 951599a0-f277-4499-aaea-90371ddeda72

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 19:08:47 -07:00
gsxdsm
1cd06746fe FN-8502: add photo and file attachments to Chat and Quick Add
Enable supported photo and file attachment workflows across Quick Add and Chat.

- Expand Quick Add and Chat picker, paste, and drag/drop attachment intake.
- Preserve pending attachments until direct and room sends are accepted, with accessible previews and retry support.
- Align Chat MIME and size validation with task attachments, including video, Markdown, and TOML support.
- Add regression coverage for attachment previews, delivery behavior, and accepted MIME types.

Files changed:
 .changeset/fn-8502-chat-quick-add-attachments.md   |   7 ++
 docs/dashboard-guide.md                            |   5 +-
 ... quick-entry-attachment-preview-modal.test.tsx} |  50 ++++++--
 packages/dashboard/app/components/ChatView.tsx     |  80 +++++++++++--
 .../dashboard/app/components/InlineCreateCard.tsx  |   6 +-
 .../app/components/PendingAttachmentPreviews.css   |  60 ++++++++++
 ...ePreviews.tsx => PendingAttachmentPreviews.tsx} |  68 ++++++-----
 .../app/components/PendingImagePreviews.css        |  35 ------
 .../dashboard/app/components/QuickEntryBox.tsx     | 127 +++++++++++++--------
 packages/dashboard/app/components/TaskForm.tsx     |   6 +-
 .../__tests__/ChatView.core-interactions.test.tsx  |  61 ++++++++--
 .../__tests__/ChatView.mobile-render.test.tsx      |  20 +++-
 .../components/__tests__/ChatView.rooms.test.tsx   |  27 ++++-
 .../components/__tests__/QuickEntryBox.test.tsx    |  59 ++++++++--
 packages/dashboard/app/hooks/useChat.ts            |  41 ++++++-
 .../src/__tests__/chat-attachment-content.test.ts  |  17 +++
 packages/dashboard/src/chat-attachment-content.ts  |   4 +-
 .../dashboard/src/routes/chat-attachment-config.ts |  16 +++
 .../src/routes/register-chat-room-routes.ts        |   9 +-
 .../dashboard/src/routes/register-chat-routes.ts   |  11 +-
 20 files changed, 534 insertions(+), 175 deletions(-)

Fusion-Task-Id: FN-8502

Fusion-Task-Lineage: 0205187c-7e5b-45f8-a71d-fcfd9fb01e65

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 18:46:46 -07:00
gsxdsm
227281dc32 FN-8503: preserve unbounded Code Review retries
Keep Code Review remediation retry policies accurate across graph execution and recovery.

- Preserve unlimited retry presentation when Code Review has no configured cap
- Enforce finite Code Review caps during failed-step recovery
- Validate non-negative revision settings and document the active retry policy

Files changed:
 .../fn-8503-unbounded-code-review-retries.md       |   7 ++
 docs/workflow-steps.md                             |   2 +-
 .../core/src/__tests__/builtin-workflows.test.ts   |   8 +-
 packages/core/src/builtin-workflow-settings.ts     |   4 +
 .../workflow-graph-optional-step-fix.test.ts       | 135 +++++++++++++++++++++
 packages/engine/src/executor.ts                    |  51 ++++++--
 6 files changed, 193 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-8503

Fusion-Task-Lineage: 7bd555d1-23e5-42ea-b6f5-0b9fe4da7f94

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 18:32:36 -07:00
gsxdsm
f120e6c879 FN-8506: run static checks in verify:fast
Run canonical pretest validators before test-free verification work.

- Derive read-only static check steps from the root pretest script.
- Test fail-fast static-check planning and execution.
- Document the expanded verify:fast gate and correct changeset metadata.

Files changed:
 .changeset/mobile-board-pointercancel-settle.md |   2 +-
 docs/testing.md                                 |   5 +-
 scripts/__tests__/verify-fast.test.mjs          | 105 ++++++++++++++++++++++--
 scripts/verify-fast.mjs                         |  86 ++++++++++++++++---
 4 files changed, 174 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-8506

Fusion-Task-Lineage: 87f74fda-1fd0-4e08-9bfe-51e0c4c9a31d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 18:26:33 -07:00
gsxdsm
edaa793b62 fix(core): legacy adoption must preserve statuses with live writers (FN-8504 incident)
The KTD-8 adoption sweep runs on every store open, and a DB with active tasks
never records the drained marker, so it re-runs constantly. Its resume-graph
mapping for 'planning' cleared FN-8504's freshly written live planner status
~100ms after triage claimed it (audit: task:reconcile-legacy-adoption,
priorStatus 'planning'), leaving a live replan planner rendered as an idle
READY card and invisible to every Running count.

Generalize the FN-8498 needs-replan fix: any status with a live post-cutover
writer is preserved — planning (triage's stale-planning sweep owns crash
recovery), queued (scheduler re-evaluates each poll), merging/merging-pr/
merging-fix (self-healing stale-merge recovery), stuck-killed (restart-
recovery coordinator). Only writer-less statuses (plan-review-unavailable,
triaged) keep resume-graph.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 18:16:00 -07:00
gsxdsm
3f7c6e4848 fix(dashboard): count visibly active cards (REVISING replans) in column header processing count
A Todo card parked in the durable needs-replan stage keeps its REVISING badge
and activity chrome (FN-8494), but the header only counted live agents, so it
read 0/2 under a glowing card. Union the shared Running predicate with the
card's own activity predicate (same globalPaused/stuck gates) so the header
equals the number of visibly active cards. Footer Running and admission keep
live-agent-only truth: a parked replan must not consume concurrency capacity.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 18:01:34 -07:00
gsxdsm
295226ea64 FN-8501: align mobile task-detail footer actions
Align the mobile task-detail Move action with the footer edge.

- Let the footer spacer absorb surplus mobile width instead of the Move dropdown.
- Cover canonical footer order and triage actions-absent behavior.
- Add a patch changeset for the mobile footer fix.

Files changed:
 .changeset/fn-8501-mobile-footer-alignment.md      |  7 ++++
 .../dashboard/app/components/TaskDetailModal.css   |  8 ++++-
 ...etailModal.responsive-and-dependencies.test.tsx | 40 ++++++++++++++++++++++
 3 files changed, 54 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-8501

Fusion-Task-Lineage: a87bb5af-d16e-4ca8-9111-3168c8440f14

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-22 17:56:27 -07:00
gsxdsm
c61336d24c fix(dashboard): stop vertical card scrolls paging the board and let re-drags override pending snaps
Two mobile board gesture fixes: (1) finger travel only counts as horizontal
pan intent when it dominates the vertical axis, so scrolling a column's card
list with incidental diagonal drift no longer swipes to another column; (2)
the commit-one-column paging clamp applies only to gestures begun at rest
centered on a column — a tap-to-stop mid-momentum followed by a drag settles
on the nearest column at the drag's landing point instead of being forced a
column past it by the interrupted scroll's origin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 17:51:54 -07:00
gsxdsm
e9ff8a55ca fix(core): count live optional-gate sessions (code review, plan review) as running agents
An In Review column with one MERGING task and one live CODE REVIEW task showed
1/2 processing: gate sessions run with task.status left null, so the shared
isRunningAgentTask predicate only saw the merge-pipeline statuses. Count a
pending workflow-step-result lease (the durable live-gate signal; FN-8492
fails orphaned ones) as Running on any unpaused, non-terminal row. Covers
plan review, code review, browser verification, post-merge verification, and
custom optional steps across column headers, footer stats, admission, and CLI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 17:35:14 -07:00