Commit Graph

4639 Commits

Author SHA1 Message Date
Fusion
087a67bcaa feat(FN-2183): add dev server management modules
- Add typed dev server models and constants for configs, session state, runtime metadata, and bounded log history
- Add JSON persistence helpers for .fusion/devserver.json with tolerant parsing and session reconstruction
- Add dev command auto-detection across root and workspace package.json scripts with framework inference and priority sorting
- Implement DevServerManager lifecycle controls, preview URL detection, port probing fallback, and singleton manager helpers
- Add Vitest coverage for devserver types, detection/persistence behavior, and manager lifecycle/events
2026-04-20 22:45:26 -07:00
Fusion
3a9ab4171a feat(FN-2173): add auto-fallback flow for dev server preview
- Add preview embed diagnostics with richer error classification and fallback state handling
- Improve PreviewIframe and DevServerView retry UX for timeout and iframe failure states
- Adjust preview layout/styles to prevent clipping and header overflow while keeping fallback panels centered
- Expand dashboard tests to cover fallback transitions, retry flows, and responsive CSS behavior
2026-04-20 22:10:07 -07:00
Fusion
b0defea550 feat(FN-2172): add embedded dev server preview panel
- Add usePreviewEmbed hook to derive preview embed URLs and availability state
- Add PreviewIframe component with iframe load/error wiring and deduplicated error callbacks
- Integrate preview panel actions, fallback messaging, and embedded iframe rendering in DevServerView
- Expand test coverage for usePreviewEmbed, PreviewIframe, and DevServerView preview integration scenarios
2026-04-20 19:48:32 -07:00
Fusion
64f5c0862b fix(FN-2199): normalize heartbeat settings dirty state in agent config
- Display heartbeat interval and timeout in seconds while persisting runtimeConfig in milliseconds
- Convert derived and persisted heartbeat values before dirty-state comparison so unchanged settings keep Save Settings disabled
- Update heartbeat validation minimums, placeholders, and hints to align with seconds-based inputs
- Expand AgentDetailView tests for pre-filled values, unchanged-state save disabling, validation, and payload conversion
2026-04-20 18:44:40 -07:00
Fusion
e6b2685e24 fix(FN-2200): log stale-session eviction failures
- Replace the silent stale-session eviction catch with a terminal error log in setupTerminalWebSocket
- Add regression tests that assert evictStaleSessions runs on each 60s interval tick
- Verify eviction errors are logged without stopping future ticks and interval cleanup runs on server close
2026-04-20 18:29:59 -07:00
Fusion
dfcb0868a2 feat(FN-2201): make Run Now available for active agents
- Show Run Now controls in AgentsView for active and running agents without requiring taskId
- Rename Run Heartbeat copy to Run Now and update runs-tab accessibility labels in AgentDetailView
- Add AgentsView coverage for Run Now visibility and startAgentRun invocation when no task is assigned
- Update agent runs UI static-analysis tests and add a patch changeset for @gsxdsm/fusion
2026-04-20 17:16:22 -07:00
Fusion
c8203210c2 feat(FN-2170): add dev-server preview detection and log viewer flow
- Add dev-server port detection utilities and wire detected preview state into process/manager lifecycle
- Normalize dev-server status API responses with preview URL, detected port, and manual override compatibility
- Introduce useDevServerLogs and DevServerLogViewer, and integrate them into the DevServer dashboard view
- Expand dashboard test coverage for detection edges, process/routes behavior, log history handling, and CSS regressions
2026-04-20 15:37:32 -07:00
Fusion
6522369168 feat(FN-2182): add dashboard dev server management view
- Add DevServerView with command detection, start/stop/restart controls, live logs, and preview URL management
- Implement useDevServer with SSE log streaming, running-state polling, manual URL updates, and candidate detection support
- Extend dashboard API client mappings for dev-server candidate metadata, status fields, and preview URL helpers
- Integrate dev server navigation in header/mobile nav, normalize devserver view state persistence, and add feature-flag wiring
- Add/refresh DevServerView and useDevServer tests and replace legacy dev-server CSS with the new component styles
2026-04-20 15:09:56 -07:00
Fusion
db8258f8bd fix(FN-2198): sync agent heartbeat config UI with live runtime updates
- Refresh AgentDetailView on agent:updated SSE events while preserving local unsaved config edits
- Resync heartbeat and budget form state from latest runtime config when agent data changes
- Centralize heartbeat interval defaults/formatting in shared utilities and reuse them in AgentsView selectors
- Add dashboard tests for default heartbeat hints, unset runtime fallback behavior, and custom interval options
2026-04-20 14:36:18 -07:00
Fusion
238c5e27ec test(FN-2197): reconcile skipped-test inventory and stabilize planning resume coverage
- Add docs/skipped-test-inventory.md with the current intentional skip patterns and rationale across test suites
- Link the skipped-test inventory from docs/README.md for easier discovery
- Record reconciliation of older skip follow-up tasks that are now covered and no longer active backlog
- Stabilize PlanningModeModal conversation-history resume testing by overriding stream behavior in the targeted test case
2026-04-20 14:11:28 -07:00
Fusion
42476ec3da feat(FN-2166): persist dev server script configuration across sessions
- Extend dev server store with config defaults, normalization, and JSON persistence alongside runtime state.
- Add GET/PUT /api/dev-server/config endpoints with strict request validation for nullable fields and preview URLs.
- Add dashboard API helpers plus a useDevServerConfig hook to load and update selected script, source, command, and preview override.
- Update DevServerView and styles to support saved script selection, change/clear actions, and synchronized command/preview inputs.
- Expand dev server store/routes/component tests and document the config endpoint in architecture docs.
2026-04-20 12:59:58 -07:00
gsxdsm
ca6ed92dd1 fix(FN-000): clear stale queued state on task resume
Resume paths (unpause, drift recovery, engine restart) bypassed the
scheduler's todo->in-progress clear, leaving actively executing tasks
labeled status="queued" with a lingering blockedBy. Broadened
clearResumeFailureState to null both fields alongside the existing
failure cleanup, and added a defensive UI backstop so the "Queued"
badge no longer renders for tasks in the in-progress column.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 11:28:56 -07:00
Fusion
ee55075440 fix(FN-2194): align prompt manager spacing and responsive gutters
- Add horizontal padding to the prompt manager container for consistent desktop gutters
- Add top margin to separate the prompt manager from surrounding sections
- Add a mobile-specific prompt manager padding override at the 768px breakpoint
2026-04-20 11:21:32 -07:00
gsxdsm
c7266b7fbd fix(FN-000): restore iOS terminal input by full-covering helper textarea
On iOS Safari/PWA, tapping the terminal opened the keyboard but typed
keys produced no output. Focus landed on a 1×1 opacity-0.01 helper
textarea overlapped by the xterm canvas, and capture-phase gesture
handlers re-focused on every tap — a combination iOS silently drops
input events on.

- On touch-primary devices, expand .xterm-helper-textarea to cover the
  entire terminal surface (100% × 100%, opacity 0, z-index 2) via
  @media (hover: none) and (pointer: coarse). Taps land on the
  textarea directly, so iOS grants keyboard + input events natively.
- Desktop keeps the 1×1 rule so xterm's canvas-level drag-to-select
  and mouse tracking continue to work.
- Revert onPointerDownCapture/onTouchStartCapture/onClickCapture back
  to bubble-phase onPointerDown/onTouchStart; capture phase was
  confusing iOS's focus attribution and is no longer needed now that
  taps reach the textarea directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 10:42:44 -07:00
Fusion
c19ac60d10 feat(FN-2192): rename markdown files route to markdown-list
- Rename the dashboard markdown files route to /files/markdown-list.
- Update fetchProjectMarkdownFiles to call the new markdown-list endpoint.
- Adjust useDocuments test mocks and assertions to match the renamed route.
2026-04-20 10:38:38 -07:00
Fusion
263d23dccf feat(FN-2189): include gh CLI auth in setup readiness
- Extend auth status API typing to include optional ghCli availability/authentication metadata.
- Update /api/auth/status to return ghCli readiness using isGhAvailable() and isGhAuthenticated().
- Treat setup GitHub readiness as satisfied when either GitHub OAuth or authenticated gh CLI is present.
- Add hook tests covering gh CLI authenticated, unauthenticated, combined OAuth, and missing-ghCli fallback cases.
2026-04-20 10:16:13 -07:00
Fusion
74f2b25c1d fix(FN-2176): honor planning summary overrides for task generation
- Add optional summary payload support to planning create-task and start-breakdown API client calls
- Pass edited summary data from PlanningModeModal when creating a task or starting breakdown
- Parse and validate summary overrides in planning routes and prioritize override data when present
- Add and update dashboard tests to verify override handling and modal call expectations
2026-04-20 09:32:04 -07:00
Fusion
a1f535008b fix(FN-2165): prevent mobile nav tab overflow
- Keep only one optional tab (Skills or Roadmaps) in the top-level mobile nav to preserve touch-target width
- Move overflowed optional destinations into the More sheet and mark More active when those views are selected
- Add MobileNavBar tests covering Skills/Roadmaps overflow behavior and More-sheet routing
- Add mobile nav CSS guards (min-width and label ellipsis) to avoid clipping on narrow screens
2026-04-20 08:53:25 -07:00
gsxdsm
ed235c1edf fix(engine): recoverable worktree failures + prevent nested/gitlink worktrees
Fixes two classes of task failures found while investigating stuck in-review
tasks FN-2165 (worktree base ref missing) and FN-2152 (stray .tmp-fn-2152
gitlink accidentally committed via merger amend).

FN-2165 — stale baseBranch:
- resolveWorktreeStartPoint now returns null instead of throwing
  NonRetryableWorktreeError when the stored baseBranch is gone. Caller clears
  task.baseBranch and falls back to branching from the default base (HEAD) so
  the task self-heals instead of failing permanently.
- New TaskStore.clearStaleBaseBranchReferences() nulls baseBranch on any
  dependent task when its upstream branch is deleted. Wired into
  cleanupBranchForTask (archive/delete), merger branch cleanup, self-healing
  orphan-branch sweep, executor dep-abort and conflict-cleanup paths, and
  stale-branch recovery.

Nested worktrees:
- assertWorktreePathNotNested guard in tryCreateWorktree refuses to create a
  worktree inside another registered worktree (previously produced pathological
  paths like .worktrees/green-finch/.worktrees/amber-panda when rootDir pointed
  at a worktree instead of the main repo).

Context-overflow recovery (FN-2182 class):
- Reduced-prompt retry budget raised from 1 → 3 within the same session.
- Adds a fresh-session requeue path when same-session retries still overflow:
  task moves back to todo with worktree retained, bounded by
  computeRecoveryDecision / MAX_RECOVERY_RETRIES. Prevents late-step context
  exhaustion from becoming terminal.

Gitlink prevention (FN-2152 class):
- .gitignore now excludes .tmp-fn-* and .tmp-kb-* so stray worktrees at the
  repo root cannot be captured by git add -A.
- Merger amend flow now scans staged entries for 160000 gitlinks and unstages
  them with a loud warning; the project uses no submodules, so any such entry
  is a bug (this is how f8f90f26 landed in HEAD as .tmp-fn-2152).

Tests: new coverage for baseBranch fallback, nested-worktree guard, and
clearStaleBaseBranchReferences. Full engine + core + dashboard + cli suites
pass (15349 tests).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 08:30:24 -07:00
gsxdsm
a19b5d8057 chore: remove broken .tmp-fn-2152 gitlink
A stray 160000 (submodule) entry pointing at commit f8f90f26 was
committed by mistake during FN-2152 work. The path had no corresponding
submodule registration and showed up as "modified" in every clone.
Registered git worktree also dangled inside the main repo tree.

Removing the gitlink entry from the tree so subsequent checkouts no
longer carry the stale reference. Corresponding worktree pruned via
`git worktree remove` earlier.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 08:30:24 -07:00
Fusion
c03868af48 fix(FN-2179): suppress ANSI regex lint warning in dev server logs 2026-04-20 08:30:24 -07:00
Fusion
7b7883434f test(FN-2179): complete Step 6 dev server hook and component tests 2026-04-20 08:30:24 -07:00
Fusion
9a3155416a feat(FN-2179): complete Step 3-5 dev server view UI and navigation 2026-04-20 08:30:24 -07:00
Fusion
d0bd6c2329 feat(FN-2179): complete Step 1-2 API and useDevServer hook 2026-04-20 08:30:24 -07:00
Fusion
7b8bbaaa0a feat(FN-2152): render collapsed tool call previews in chat
- Emit tool_start/tool_end SSE events from dashboard chat backend and parse them in streaming client helpers
- Track in-flight and completed tool calls in useChat/useQuickChat to preserve tool output summaries alongside assistant messages
- Render collapsed tool call preview blocks in ChatView and QuickChatFAB with dedicated tokenized styles for compact output summaries
- Expand frontend and backend test coverage for SSE tool events, hook state transitions, and collapsed preview rendering behavior
- Add a changeset for @gsxdsm/fusion documenting the new tool-call display behavior
2026-04-20 08:30:24 -07:00
Fusion
eaf99e6279 feat(FN-2195): unify chat model labeling for fn assistant sessions
- Show formatted model names in sidebar metadata for fn assistant sessions with a Fusion fallback
- Use the resolved model name as the thread header title and assistant avatar label for fn sessions
- Suppress duplicate model tags when the primary label already displays the model while keeping tags for non-fn sessions
- Expand ChatView tests to cover sidebar, header, and avatar model-label and fallback behavior
2026-04-20 08:30:24 -07:00
Fusion
e8b0ed5627 fix(triage): prevent orphaned deps when splitting tasks + detect worktree drift
Root cause: during a triage split the AI could set a child task's
`dependencies` to the parent id. The parent is hard-deleted after the split,
and the scheduler's dep check treats a missing id as unmet — permanently
blocking the dependent. This stranded FN-2164 behind the deleted FN-2163.

- core/store.deleteTask: refuse to delete when any live task still has the id
  in its `dependencies` array. Throws TaskHasDependentsError listing dependents
  so callers can rewrite or recover. Covers the triage-split path and any
  future caller.
- engine/triage task_create: validate each proposed dependency before creating
  a child — reject the parent id, reject unknown task ids, allow siblings
  created earlier in the same split or pre-existing tasks.
- engine/triage split cleanup: wrap the parent deleteTask in try/catch that
  keeps the parent alive (safer than stranding dependents) and logs the reason.
- engine/triage prompts: both the mandatory-split and proactive-split prompts
  now explicitly state that subtask deps must never reference the parent.
- dashboard/routes /subtasks/create-tasks: reject parent-id deps, drop unknown
  deps with an audit log entry, surface parentTaskCloseError + droppedDependencies
  in the response instead of silently swallowing them.
- engine/executor: on execute entry, detect the drift state (in-progress task
  with no worktree) and emit a loud log + task log entry; the existing
  fresh-worktree path then recovers. Prevents silent "operating without a
  worktree" behavior that we saw on FN-2152.

Tests:
  core:      2907/2907 pass (+5 new, incl. deleteTask guard regression)
  engine:    2554/2554 pass (+17 new, incl. task_create dep validation)
  dashboard: 9064/9064 pass (+2 new for /subtasks/create-tasks).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 08:30:24 -07:00
gsxdsm
f530a69955 fix(triage): prevent orphaned deps when splitting tasks + detect worktree drift
Root cause: during a triage split the AI could set a child task's
`dependencies` to the parent id. The parent is hard-deleted after the split,
and the scheduler's dep check treats a missing id as unmet — permanently
blocking the dependent. This stranded FN-2164 behind the deleted FN-2163.

- core/store.deleteTask: refuse to delete when any live task still has the id
  in its `dependencies` array. Throws TaskHasDependentsError listing dependents
  so callers can rewrite or recover. Covers the triage-split path and any
  future caller.
- engine/triage task_create: validate each proposed dependency before creating
  a child — reject the parent id, reject unknown task ids, allow siblings
  created earlier in the same split or pre-existing tasks.
- engine/triage split cleanup: wrap the parent deleteTask in try/catch that
  keeps the parent alive (safer than stranding dependents) and logs the reason.
- engine/triage prompts: both the mandatory-split and proactive-split prompts
  now explicitly state that subtask deps must never reference the parent.
- dashboard/routes /subtasks/create-tasks: reject parent-id deps, drop unknown
  deps with an audit log entry, surface parentTaskCloseError + droppedDependencies
  in the response instead of silently swallowing them.
- engine/executor: on execute entry, detect the drift state (in-progress task
  with no worktree) and emit a loud log + task log entry; the existing
  fresh-worktree path then recovers. Prevents silent "operating without a
  worktree" behavior that we saw on FN-2152.

Tests:
  core:      2907/2907 pass (+5 new, incl. deleteTask guard regression)
  engine:    2554/2554 pass (+17 new, incl. task_create dep validation)
  dashboard: 9064/9064 pass (+2 new for /subtasks/create-tasks).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 20:48:14 -07:00
Fusion
0b9bf62a2a refactor(FN-2162): rename kb-agent identifiers to fn-agent
- Rename core loader, dashboard server chat/planning routes, and frontend agent IDs/storage keys from kb-agent to fn-agent naming
- Update dashboard hooks and components (agent list, chat view, quick chat) to use the new fn agent key prefixes consistently
- Refresh engine, dashboard, core, and CLI tests/mocks to remove remaining kb-agent route and temp prefix references
- Update storage/gap-analysis docs to reflect fn agent key names and add a @gsxdsm/fusion patch changeset for the rename
2026-04-19 20:48:14 -07:00
Fusion
0aa1360a18 feat(FN-2193): add fullscreen template preview for agent prompts
- Render full template prompt text in cards with a scrollable preview area instead of truncation
- Add expand controls for built-in and custom templates to open a single fullscreen dialog view with Escape/collapse handling
- Align template expand buttons to shared icon-button styling for consistent UI behavior
- Extend AgentPromptsManager tests to cover preview overflow styles and fullscreen interactions across built-in/custom templates
2026-04-19 20:48:14 -07:00
Fusion
a929b729b9 refactor(FN-2161): standardize on createFnAgent naming
- Rename engine export and call sites to use createFnAgent consistently across runtime flows
- Update core lazy engine loader and dashboard agent-generation/planning/chat paths to reference createFnAgent
- Refresh affected unit and integration tests, including renaming pi-create-kb-agent.test.ts to pi-create-fn-agent.test.ts
- Update AGENTS.md documentation references to match the new createFnAgent name
2026-04-19 20:48:14 -07:00
Fusion
5de8c8dca7 feat(FN-2181): add dashboard dev-server process manager and API routes
- Introduce DevServerStore and DevServerProcessManager with a simplified store API contract
- Add dev-server script detection and route legacy manager behavior through the new process manager
- Add a dedicated dev-server router with start/stop/status/log endpoints and SSE event streaming
- Wire dev-server routes into the main route table and hook manager shutdown into server teardown
- Expand tests and architecture docs for store, process, route, detection, and SSE coverage
2026-04-19 20:48:14 -07:00
Fusion
b41be769eb fix(FN-2190): add Skills View label to experimental feature names
- Add the `skillsView` entry to the known experimental feature display-name map in SettingsModal.
- Show "Skills View" as the user-facing label in the experimental features list instead of a raw feature key.
2026-04-19 20:48:14 -07:00
Fusion
10f10c5a45 feat(FN-2168): add persistent dev-server dashboard flow
- Add a durable dev-server store and manager with persisted state/log history, process reconciliation, and SSE event buffering
- Wire new backend lifecycle APIs for status/history/start/stop/restart/stream and initialize/shutdown manager handling in server startup
- Add dashboard Dev Server view, hook-based hydration/stream handling, nav integration, and supporting styles
- Expand coverage with backend persistence/route tests and frontend DevServerView/useDevServer tests
- Document the dev-server persistence architecture in docs/architecture.md
2026-04-19 20:48:14 -07:00
Fusion
66ad0769c4 fix(FN-2177): exclude terminal AI sessions from background list
- Limit background session inclusion to active statuses (generating and awaiting_input)
- Remove sessions from local state when SSE updates deliver complete or error terminal statuses
- Update useBackgroundSessions tests to assert terminal sessions are filtered out and removed on SSE updates
- Adjust session count expectations to reflect active-only tracking
2026-04-19 20:48:13 -07:00
Fusion
ff2813ce4a feat(FN-2178): add dashboard dev server management flow
- Add DevServerManager service to start/stop/restart dev processes, persist state, stream logs, and detect preview URLs
- Add dev server candidate detection across root/workspace package scripts with caching and invalidation helpers
- Expose /api/dev-server routes for candidates, status, lifecycle actions, manual preview URL, and SSE log/status stream
- Initialize and tear down dev server managers from dashboard server lifecycle
- Add unit and route tests covering detection, manager lifecycle, URL parsing/fallback probes, and API validation
2026-04-19 20:48:13 -07:00
Fusion
f588301d8e feat(FN-2154): show dismissible setup warning on project page
- Render SetupWarningBanner from App only in project view when setup readiness reports warnings
- Persist dismiss state per project via scoped storage and restore it when switching projects
- Add optional dismiss action to SetupWarningBanner with close button UI and responsive styles
- Remove inline banner from QuickEntryBox and add tests covering dismiss button behavior
2026-04-19 20:48:13 -07:00
Fusion
5b6392d849 feat(FN-2156): migrate agent log storage to SQLite
- Add an agentLogEntries table and schema migration updates for SQLite-backed agent log persistence
- Persist appended agent logs in SQLite and read task agent logs from the database instead of filesystem-only JSONL
- Import legacy agent log JSONL data into SQLite with type-safe handling for older log field shapes
- Preserve agent logs across task updates and archive flows, and update docs plus tests (including schema assertions) to cover the new behavior
- Add a changeset for @gsxdsm/fusion describing the agent log storage migration
2026-04-19 20:48:13 -07:00
gsxdsm
3f8161a90a refactor: low-regret cleanup across core, engine, dashboard
- core: extract ai-engine-loader.ts to share @fusion/engine dynamic-import
  boilerplate between ai-summarize and memory-compaction (incl. AgentMessage
  type); collapse getInbox/getOutbox, listInsights/countInsights,
  listRuns/countRuns, and three hasProjectDb* variants behind shared helpers.
- core: drop unused pluginLoaderLog export; tighten two `any` casts
  (db.walCheckpoint row, plugin-loader error.code).
- engine: extract resolveRoleFallback helper from buildSessionSkillContext/Sync;
  remove 22 stale `eslint-disable no-explicit-any` directives across
  project-engine, self-healing, triage, worktree-pool.
- dashboard: apply ESLint autofix (let→const, empty `interface extends`→type).

All three packages: typecheck clean, full test suites pass (14,414 tests),
builds clean. Net lint: -31 warnings. No public behavior changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 20:48:13 -07:00
Fusion
a93f0f2ef9 feat(FN-2160): add push-after-merge remote sync workflow
- Add project settings for pushAfterMerge and pushRemote with defaults and typed merge result fields for push status/errors
- Implement post-merge remote sync in the merger with pull --rebase, auto/AI conflict resolution, and one non-fast-forward retry before push
- Expose push-after-merge controls in Settings modal with conditional Push Remote input and coverage for desktop/mobile save flows
- Document the new settings in the settings reference and stabilize CLI cross-build help test timeout
2026-04-19 20:48:13 -07:00
Fusion
4c08b1c32a fix(FN-2158): constrain settings modal sidebar overflow
- Make .settings-layout fill available space and allow shrinking with flex: 1 and min-height: 0
- Enable vertical scrolling on .settings-sidebar in desktop layout to prevent content clipping
- Add a SettingsModal regression test that loads styles.css and asserts desktop overflow/scroll computed styles
2026-04-19 20:48:13 -07:00
Fusion
e106d87fcb fix(FN-2159): hide manual PR controls for auto-merge tasks
- Add an autoMerge prop to PrSection and show an auto-merge hint instead of manual PR actions
- Pass project autoMerge settings from TaskDetailModal into PrSection
- Preserve active automation messaging when PR creation is already in progress
- Expand PrSection tests to cover auto-merge enabled and disabled behavior
- Increase core RunMutationContext log entry bounds test timeout to reduce flakiness
2026-04-19 20:48:13 -07:00
Fusion
9ec7ce9fd7 fix(FN-2149): harden agent reflection error handling
- Update reflection trigger API typing to allow null responses from manual generation
- Handle null results in AgentReflectionsTab with a clear insufficient-history toast
- Normalize reflection trigger errors to show specific UX for deleted agents and insufficient history
- Return a clear 500 error when manual reflection generation yields no reflection payload
- Expand dashboard reflection route/UI tests to lock in null and not-found regression behavior
2026-04-19 20:48:13 -07:00
Fusion
2b3f971fd5 feat(FN-2150): add agent memory file management
- Add core helpers to list, read, and write .fusion/agent-memory/{agentId} files with strict path validation and exports
- Add dashboard API routes and client methods for agent memory file listing and single-file read/write operations
- Expand AgentDetailView memory tab with file selection, editing, save states, and inline validation feedback
- Add route/backend coverage for agent memory file endpoints and include a @gsxdsm/fusion minor changeset
2026-04-19 20:48:13 -07:00
Fusion
302367e5c4 fix(FN-2155): require explicit store rootDir in tests
- Add constructor guards in AgentStore and ReflectionStore that throw when rootDir is omitted under Vitest
- Keep default .fusion root resolution for non-test execution paths
- Prevent accidental test writes to unintended filesystem locations by forcing explicit paths
2026-04-19 20:48:13 -07:00
Fusion
a794cc0237 fix(FN-2151): recover modal retries after stream disconnects
- Handle retry API "not in an error state" responses by refreshing the server session instead of failing immediately
- Restore the correct view state for generating, awaiting_input, complete, and error sessions during retry recovery
- Reconnect planning/interview/subtask streams only when needed while preserving in-flight output and history
- Add regression tests for connection-loss retry recovery across PlanningModeModal, MissionInterviewModal, and SubtaskBreakdownModal
2026-04-19 20:48:13 -07:00
Fusion
5eb15f9454 Style changes 2026-04-19 20:48:13 -07:00
gsxdsm
2eb10bc683 Style changes 2026-04-19 10:13:34 -07:00
Fusion
b1f6740b51 refactor(FN-2134): remove legacy memory path exports and bootstrap aliases
- Remove legacy memory path constants/helpers from core exports and backend contract surface
- Simplify memory bootstrap to initialize canonical layered memory files without seeding from .fusion/memory.md
- Update core memory tests to assert canonical .fusion/memory/MEMORY.md behavior and legacy-path rejection
- Refresh dashboard and docs naming/references to reflect canonical long-term memory path semantics
2026-04-19 10:13:34 -07:00
Fusion
f40f87fca4 fix(FN-2145): enforce absolute .fusion roots in core storage
- Default AgentStore rootDir to resolve(".fusion") so agent data paths are absolute by default
- Default ReflectionStore rootDir to resolve(".fusion") for consistent absolute root resolution
- Validate Database kbDir is absolute and throw a descriptive error when a relative path is provided
2026-04-19 10:13:34 -07:00