Commit Graph

59 Commits

Author SHA1 Message Date
Fusion (runfusion.ai)
1913cb59fe feat(FN-5389): add resume event instrumentation with SSE, hooks, and diagno
FN-5389 adds dashboard resume event instrumentation: a `resumeInstrumentation` utility captures SSE resume signals, wired through `useChat`, `useChatRooms`, and `useTasks` hooks, with remount markers in `Board` and `ChatView`; diagnostics routes expose resume events for observability, documented in

Fusion-Task-Id: FN-5389
2026-05-20 19:58:49 -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)
b6b1af240a docs(FN-5135): document dashboard soft-delete handling invariant
Fusion-Task-Id: FN-5135
Fusion-Task-Lineage: 182c496e-4e3a-4353-be53-86dd4cc5ba19
2026-05-19 08:13:07 -07:00
Fusion (runfusion.ai)
a17179b6b3 fix(FN-5135): suppress soft-deleted tasks across useTasks feeds
Fusion-Task-Id: FN-5135
Fusion-Task-Lineage: 182c496e-4e3a-4353-be53-86dd4cc5ba19
2026-05-19 08:13:07 -07:00
gsxdsm
f9cf3f1bde feat(FN-4921): merge fusion/fn-4921 2026-05-17 19:11:59 -07:00
Fusion (runfusion.ai)
3ba9e13f75 feat(FN-4924): complete Step 2-3 — tighten tasks hydration and failed-refresh cache clearing
Fusion-Task-Id: FN-4924
Fusion-Task-Lineage: a5f882e1-8348-4f9d-89be-15994adc148c
2026-05-17 12:41:21 -07:00
Fusion (runfusion.ai)
cf12704885 feat(FN-4924): apply cache ttl hydration across dashboard hooks
Fusion-Task-Id: FN-4924
Fusion-Task-Lineage: a5f882e1-8348-4f9d-89be-15994adc148c
2026-05-17 11:33:56 -07:00
Fusion (runfusion.ai)
228daa8f35 feat(FN-4854): complete Step 1 — extend cache keys and diagnostics
Fusion-Task-Id: FN-4854
Fusion-Task-Lineage: 969ec04a-efe3-4dee-b183-2d4f2de6b388
2026-05-17 00:43:47 -07:00
Fusion (runfusion.ai)
508ab73486 feat(FN-4780): complete Step 4 — cache hydrate useTasks
Fusion-Task-Id: FN-4780
Fusion-Task-Lineage: 7f052539-9d15-4997-8135-21434f065d4a
2026-05-16 13:24:52 -07:00
Fusion
16fa629a8e fix(FN-4595): preserve cumulative timing fields in sparse SSE merges
Fusion-Task-Id: FN-4595
Fusion-Task-Lineage: 73a3d0ad-5c10-4560-aec5-f9d138deeefd
2026-05-15 07:50:34 -07:00
Fusion
a44a621054 feat(FN-4593): complete Step 1 — expose useTasks refresh
Fusion-Task-Id: FN-4593
Fusion-Task-Lineage: c9153e3f-378c-46a2-901d-020ca4b3c027
2026-05-15 06:52:49 -07:00
Fusion
b21ad886c4 feat(FN-4412): complete Step 1 — wire bulk action handlers to ListView
Fusion-Task-Id: FN-4412
Fusion-Task-Lineage: 20883b92-0de6-4b95-b8f8-9075f1d9d54e
2026-05-13 19:33:34 -07:00
Fusion
d50ccdde69 fix(FN-4378): align delete option threading for github issue actions
Fusion-Task-Id: FN-4378
Fusion-Task-Lineage: d3867ba8-f852-41e3-9db0-584c0ffc23b1
2026-05-13 14:12:51 -07:00
Fusion
1f47e137f7 feat(FN-4023): preserve triage column when SSE updates contain only priorit
Fix FN-4023: preserve the triage column filter when SSE updates only carry priority changes, preventing unintended column resets during selective priority refreshes. Added regression tests across the task store, useTasks hook, and API routes to cover column-stability scenarios.

Fusion-Task-Id: FN-4023
2026-05-11 14:56:46 -07:00
Fusion
c17aba7031 feat(FN-3737): add even realities integration research report
Adds a new Even Realities integration research report to the documentation.

Fusion-Task-Id: FN-3737
2026-05-08 10:41:59 -07:00
gsxdsm
9c60eb2821 perf(merger): skip redundant in-merge verification and lockfile-stable installs
Two cuts to wasted work in the merge verification loop:

1. After the in-merge fix agent runs, fingerprint the working tree
   (`git diff HEAD` + `git status --porcelain`, sha256). If the post-fix
   fingerprint matches pre-fix and is non-empty, the agent didn't actually
   change anything — re-running the same failing command can only yield
   the same failure, so log and report the attempt as unsuccessful without
   paying the test/build cost. Empty fingerprints (snapshot tooling failed)
   fall through to the existing re-run path so we never silently swallow a
   real fix.

2. Inside `syncDependenciesForMerge`, hash the active lockfile and compare
   against `node_modules/.fusion-install-marker` (written after each
   successful install). When they match, skip `pnpm install
   --frozen-lockfile` even if `package.json` is staged. Covers the common
   case where `package.json` changes but the lockfile doesn't, and
   amortizes install across auto-recovery re-enqueues that hit the same
   worktree.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 12:24:57 -07:00
gsxdsm
004a0ad904 fix(dashboard): forward removeDependencyReferences flag in deleteTask
useTasks.deleteTask had a single-arg signature and dropped the options
object, so the modal's "remove dependency references" confirmation
flag never reached the API and deletion still failed with
TASK_HAS_DEPENDENTS. Forward options through the hook and widen the
matching taskOperations.deleteTask type in AppModals.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 06:49:05 -07:00
Fusion
fce79cece0 feat(FN-3185): preserve progress on task reset with explicit confirmation d
This merge implements a "preserve progress" option for task resets across the system. FN-3185 adds a `preserveProgress` flag to `moveTask` that keeps status/history when resetting tasks back to `todo`, with required explicit confirmation dialogs to prevent accidental resets. The feature is wired thr

Fusion-Task-Id: FN-3185
2026-05-02 10:20:44 -07:00
gsxdsm
0f4031824e fix: clear-search restores board and enable partial-match search
- useTasks debounced effect bailed when searchQuery transitioned back to
  undefined (App passes `searchQuery || undefined`), so clearing the
  input never refetched the unfiltered list. Track previous value via
  ref and only skip the initial mount.
- FTS5 search used bare tokens (exact term match), so "frob" did not
  match "frobnicator". Append `*` to each token (and to quoted tokens)
  for prefix matching. LIKE fallback already did substring matching.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 21:01:13 -07:00
gsxdsm
400be4487f feat(engine): preserve branches on auto-requeue + add fn_run_verification
Three coordinated fixes for the FN-2978 incident class — auto-requeues
that orphaned committed work and watchdog kills on long verification runs.

**Auto-requeue branch reuse** (executor.ts, worktree-pool.ts)
- executor.ts:1782 now uses `task.branch || fusion/<id>` so persisted
  branches are honored on requeue. Previously the hardcoded fallback
  always tried to re-create the original branch, hit a conflict with
  the prior run's ref, and got suffix -2/-3. Other call sites already
  honor task.branch — this aligns the worktree-acquisition path.
- worktree-pool.ts:181 prepareForTask now probes existing branches with
  `git rev-parse --verify` and checks them out as-is. Falls through to
  suffixed creation only when the branch is genuinely in use by another
  live worktree. Previously force-reset with `checkout -B`, destroying
  prior commits.
- New private reconcileStepsFromGitHistory walks `git log
  baseCommitSha..HEAD` for `feat(FN-X): complete Step N` commits and
  marks matching steps[] as done so resumes don't redo committed work.

**Manual reset endpoint + UI** (dashboard)
- POST /api/tasks/:id/reset (requires `confirm: true`) — clears worktree,
  branch, all retry counters, resets steps[] to pending, moves to todo.
  Distinct from /retry which is the soft-resume path.
- Reset button alongside Retry in TaskDetailModal with confirm dialog,
  wired through useTasks → AppModals → API.

**fn_run_verification tool** (run-verification-tool.ts, executor.ts)
- New custom tool wrapping test/lint/build commands with a heartbeat
  callback (per-line + 60s synthetic), 200KB head+tail output cap, hard
  timeout with SIGTERM→SIGKILL escalation, and auto-bootstrap detection
  for missing node_modules. Prevents the inactivity watchdog from
  killing sessions during long compiles.
- Cross-platform via `shell: true` (Node picks /bin/sh on POSIX,
  cmd.exe on Windows). Prompt section in EXECUTOR_SYSTEM_PROMPT and
  EXECUTOR_PROMPT_TEXT instructs agents to prefer package-scoped
  verification first and reserve workspace-scoped runs for final
  integration.

**Tests** (64 passing)
- detect-pseudo-pause.test.ts (27 tests) — covers all 7 regex patterns,
  structural fallback, FN-2978 regression text.
- reconcile-step-regex.test.ts (25 tests) — pins the commit-message
  regex against a wide variant set.
- run-verification-command.test.ts (12 tests) — basic execution, output
  capture, heartbeat callbacks, timeout, error handling. POSIX-specific
  cases (multi-cmd `;`, `>&2`, `\$USER`) gated behind itPosix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 10:19:54 -07:00
gsxdsm
ffa116a238 fix(FN-3005): preserve card timer across reruns 2026-04-29 23:13:38 -07:00
Fusion
9b53fa46e8 feat(FN-2975): merge fusion/fn-2975
- Stabilize QuickChatFAB search refresh lifecycle to prevent redundant or stale queries (`useTasks.ts`, `QuickChatFAB.tsx`)
- Add unit tests for QuickChatFAB component and `useTasks` hook
- Refactor QuickChatFAB styles and component structure

Commits merged:
- feat(FN-2975): complete Step 2 — stabilize search refresh lifecycle
- feat(FN-2972): merge fusion/fn-2972

Files changed:
packages/dashboard/app/components/QuickChatFAB.css | 60 ++++++++++++++++----
 packages/dashboard/app/components/QuickChatFAB.tsx | 65 +++++++++++-----------
 .../app/components/__tests__/QuickChatFAB.test.tsx | 32 +++++++++++
 .../dashboard/app/hooks/__tests__/useTasks.test.ts | 48 ++++++++++++++++
 packages/dashboard/app/hooks/useTasks.ts           |  4 +-
 5 files changed, 165 insertions(+), 44 deletions(-)

Fusion-Task-Id: FN-2975
2026-04-29 19:43:50 -07:00
gsxdsm
fb309e5eea fix(FN-XXX): show planning-created tasks without refresh 2026-04-29 15:25:06 -07:00
Fusion
38000ba839 feat(FN-2527): add bulk actions for in-progress and in-review columns
- Extend column action menus beyond Todo to include In Progress and In Review
- Add Stop All action that pauses only non-paused tasks with confirmation and success/error toasts
- Add Move All to Todo action with confirmation and partial-failure handling for bulk moves
- Thread pauseTask through useTasks, App, and Board so column menus can trigger task pausing
- Expand Column tests to cover new menu actions, disabled states, and bulk operation behavior
2026-04-25 15:11:54 -07:00
gsxdsm
ee25caeeb4 fix(dashboard): keep previous tasks visible during project switch
Dropping the render-phase setTasks([]) on projectId change avoids the
blank flash and full empty→populated Board reconcile that made project
switches feel like a multi-second hang. The existing fetch/version
guards already reject late responses and stale SSE events, so the
previous project's rows safely stay on screen until the new fetch lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 16:57:58 -07:00
Fusion
b80cae1b5a feat(FN-1850): aggregate projects across connected nodes
- Add /api/projects/across-nodes to merge local projects with online remote node project lists
- Expose fetchProjectsAcrossNodes and ProjectInfoWithSource, and switch useProjects to consume cross-node data
- Update ProjectOverview and ProjectCard with node badges, node count stats, and a node filter dropdown plus responsive styles
- Add server and dashboard test coverage for cross-node aggregation, filtering, and hook behavior changes
- Include a changeset for @gsxdsm/fusion minor release and preserve stale-channel SSE reconnect guards during merge
2026-04-18 03:08:00 -07:00
Fusion
01aeb449d7 fix(FN-2048): prevent stale SSE reconnects after channel teardown
- Add a closed flag to sse-bus channel state so teardown permanently disables reconnect scheduling
- Guard useTasks onReconnect callbacks against stale effect instances when toggling views
- Add regression tests for sse-bus and useTasks to ensure closed/unmounted channels do not reconnect
- Document the leak root cause and closed-flag pattern in .fusion/memory.md
2026-04-18 02:53:49 -07:00
Fusion
94df3daeac fix(FN-2024): gate task SSE subscriptions by active view
- Add an sseEnabled option to useTasks and skip SSE subscription setup when disabled
- Compute taskSseEnabled in App based on board/list views and pass it through to useTasks
- Migrate useRemoteNodeEvents from raw EventSource management to shared subscribeSse bus usage
- Update App, useTasks, and useRemoteNodeEvents tests to cover SSE gating and bus-based event wiring
2026-04-17 15:21:15 -07:00
Fusion
39e833b91e feat(FN-2014): merge fusion/fn-2014 2026-04-17 14:31:43 -07:00
gsxdsm
b467be1308 feat(FN-1657): merge fusion/fn-1657 2026-04-12 19:31:13 -07:00
gsxdsm
d2e9aafff9 feat(FN-1465): merge fusion/fn-1465 2026-04-12 07:00:49 -07:00
gsxdsm
39a0f783bf perf(dashboard): slim task list + auto-archive stale done tasks
GET /api/tasks was returning ~69 MB of JSON per call (67.9 MB of agent
logs across 1199 tasks), causing the dashboard to hang for 2+ minutes.

- core: extend listTasks() with slim and includeArchived options
- dashboard: GET /api/tasks now uses slim mode and excludes archived
  by default; ?includeArchived=1 opts in
- frontend: lazy-load archived tasks when the archived column is first
  expanded via new useTasks.loadArchivedTasks()
- engine: self-healing maintenance now auto-archives done tasks older
  than 48h (data stays in SQLite, column flips done -> archived)
- tests: slim mode + includeArchived coverage in store.test.ts;
  routes.test.ts assertion updated for new args

Also bundles in-progress test-setup noise filters and pre-existing
QuickEntryBox/routes test work that was already modified locally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 20:16:20 -07:00
gsxdsm
cf43e0413e fix: resolve dashboard performance bottlenecks causing sporadic hangs
The dashboard was sporadically hanging for several seconds during task
creation and settings loading due to multiple compounding issues:

- checkForChanges() polled every 1s with SELECT * FROM tasks + full
  JSON.stringify comparison, blocking the Node.js event loop. Now uses
  incremental polling (only changed tasks via updatedAt filter).
- allocateId() called readConfig() which always ran listWorkflowSteps(),
  adding unnecessary DB queries while holding the serialization lock.
  Now uses readConfigFast() that skips workflow steps.
- Task creation triggered listWorkflowSteps() up to 3 times per request.
  Added in-memory cache with invalidation on create/update/delete.
- Route handlers used getSettings() (slow path) where getSettingsFast()
  suffices (POST /tasks, GET /config).
- SSE effect in useTasks had searchQuery and refreshTasks in its
  dependency array, causing EventSource teardown/rebuild on every search
  change. Moved to refs since the EventSource URL doesn't use searchQuery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 11:01:15 -07:00
gsxdsm
697814d9e0 feat(FN-1260): add full-text search for tasks and comments
- Add FTS5 virtual table with v21 database migration for task search
- Add searchTasks() method to TaskStore with FTS5 query support
- Add q= search parameter to GET /api/tasks route for server-side search
- Update useTasks hook and frontend API to support searchQuery prop
- Update Board.tsx and App.tsx to pass searchQuery through component hierarchy
- Add comprehensive tests for FTS5 index and searchTasks functionality
2026-04-09 10:17:02 -07:00
gsxdsm
5c6a574b35 fix(FN-732): fix dashboard real-time updates and SSE pipeline
- Fix SSE event relay to properly broadcast task store events to dashboard clients
- Use named heartbeat events instead of SSE comments for reliable keep-alive
- Add missing event emission in core task store for state changes
- Add comprehensive tests for SSE pipeline, event emission, and UI hooks
- Remove broken useTerminal hook and AgentLogViewer tests, fix flaky test suites
2026-04-02 19:34:35 -07:00
gsxdsm
7fc187d9e6 feat(FN-723): add optimistic state insertion for createTask and duplicateTask
- Insert new tasks at correct sorted position in useTasks cache immediately on create/duplicate
- Compute insertIndex based on columnMovedAt/createdAt sorting to maintain board order
- Add comprehensive tests for optimistic insertion ordering in useTasks hook
- Cover edge cases: empty columns, single-item columns, and multi-item sorted columns
2026-04-02 18:47:38 -07:00
gsxdsm
1f8465342c fix(FN-000): scope dashboard project flows 2026-04-02 17:51:04 -07:00
gsxdsm
7631c79c26 chore: resolve merge conflicts 2026-04-02 09:29:31 -07:00
gsxdsm
1ccaf34d9b fix(FN-673): harden dashboard task resync and Claude usage handling
- resync dashboard tasks after stream reconnects and when the tab becomes visible again
- add regression coverage for stale board recovery and usage-fetch edge cases
- replace direct Claude usage API calls with the CLI-based usage command
- document the dashboard resync safeguards and include a published package changeset
2026-04-01 13:01:52 -07:00
gsxdsm
54f10ef641 feat(KB-662): refresh tasks when the dashboard regains focus
- Add a debounced visibilitychange refresh path to useTasks
- Reuse task normalization when refreshing task data from the API
- Preserve project-scoped fetching during initial and visibility-triggered reloads
- Add hook tests covering visibility refresh, normalization, debounce, and cleanup
2026-04-01 12:37:06 -07:00
gsxdsm
b9584da06c feat(FN-674): add multi-project dashboard support
- Add Project Overview page with responsive grid and health status cards
- Add Project Selector dropdown in header for quick context switching
- Add project drill-down navigation with task board/list views
- Add Setup Wizard components for first-run project registration
- Add global activity feed with project attribution and filtering
- Add project-aware task fetching to backend API
- Add project health polling and status badges
- Update ActivityLogModal with project filter and useActivityLog hook
2026-04-01 07:27:29 -07:00
gsxdsm
1e24e212f6 feat(KB-662): add visibility change listener with debouncing to task refresh
- Add visibilitychange listener in useTasks hook to refresh tasks when tab becomes visible
- Implement 1-second debounce to prevent rapid refetching on visibility changes
- Add comprehensive tests for visibility change behavior including debouncing
- Clean up unused variable in SettingsModal from merge conflict resolution
2026-04-01 07:05:49 -07:00
gsxdsm
54767f60eb feat(KB-648): enable parallel test execution and optimize test performance
- Optimize backup tests using fake timers instead of real timeouts

- Enable parallel file execution in core, engine, CLI, and dashboard packages

- Add inline test helpers to reduce dependencies in dashboard routes tests

- Update executor tests with exact command matching and improved assertions

- Update AGENTS.md with test optimization patterns (fake timers, unique temp dirs)
2026-04-01 06:54:50 -07:00
gsxdsm
2b1e342eaf feat(FN-674): implement multi-project dashboard UX
- Add Project Overview page with responsive grid and health status cards
- Add Project Selector dropdown in header for quick project switching
- Add Setup Wizard for registering new projects with auto-detection
- Implement project drill-down: click project to view its tasks
- Add global activity feed with cross-project activity log
- Add project health monitoring with real-time status polling
- Add deep linking support for tasks via ?task= URL parameter
- Add useTasks hook with project context filtering
- Add ntfy notification deep link to open tasks in dashboard
- Fix terminal error message formatting for agent failures
- Unify comment style across codebase (// instead of /** */)
- Add comprehensive tests for multi-project components
2026-04-01 01:36:24 -07:00
gsxdsm
9daffda83d feat(KB-662): add visibility change listener with debouncing
- Add page visibility change detection with debounced state handling

- Implement visibility listener for managing background task behavior

- Add comprehensive tests for debouncing and visibility transitions

- Resolve type conflicts in types.ts and SettingsModal.tsx
2026-03-31 23:32:06 -07:00
gsxdsm
4b39bf1f4c feat(KB-618): add multi-project support to dashboard
- Add project API methods and types (fetchProjects, registerProject, fetchProjectHealth, etc.)
- Add ProjectCard component with health metrics, status badges, and pause/resume actions
- Add server-side project management routes for multi-project orchestration
- Add ActivityFeed component with grouped entries and project badges
- Add SetupWizard component with 5-step project creation flow
- Fix TypeScript errors in server routes for listProjects and getGlobalConcurrencyState
2026-03-31 23:19:03 -07:00
gsxdsm
3dec4b4497 feat(KB-662): add visibility change listener with debouncing to useTasks hook
- Add visibilitychange event listener to refresh tasks when tab becomes visible
- Implement 1-second debounce to prevent excessive fetch requests
- Add comprehensive tests for visibility change behavior and debouncing
- Gracefully handle fetch errors during visibility changes
2026-03-31 22:50:27 -07:00
gsxdsm
38bb30de68 fix(KB-613): resolve status update race condition and fix stuck timeout units
- Add timestamp comparison logic in handleUpdated to prevent stale websocket data from overwriting newer task state
- Rename stuck timeout setting from minutes to milliseconds for finer control
- Add comprehensive tests for status update race condition scenarios
- Add changeset for status update race condition fix
2026-03-31 17:37:31 -07:00
gsxdsm
fc0411713c feat(KB-330): rename internal packages from @kb/* to @fusion/*
- Rename @kb/core, @kb/dashboard, @kb/engine to @fusion/* namespace
- Update all import statements across 143+ files to use new package names
- Update workspace dependencies and root package.json references
- Fix bundler configurations (tsup, vite) for new package names
- Update test files and fix typecheck issues
- Add changeset file documenting the package rename
2026-03-31 13:33:44 -07:00
gsxdsm
360f3e03b3 feat(KB-069): add Archive All Done feature
- Add archiveAllDone method to TaskStore with filtering and batch archive
- Add POST /tasks/archive-all-done API endpoint with tests
- Add useTasks hook support and API function for archiveAllDone
- Add Archive All button to done column header in Board UI
- Wire up onArchiveAllDone through Board component hierarchy
2026-03-30 16:50:34 -07:00