Commit Graph

164 Commits

Author SHA1 Message Date
gsxdsm
cac08d733b chore(dashboard): fix lint and typecheck
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 22:20:22 -07:00
gsxdsm
6a6c6fdbfd perf(dashboard): speed up startup and eliminate API request storms
Multiple coordinated fixes for the perceived "dashboard takes forever to
load" complaint. Per-page-load HTTP requests drop from ~177 to ~101 and
duplicate per-project InProcessRuntime creation is eliminated.

- engine: shouldUseHybridExecutor no longer auto-enables for local-only
  multi-project setups (set FUSION_HYBRID_EXECUTOR=1 to force). The
  duplicate-runtime path was running self-healing twice per project and
  contending on the same SQLite file. ProjectEngineManager already
  handles N local projects with one InProcessRuntime each.
- dashboard cli: parallelized independent store inits, started
  CentralCore.init early in background, ran plugin loading concurrently
  with extension resolution. Sequenced SQLite store inits to avoid a
  TOCTOU race in addColumnIfMissing migrations across TaskStore /
  AutomationStore / PluginStore / AgentStore (all open the same
  .fusion/fusion.db). Restored try/catch around HybridExecutor.initialize
  and engineManager.ensureEngine so a paused or broken cwd project no
  longer aborts dashboard startup.
- dashboard client: added in-flight request dedupe wrapped around the
  top API offenders. /api/plugins/ui-slots drops from 17x to 1x per load.
  dedupe.forceFresh redirects ALL in-flight waiters to receive the fresh
  post-mutation response, not just the forcing caller. Generation
  counters in useAgents and AgentListModal protect against slow polls
  overwriting fresh state.
- dashboard SSE: agent event handler now debounces 250ms with a
  trailing-edge guard so multi-agent activity bursts coalesce to at
  most 2 refetches per burst.
- dashboard route: PATCH /api/projects/:id with isolationMode change
  returns 503 with actionable guidance when HybridExecutor is
  unavailable, instead of silently persisting a config the live runtime
  won't honor.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 21:57:31 -07:00
gsxdsm
1fb905afb7 feat(FN-5585): add planning branch controls to planning mode modal
Adds planning branch controls to the PlanningModeModal, extending the planning API and routes with supporting tests and documentation. The changeset bumps `@runfusion/fusion` as a minor release.

Fusion-Task-Id: FN-5585

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5585
2026-05-25 16:32:57 -07:00
gsxdsm
5eacd79b43 feat(FN-5584): merge fusion/fn-5584 2026-05-25 15:27:06 -07:00
gsxdsm
6aa1ff0fb5 feat(FN-5475): add allow-resurrection control to task delete flow
Implements the allow-resurrection toggle for task deletion, letting users prevent deleted tasks from being automatically restored. Changes span the `ConfirmDialog` component, `TaskDetailModal`, and the `useConfirm` hook, with comprehensive test coverage across the dashboard API and UI layers.

Fusion-Task-Id: FN-5475

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5475
2026-05-23 20:44:01 -07:00
gsxdsm
d5cfa92c23 fix(dashboard): close 7 review findings on extended-status hardening
Settings inheritance (high):
  - Restored the value !== initialProjectValue gate on the non-model
    project branch. Previously every effective/inherited project key was
    persisted as an explicit override on every save.

Git Manager UI lie in remote-only mode:
  - "Local <branch> vs origin" card now renders "no local tracking"
    instead of a green "Synced" badge when integrationTipSource ===
    "remote-only" (no local branch to compare).
  - New dedicated "HEAD vs origin/<branch>" card surfaces a meaningful
    distance in remote-only mode.

isIndexStale correctness:
  - Walks up to 16 reflog entries so multi-hop misses (A→B→C without
    sync) are detected; the prior check only consulted @{1}.
  - Gated on isOnIntegrationBranch === true so a feature-branch worktree
    whose HEAD happens to descend from <integration>@{1} no longer trips
    the FN-INDEX-DESYNC warning.

Enumeration-failed events surfaced:
  - collectRecentMergeAdvances pairs events with (taskId, newSha) when
    both are present, falls back to taskId-only for early-failure events
    (e.g. "enumeration-failed") that have neither path nor newSha. The
    diagnostic outcome now surfaces on the matching advance instead of
    being silently dropped.

aheadOfIntegration semantics no longer shift:
  - Split into three distinct fields: aheadOfIntegration (HEAD vs local),
    aheadOfIntegrationRemote (HEAD vs origin/<branch>),
    aheadOfOriginIntegration (local vs origin). Consumers no longer have
    to read integrationTipSource to know which comparison they got.

currentBranch failure no longer masks wrong-branch state:
  - Distinguish "command threw" (transient git error) from "command
    succeeded with empty stdout" (legitimate detached HEAD). New
    currentBranchDetectionFailed field lets the UI surface "branch
    detection unavailable" on a real failure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 17:31:39 -07:00
gsxdsm
ef12df4363 fix(dashboard): close 8 review findings on git-status + integration-branch setting
Settings (data-loss):
  - Non-model project keys now use null-as-delete instead of dropping
    undefined via JSON.stringify, so clearing Integration branch (Use
    dropdown / auto-detect) actually clears the persisted value.

isIndexStale (false-positive AND false-negative):
  - Replaced the empty-worktree heuristic with a reflog-anchored check:
    stale iff refs/heads/<integration>@{1} exists, HEAD is descendant of
    it, and `git diff-index --cached <prevTip>` is empty.

Auto-sync attribution in collectRecentMergeAdvances:
  - Match auto-sync events by (taskId, newSha) instead of taskId-only;
    re-merged tasks no longer have older advances mislabeled with the
    newest outcome.
  - Compare worktreePath after realpathSync on both sides; macOS symlink
    paths no longer cause permanent "needs action" false positives.

Extended path no longer 500s:
  - Route wraps computeExtendedGitStatus in try/catch and falls back to
    basic status on failure. Inner `branch --show-current` wrapped too
    so detached HEAD / non-git rootDir doesn't throw.

Integration branch falls back to remote-only ref:
  - When refs/heads/<branch> is missing, use refs/remotes/origin/<branch>
    as the integration tip. New `integrationTipSource` field
    ("local"|"remote-only"|"missing") drives a UI badge.

Copy commit hash:
  - Short-SHA copy is the default and matches what's displayed; a
    separate "full" button copies the 40-char headSha. Previously the
    single button silently copied the full SHA when extended was on.

Detached HEAD:
  - isOnIntegrationBranch left undefined when currentBranch is empty so
    the UI doesn't render "(not on <integration>)" against a
    no-branch state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 17:10:59 -07:00
gsxdsm
85786e7893 feat(dashboard): extended integration-branch status in Git Manager
Repository Status panel now answers "what is the actual state of my
project root vs the integration branch?" so operators can be sure of
the picture even when the Merge Advance Notice banner is dismissed.

GET /api/git/status accepts ?extended=1 and returns additional optional
fields:
  - integrationBranch + integrationBranchSource (settings|origin-head|fallback)
  - integrationTipSha / originIntegrationTipSha
  - aheadOfIntegration / behindIntegration (HEAD vs local integration tip)
  - aheadOfOriginIntegration / behindOriginIntegration (local tip vs origin)
  - dirtyDetails {staged, modified, untracked, conflicted, sample}
  - indexStaleVsHead (surfaces the FN-INDEX-DESYNC scenario)
  - stashCount
  - recentMergeAdvances: up to 5 merge:integration-ref-advance events
    joined with merge:auto-sync outcomes; needsAction flag flips when
    auto-sync didn't successfully bring this worktree forward

GitManagerModal renders all of it:
  - Existing cards get sub-text: branch shows "not on <integration>",
    Working Tree shows staged/modified/untracked/conflicted breakdown
  - Second row: Integration branch + source, HEAD-vs-integration,
    local-vs-origin, stash count
  - Yellow warning panel when indexStaleVsHead surfaces the merger's
    stale-index situation with a recovery hint
  - Recent integration-branch advances list, color-coded by needsAction,
    shows the per-advance auto-sync outcome so operators can audit
    even after dismissing the banner

All fetchGitStatus calls in GitManagerModal switched to extended:true.
Other callers unaffected — extra fields are optional.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 16:38:00 -07:00
Fusion (runfusion.ai)
6289d4a60b feat(FN-5439): add overlap blocker clear action
- Add overlap blocker clear validation patch in task workflow routes\n- Type updateTask fields for overlap blocker clear support\n- Add overlap blocker clear UI action in TaskDetailModal\n- Wire legacy API for overlap clear mutation\n- Add dashboard and modal rendering tests for overlap clear flows
2026-05-22 01:33:28 -07:00
Fusion (runfusion.ai)
b12ff26f36 feat(FN-5424): add opencode-go provider to settings with model refresh on k
Exposes the `opencode-go` provider via `startup-model-sync`, wires it into the daemon and serve commands, and adds a refresh-status indicator in the SettingsModal that triggers model reloading whenever the provider key is saved. Includes a changeset, settings documentation, and corresponding tests a

Fusion-Task-Id: FN-5424
2026-05-20 22:34:32 -07:00
gsxdsm
5548dc57de fix(dashboard): autostash dirty working tree across git pull and surface reapply conflicts
The dashboard's git pull endpoint failed outright when the working tree had
local edits or untracked files. It now stashes (including untracked) under a
fusion-dashboard-pull-autostash label, performs the pull, and reapplies the
stash. If reapplying conflicts, the stash is preserved and GitPullResult
surfaces autostashed/stashReapplied/stashConflict plus a message pointing at
the stash label so the user can resolve from the Stashes view.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 14:28:36 -07:00
Fusion (runfusion.ai)
1b49cbc94d feat(FN-5284): surface db corruption via health checks, self-healing, and d
- fix(FN-5284): add db corruption audit mutation type
- feat(FN-5284): complete Step 7 — document corruption surfacing
- feat(FN-5284): complete Step 6 — add db corruption banner
- feat(FN-5284): complete Step 5 — extend health payload
- feat(FN-5284): complete Step 3 — surface db corruption in self-healing
- feat(FN-5284): complete Step 2 — add db corruption notification event
- feat(FN-5284): complete Step 1 — expose integrity check errors

Fusion-Task-Id: FN-5284
2026-05-20 04:13:43 -07:00
Fusion (runfusion.ai)
e6c7dcdd64 feat(FN-5139): wire lineage unlink delete and archive flows
Fusion-Task-Id: FN-5139
Fusion-Task-Lineage: c16f4245-bfda-4b9a-bd98-ffc44b45f5a0
2026-05-19 18:56:24 -07:00
Fusion (runfusion.ai)
20ce7829c7 feat(FN-5141): complete Step 4 — document soft-delete API semantics
Fusion-Task-Id: FN-5141
Fusion-Task-Lineage: 2f90daca-c147-4807-b780-09f8f54580ae
2026-05-19 08:38:25 -07:00
Fusion (runfusion.ai)
5c3096c7d1 feat(FN-5083): complete Steps 5-7 rebind UI and reliability docs 2026-05-18 18:26:52 -07:00
gsxdsm
aad1219037 feat(FN-4967): merge fusion/fn-4967 2026-05-18 15:50:48 -07:00
gsxdsm
40cdf23cfd feat(FN-4966): complete Step 4 — wire diagnostics into PR refresh routes
Fusion-Task-Id: FN-4966
Fusion-Task-Lineage: 8f5ea300-feaa-469c-aeed-f7304a5a1b6d
2026-05-18 08:45:17 -07:00
gsxdsm
0b6d1594ce feat(FN-4983): merge fusion/fn-4983 2026-05-18 04:02:39 -07:00
Fusion (runfusion.ai)
566936663b feat(FN-5030): complete Step 2 - replace duplicate ActivityFeedEntry union
Fusion-Task-Id: FN-5030
Fusion-Task-Lineage: fdd10e2a-220a-47d3-9da0-075f5ba2695e
2026-05-18 01:56:58 -07:00
Fusion (runfusion.ai)
f5cd0dd472 feat(FN-4971): add PrInfo regression test
Adds a regression test for the PrInfo endpoint to guard against FN-4971, covering the legacy PR info API path in the dashboard package.

Fusion-Task-Id: FN-4971
2026-05-17 19:03:51 -07:00
gsxdsm
4dc281f5c3 feat(FN-4977): merge fusion/fn-4977 2026-05-17 17:42:04 -07:00
Fusion (runfusion.ai)
412ee29a24 fix(FN-4763): align PrInfo typing with mergeable conflict state
Fusion-Task-Id: FN-4763
Fusion-Task-Lineage: b3628e63-682b-4a39-9a7d-2c96278c5366
2026-05-17 13:46:24 -07:00
Fusion (runfusion.ai)
f8c20e1b96 feat(FN-4763): complete Step 5 — surface PR conflict reclaim in panel
Fusion-Task-Id: FN-4763
Fusion-Task-Lineage: b3628e63-682b-4a39-9a7d-2c96278c5366
2026-05-17 13:46:24 -07:00
Fusion (runfusion.ai)
73454fae5c feat(FN-4762): complete Step 3 — PR merge routes and dashboard controls
Fusion-Task-Id: FN-4762
Fusion-Task-Lineage: 5c7ef3b8-fefc-4cc2-a703-634124d77cde
2026-05-17 12:11:51 -07:00
gsxdsm
3c2bbf36c5 fix: add missing lastReviewDecision to legacy PrInfo type
PrPanel.tsx references prInfo.lastReviewDecision but the local
PrInfo interface in legacy.ts was missing this field, breaking
typecheck on main.
2026-05-17 12:10:14 -07:00
Fusion (runfusion.ai)
5bde911bdb feat(FN-4761): sync PR reviews and surface review threads
Fusion-Task-Id: FN-4761
Fusion-Task-Lineage: b6b1ed73-c396-4dd2-b97f-366272d05c7f
2026-05-17 11:39:19 -07:00
Fusion (runfusion.ai)
2a9ef2ba36 fix(FN-4905): unblock workspace verification type errors
Fusion-Task-Id: FN-4905
Fusion-Task-Lineage: 677b6f08-90d7-4785-a0b8-195acc42f79e
2026-05-17 09:51:49 -07:00
Fusion (runfusion.ai)
49daa3046d feat(FN-4760): complete Step 2 — add PR checks endpoint and client
Fusion-Task-Id: FN-4760
Fusion-Task-Lineage: 71db4a53-ee59-49f0-a1f7-232954b86660
2026-05-17 08:49:51 -07:00
Fusion (runfusion.ai)
c2b9533a41 feat(FN-4756): complete Step 1 — add PR client API wrappers
Fusion-Task-Id: FN-4756
Fusion-Task-Lineage: 9a559f69-3ca1-4d94-9b35-9c7a0849d82c
2026-05-17 03:13:57 -07:00
Fusion (runfusion.ai)
354dae2d54 feat(FN-4857): complete Step 3 — add room attachment API helpers
Fusion-Task-Id: FN-4857
Fusion-Task-Lineage: 52e7b1cd-ec8f-4b6c-abfc-08c91e321b9e
2026-05-17 01:37:38 -07:00
gsxdsm
df998cb54f feat(FN-4829): merge fusion/fn-4829 2026-05-16 22:26:42 -07:00
Fusion (runfusion.ai)
8405e1fce6 fix(FN-4786): align dashboard activity event typings
Fusion-Task-Id: FN-4786
Fusion-Task-Lineage: eb683ec8-8b9d-4e3d-852c-7076224afa6b
2026-05-16 18:40:05 -07:00
Fusion (runfusion.ai)
207b62a31d feat(FN-4739): complete Step 4 — add room clear API helper
Fusion-Task-Id: FN-4739
Fusion-Task-Lineage: fc120dfa-d1b2-4065-9595-d0bc6304d2af
2026-05-16 09:56:54 -07:00
Fusion (runfusion.ai)
0f67447fcc feat(FN-4735): complete Step 3 — add recent issues API helper
Fusion-Task-Id: FN-4735
Fusion-Task-Lineage: e171d3ca-d415-4f4d-8ec0-d94ca97f1aab
2026-05-16 09:21:06 -07:00
Fusion (runfusion.ai)
ad73d76586 feat(FN-4640): complete Step 6 — dashboard sandbox audit surface
Fusion-Task-Id: FN-4640
Fusion-Task-Lineage: 4a91265f-1714-4854-b08d-7ddb06074253
2026-05-15 16:19:42 -07:00
Fusion
505318a933 feat(FN-4589): add acceptanceCriteria field to legacy milestone types
Fixes the legacy milestone API in the dashboard to include `acceptanceCriteria` in milestone types, ensuring consistent data shape when milestone data is served through the legacy API endpoint.

Fusion-Task-Id: FN-4589
2026-05-15 04:48:18 -07:00
Fusion
e240993d5a feat(FN-4583): complete Step 4 — fetch newest chat room message window
Fusion-Task-Id: FN-4583
Fusion-Task-Lineage: 4d9b088d-a705-4376-b547-15b37e5370aa
2026-05-15 02:23:30 -07:00
Fusion
af92ee31d3 feat(FN-4554): complete Step 3 — add deviceCode API type
Fusion-Task-Id: FN-4554
Fusion-Task-Lineage: 12d517c5-1954-4b27-8c63-c7f0dde93d3f
2026-05-14 22:16:44 -07:00
gsxdsm
65fc47e141 Merge pull request #223 from corrm/feat/model-auto-detect
feat: auto-detect models from custom providers
2026-05-14 21:35:46 -07:00
Fusion
44f486f167 chore(FN-4490): fix duplicate noCommitsExpected type definition
Fusion-Task-Id: FN-4490
Fusion-Task-Lineage: 0194e9e4-c49c-4c18-b057-433a58062c75
2026-05-14 10:56:48 -07:00
Fusion
1c298c9cc2 feat(FN-4487): fix dashboard updateTask typecheck for noCommitsExpected
Fixed a TypeScript typecheck issue in the dashboard's `updateTask` function related to `noCommitsExpected`, addressing a type mismatch in the legacy API layer.

Fusion-Task-Id: FN-4487
2026-05-14 10:50:57 -07:00
Fusion
51a253e99f fix(FN-4489): include noCommitsExpected in dashboard updateTask type
Fusion-Task-Id: FN-4489
Fusion-Task-Lineage: 9f732400-0deb-4537-be92-cc58c815e9fd
2026-05-14 10:38:22 -07:00
Islam Nofl
55c35cf611 fix: Google provider save after model detection, SSRF protection, PR review fixes
- Add google-generative-ai to CustomProvider.apiType union type
- Update assertApiType to accept google-generative-ai in create/update
- Fix createCustomProvider mapping in legacy.ts for Google type
- Fix fetchCustomProviders mapping for Google type
- Add google-generative-ai to CustomProvidersSection API_TYPES
- Add SSRF protection to probeProviderModels (block private/loopback)
- Add body validation to probe-models route handler
- Update stale JSDoc in legacy.ts
2026-05-14 16:56:11 +03:00
Fusion
6b2607dae5 feat(FN-4400): complete Step 7 — add prompt-size api and dashboard sparkline
Fusion-Task-Id: FN-4400
Fusion-Task-Lineage: 0d4f9c48-5b8b-49eb-9cf3-d1d585ffe7fc
2026-05-14 04:32:43 -07:00
Fusion
6832875944 feat(FN-4378): complete Step 4 — plumb github issue action through API
Fusion-Task-Id: FN-4378
Fusion-Task-Lineage: d3867ba8-f852-41e3-9db0-584c0ffc23b1
2026-05-13 14:12:51 -07:00
Islam Nofl
a487a20bbc feat: auto-detect models from custom providers
Add 'Detect Models' button to custom provider forms that calls the
provider's /models endpoint to discover available models automatically.

- Supports OpenAI-compatible, Anthropic-compatible, and Google
  Generative AI providers
- Auto-fills context window and max tokens from provider response
- Filters out embedding, reranking, and non-text models
- Removes empty default model rows after detection
- Added comprehensive backend and frontend test coverage
2026-05-13 18:05:12 +03:00
Fusion
5c521434d2 feat(FN-4124): surface mission interview drafts across mission tooling
- Add dashboard API routes and mission interview store support to list and inspect draft missions
- Update Mission Manager UI to surface draft interview sessions with styling and regression coverage
- Extend CLI mission commands and extension tools to expose draft listings consistently
- Document the draft surfacing behavior and include a changeset for the published CLI package

Fusion-Task-Id: FN-4124
2026-05-12 19:38:39 -07:00
Fusion
15281c304e feat(FN-4192): add task ID integrity detection and dashboard alerts
Implements task ID integrity detection across the stack (FN-4192): a new `task-id-integrity` module in core provides detector logic wired into the store, integrity health is surfaced via the dashboard API and legacy endpoint, and a banner component surfaces alerts in the UI — backed by comprehensive

Fusion-Task-Id: FN-4192
2026-05-12 19:10:07 -07:00
Fusion
1241c0f12f feat(FN-4160): warn before OAuth login when manual code mode is active
Adds user-facing warnings before OAuth login flows in both onboarding and settings, surfacing that manual code authentication is available as an alternative, with corresponding documentation updates and test coverage for the new warning UI.

Fusion-Task-Id: FN-4160
2026-05-12 17:04:32 -07:00
Fusion
2d46a882f0 feat(FN-4078): add ntfy access token support to notifications
Adds ntfy access token support to Fusion's notification system, wiring the token through the core settings schema, dashboard UI (SettingsModal), engine notifier, and notification pipeline, with corresponding tests across core, dashboard, and engine packages; also updates settings and storage documen

Fusion-Task-Id: FN-4078
2026-05-12 07:47:11 -07:00