Commit Graph

1499 Commits

Author SHA1 Message Date
gsxdsm
156d49f70b fix(FN-1287): standardize dashboard API error responses
- Add shared ApiError class and response helpers for consistent error shape
- Migrate routes and mission-routes handlers to use standardized API errors
- Update server error middleware, rate limiter, and node metrics error handling to use shared helpers
- Expand dashboard tests with ApiError coverage and standardized response assertions
- Add a changeset documenting the @gsxdsm/fusion patch for API error shape standardization
2026-04-08 12:37:47 -07:00
gsxdsm
def7b82a7f docs(FN-1314): document headless fn serve mode
- Add a dedicated AGENTS.md section describing fn serve as a headless node runtime
- Document serve flags, remote binding defaults, and differences from fn dashboard behavior
- Capture startup banner, lifecycle state updates, graceful shutdown order, and implementation references
- Add /api/health endpoint details and common remote and Docker usage examples
2026-04-08 12:36:52 -07:00
gsxdsm
134f9d8c23 fix(FN-1313): use stable mission event ordering
- Replace mission event list sorting fallback from rowid to id for deterministic ordering
- Update latest mission error lookup to order by id instead of rowid when timestamps tie
2026-04-08 12:36:19 -07:00
gsxdsm
686b1e3f8a feat(FN-1301): add Projects action to mobile more sheet
- Add a Projects entry with icon and test id in the mobile More sheet actions
- Extend MobileNavBar props with onViewAllProjects and trigger it via the shared more-sheet action handler
- Wire App to pass handleViewAllProjects into MobileNavBar so the new action opens project selection
- Add test coverage for rendering the Projects item and invoking its callback while closing the sheet
2026-04-08 12:30:24 -07:00
gsxdsm
754cebb641 test(FN-1312): add mobile feature access regression guard
- Add dashboard regression tests that keep board, list, and agents views reachable on mobile
- Verify mobile header overflow preserves project navigation and All Projects access
- Assert More-sheet secondary actions and mobile-nav visibility fallbacks remain accessible
2026-04-08 12:29:35 -07:00
gsxdsm
abbb4eab11 feat(FN-1272): add task document tools for triage and executor
- Add task_document_write and task_document_read factories with schemas, revision-aware responses, and error handling in agent-tools
- Wire document tools into executor and triage sessions and update prompts to persist and reuse planning artifacts across runs
- Export document tool factories and parameter schemas from engine public entrypoints while keeping executor re-export compatibility
- Add comprehensive tests covering write/read success paths, empty/not-found cases, and store failure handling
2026-04-08 12:27:11 -07:00
gsxdsm
dc4db25786 feat(FN-1178): harden mobile responsiveness across agent modals
- Add mobile full-screen and safe-area CSS rules for agent dialogs, including touch-friendly inputs and footer actions
- Remove hardcoded inline width constraints from AgentGenerationModal so mobile styles can fully apply
- Fill AgentListModal mobile gaps with improved control sizing, wrapped layouts, and single-column behavior at small breakpoints
- Add agent modal mobile regression tests covering responsive classes, breakpoints, and dialog sizing expectations
2026-04-08 12:18:55 -07:00
gsxdsm
e4b758d901 fix(FN-1299): stabilize agent detail refresh callbacks
- Stabilize AgentDetailView callback usage by storing onClose/addToast in refs and removing them from loadAgent dependencies
- Prevent full-screen loading spinner on background refresh by only showing it before the initial agent load
- Memoize detail modal handlers in AgentsView to keep callback identities stable across parent re-renders
- Add regression tests covering callback identity churn and refresh behavior without loading-state flicker
2026-04-08 12:15:54 -07:00
gsxdsm
786c9309e1 feat(FN-1297): prevent mobile detail open from control taps
- Broaden TaskCard touch target detection from HTMLElement to Element so nested SVG targets are treated as interactive
- Keep mobile tap handling from opening task details when pressing card controls
- Add board-mobile regressions for edit button taps, steps toggle taps, and SVG-inside-button touch events
2026-04-08 12:10:16 -07:00
gsxdsm
a997436b7c feat(FN-1270): add task document storage with revision history
- Add task document domain types and key validation helpers in core types
- Introduce schema v18 migration creating task_documents and task_document_revisions tables with indexes
- Implement TaskStore CRUD/upsert APIs for task documents, including revision archiving and task update events
- Export task document types from the core index for downstream consumers
- Add comprehensive task document tests and update database schema/version assertions
2026-04-08 12:09:41 -07:00
gsxdsm
105d224b7f feat(FN-1264): enforce heartbeat budget governance for trigger execution
- Gate heartbeat runs in executeHeartbeat when agents are over budget and skip timer runs above threshold
- Pause agents with pauseReason "budget-exhausted" when run usage pushes them over budget
- Budget-gate assignment and timer triggers in HeartbeatTriggerScheduler and include budgetStatus in assignment wake context
- Expand agent-heartbeat test coverage for budget exhaustion, threshold behavior, pause transitions, and trigger gating
2026-04-08 12:03:38 -07:00
gsxdsm
9219323bc0 feat(FN-1277): hydrate dashboard theme settings from backend
- Hydrate useTheme from global settings while seeding initial state from localStorage cache to prevent flash
- Add write-through theme persistence so setter updates local cache immediately and asynchronously saves via updateGlobalSettings
- Clarify Settings modal save behavior for intentional idempotent global theme writes
- Expand useTheme and App tests to cover backend hydration, fallback handling, and new global settings fetch expectations
2026-04-08 11:58:18 -07:00
gsxdsm
9ac5b19646 fix(FN-1285): harden async listener error guards
- Wrap TaskExecutor task:updated async listener logic in a top-level guard and log uncaught listener failures
- Add explicit catch handling for ProjectManager activity logging and dashboard stuck-detector settings-triggered checkNow calls
- Document async EventEmitter guard conventions in scheduler and hybrid executor listener wiring
- Add regression tests for executor and dashboard listener guards and include a patch changeset for @gsxdsm/fusion
2026-04-08 11:49:33 -07:00
gsxdsm
d3569361d9 feat(FN-1263): add agent budget tracking and reset APIs
- Add AgentBudgetConfig and AgentBudgetStatus types to runtime config and export them from @fusion/core
- Implement AgentStore.getBudgetStatus to compute usage, thresholds, over-budget flags, and next reset timestamps for daily/weekly/monthly/lifetime periods
- Implement AgentStore.resetBudgetUsage to zero token counters, record budgetResetAt, and emit agent updates while preserving other runtime settings
- Add comprehensive AgentStore budget management tests covering no-budget behavior, threshold calculations, reset behavior, and reset-day edge cases
2026-04-08 11:42:39 -07:00
gsxdsm
13728878fa refactor(FN-1289): extract AppInner logic into hooks and modal component
- Extract view state, project actions, and task handler concerns from AppInner into dedicated hooks
- Add AppModals component to centralize modal rendering and related props wiring
- Inline thin aliases and complete AppInner cleanup after moving responsibilities out
- Add unit tests for useViewState, useProjectActions, and useTaskHandlers hooks
2026-04-08 11:39:59 -07:00
gsxdsm
4c198e3473 feat(FN-1177): polish mission and planning modals for mobile
- Improve Mission Manager mobile behavior with wrapped headers/actions, 44px icon touch targets, overflow guards, and safe-area padding
- Refine planning and subtask modal mobile UX with touch-friendly drag/action controls, compact progress/layout spacing, and 16px form inputs to prevent iOS zoom
- Update model selection mobile styles to use constrained dropdown sizing and larger tappable options across 768px/640px breakpoints
- Add mission-planning-modals-mobile CSS tests that assert key mobile rules for Mission Manager, Subtask Breakdown, Planning Mode, and model combobox interactions
2026-04-08 11:38:09 -07:00
gsxdsm
9314b9a8a4 fix(FN-1252): add dashboard dispose lifecycle to prevent listener leaks
- Track runDashboard event handlers through a centralized register helper
- Add an idempotent dispose() that unregisters store/process listeners and clears merge retry timers
- Guard periodic merge retry scheduling against disposed state and invoke cleanup on shutdown paths
- Add lifecycle regression tests covering listener cleanup, idempotent dispose, and MaxListeners warnings
2026-04-08 11:27:42 -07:00
gsxdsm
eee7d64d27 fix(FN-1294): make Settings memory editor wrapper a flex container
- Add display: "flex" to the Memory tab editor wrapper in SettingsModal.
- Set flexDirection: "column" so the embedded FileEditor lays out correctly inside the fixed-height container.
2026-04-08 11:24:48 -07:00
gsxdsm
9bb5773d5a feat(FN-1227): add mesh state and system metrics support to CentralCore
- Add SystemMetrics, PeerNode, NodeMeshState, and MeshDiscovery types and export new mesh/metrics APIs from @fusion/core
- Introduce collectSystemMetrics with CPU, memory, storage, and uptime collection (including check-disk-space integration) plus dedicated unit tests
- Bump central DB schema to v3 with nodes.systemMetrics/knownPeers and peerNodes table, including migration coverage for v2->v3 upgrades
- Extend CentralCore with node metrics updates, peer register/unregister/list operations, mesh snapshot reporting, and event emissions backed by expanded test coverage
2026-04-08 11:21:18 -07:00
gsxdsm
2ef1fb0f72 fix(FN-1250): route task-creation endpoints through scoped project stores
- Resolve projectId-scoped TaskStore instances for GitHub issue/PR import and batch import mutations
- Use scoped stores for planning and subtask breakdown create flows, including rootDir lookups, dependency updates, and parent cleanup
- Add regression tests to verify projectId requests mutate only the scoped store across import, planning, and subtask routes
2026-04-08 11:19:43 -07:00
gsxdsm
2ee3b1d55c feat(FN-1167): add agent org chart and reporting chain views
- Add an Org Chart view mode in AgentsView with persisted view selection, API-backed tree loading, and node selection into AgentDetailView
- Add a Chain of Command section to AgentDetailView dashboard that loads reporting paths and lets users navigate to ancestor agents
- Introduce dedicated styling for org chart cards/connectors, loading states, and chain-of-command pills with responsive behavior
- Expand AgentsView and AgentDetailView test coverage for org chart rendering, loading/empty states, and chain-of-command interactions
2026-04-08 11:11:06 -07:00
gsxdsm
20f6a4998d fix(FN-1284): move terminal execution failures to in-review
- Move single-session and step-session executor failure paths to in-review after marking tasks failed
- Route exhausted transient recovery retries to in-review instead of leaving tasks outside review flow
- Move stuck-kill budget exhaustion failures in self-healing to in-review and update failure log wording
- Add regression tests in executor and self-healing suites to verify in-review transitions on these failure states
2026-04-08 11:01:04 -07:00
gsxdsm
102ffe6e7d feat(FN-1163): align command references with fn naming
- Update CLI command strings, help text, and project-resolution messaging to reference fn
- Sync core backup/store messaging and dashboard API/planning/subtask prompt examples with fn usage
- Refresh dashboard UI copy in settings, project detection, and PR guidance for consistent command naming
- Adjust CLI/dashboard tests and add a @gsxdsm/fusion changeset for the naming alignment patch
2026-04-08 11:00:32 -07:00
gsxdsm
0b9486502b fix(FN-1210): stabilize workflow-step refine route and tests
- Add an injectable createKbAgent override for the workflow-step refine route to avoid brittle dynamic import behavior in tests
- Update refine logic to use injected agent factory when provided and fall back to @fusion/engine import otherwise
- Expand route tests with a successful AI refinement path using a mocked session text stream
- Reset refine agent injection between tests and tighten fallback assertions when AI creation fails
2026-04-08 10:53:13 -07:00
gsxdsm
914b93cc43 test(FN-1282): expand dashboard hook and modal coverage
- Add tests for useAgents and useProjectHealth hooks, including loading, success, and error flows
- Add useFileBrowser and useFileEditor hook tests for file navigation, save behavior, and edge cases
- Add component tests for AgentImportModal and AgentGenerationModal interaction paths
- Add MissionInterviewModal tests covering question flow, submission, and state transitions
- Stabilize dashboard test suite cleanup and mocking patterns to reduce flakiness
2026-04-08 10:48:42 -07:00
gsxdsm
3ee66cdda0 feat(FN-1159): add dramatic dashboard themes
- Add new dramatic color theme IDs to shared settings types and dashboard theme bootstrap
- Implement dramatic theme token sets and component-level CSS overrides with matching swatches
- Register the new themes in ThemeSelector and expand ThemeSelector tests for visibility and init whitelist coverage
- Add a changeset for @gsxdsm/fusion documenting the dramatic theme addition
2026-04-08 10:46:48 -07:00
gsxdsm
dfb8a877d0 test(FN-1281): expand mission and subtask test coverage
- Extend mission API e2e coverage across CRUD, validation edge cases, observability, interview flows, and autopilot endpoints
- Add regression tests for generated mission/milestone/slice/feature ID handling across route validation paths
- Add subtask-breakdown unit tests for stream manager behavior, JSON parsing/normalization, fallback generation, and error handling
- Cover subtask session lifecycle and SQLite rehydration behavior, including corrupted-row resilience and in-memory fallback precedence
2026-04-08 10:40:21 -07:00
gsxdsm
29255a4a6a feat(FN-1276): scope dashboard persistence by project
- Add a project storage utility with scoped key helpers and key inventories for global vs project state
- Scope dashboard/task view, list preferences, quick-entry drafts, agent/tree state, terminal tabs, usage view, and modal draft persistence to projectId
- Reload persisted UI state when project context changes so per-project settings and drafts do not leak across projects
- Update and expand dashboard tests, including new projectStorage coverage and scoped persistence regression fixes
2026-04-08 10:39:38 -07:00
gsxdsm
110971333f test(FN-1283): expand CLI settings and routing coverage
- Add comprehensive settings-import tests for global/project scope handling and error paths
- Add settings-export tests covering output targets, filtering, and serialization behavior
- Expand project-resolver test matrix for flag/default/CWD resolution and fallback cases
- Extend bin entrypoint tests for command routing, argument forwarding, and failure handling
2026-04-08 10:38:15 -07:00
gsxdsm
a4bba623fa feat(FN-1174): migrate agent import flow to agent companies format
- Replace legacy companies.sh parser/types with the new agent companies parser and exported core types.
- Update CLI agent import wiring and tests to consume the new import source handling.
- Update dashboard agent import modal, API client, and import route tests to support archive-based sources.
- Add release-note changesets and lockfile updates for the @gsxdsm/fusion patch release.
2026-04-08 10:35:28 -07:00
gsxdsm
ca42bd5129 fix(FN-1169): align mailbox styles to current theme tokens
- Replace mailbox text and accent usage from legacy primary/text-primary tokens to text/todo tokens
- Update hover and unread/current message backgrounds to use card-hover and todo-based color-mix highlights
- Harmonize compose button and composer input focus colors with mailbox todo accents for consistent theming
2026-04-08 10:24:20 -07:00
gsxdsm
e156975300 fix(FN-1278): enforce settings parity for keys and defaults
- Add missing GlobalSettings and ProjectSettings entries to key arrays for full runtime coverage
- Fill default settings gaps for newly listed global and project configuration fields
- Add compile-time parity assertions to fail typechecking when interface keys and arrays drift
- Add parity tests validating key coverage, default coverage, duplicate detection, and cross-scope overlap
2026-04-08 10:21:15 -07:00
gsxdsm
4c7db73ffe test(FN-1279): expand child-process runtime and worker coverage
- Refactor ChildProcessRuntime tests with typed fork/IPC mocks and deterministic command-response helpers
- Add lifecycle and resilience assertions for startup failures, stop idempotency, heartbeat checks, and exponential restart backoff
- Verify IPC event forwarding, metrics fallback behavior, and not-accessible runtime API guards
- Add child-process-worker tests covering START/STOP/GET_STATUS/GET_METRICS handlers, runtime event bridging, and SIGTERM/SIGINT shutdown paths
2026-04-08 10:17:44 -07:00
gsxdsm
33321a3681 feat(FN-1149): add send-to-background actions for AI planning modals
- Add Send to background header action to Planning Mode, Subtask Breakdown, and Mission Interview modals using a shared minimize icon pattern
- Show the action only during active AI session states and keep it hidden in initial states
- Implement background behavior to close the live stream connection and modal without canceling the underlying AI session
- Add modal tests that verify button visibility rules and confirm send-to-background does not trigger cancel APIs
- Add shared CSS styling for modal send-to-background controls, including hover and focus-visible states
2026-04-08 10:15:14 -07:00
gsxdsm
d3a8e27ef0 test(FN-1280): add automation module coverage tests
- Add comprehensive tests for AUTOMATION_PRESETS, ScheduleType values, and MAX_RUN_HISTORY invariants
- Verify AutomationStore-facing type contracts for scheduled tasks, step definitions, and run result shapes
- Cover cron preset edge cases including weekday/monthly cadence and interval progression checks
- Handle cron-parser nullable ISO date values in test helpers by falling back to getTime()
2026-04-08 10:08:29 -07:00
gsxdsm
bfc3c80841 feat(FN-1218): harden mission autopilot with self-healing recovery
- Add mission self-healing project settings for stale activation thresholds, task retry budgets, and mission health-check intervals
- Extend MissionAutopilot with failed-task retry handling, blocked feature escalation, stale activating mission recovery, and periodic feature/task consistency reconciliation
- Wire autopilot failure and recovery flows through Scheduler and InProcessRuntime, including startup recovery for watched missions after crashes
- Add blocked feature status support in core mission types and CLI mission status labels
- Expand mission-autopilot coverage for retry flows, stale/startup recovery, health checks, and regression scenarios, and include a patch changeset for @gsxdsm/fusion
2026-04-08 10:01:06 -07:00
gsxdsm
cb90e33853 feat(FN-1273): support agent assignment in extension task tools
- Add optional agentId parameter to kb_task_create and persist it as assignedAgentId
- Extend kb_task_create output/details to include assignee information when present
- Add kb_task_update support for setting or clearing assignedAgentId via agentId (including null)
- Expand extension tests for create/update/clear assignment flows and add a patch changeset for @gsxdsm/fusion
2026-04-08 09:57:45 -07:00
gsxdsm
431ea68b0a test(FN-1245): harden bundle-output tests for hermetic behavior
- Only require dist/bin.js in setup so tests do not depend on dashboard client artifacts being prebuilt
- Gate dashboard client asset assertion behind a presence check to avoid flaky environment-specific failures
- Add tsup.config.ts assertions to verify dashboard/dist/client is copied into cli dist/client during build
2026-04-08 09:57:05 -07:00
gsxdsm
185ee2e2f5 refactor(FN-1251): harden child runtime timer lifecycle
- Add generation tracking plus dedicated SIGKILL and restart timer fields in ChildProcessRuntime
- Guard delayed kill/restart callbacks so stale generations and stopping runtimes are ignored
- Clear pending lifecycle timers during stop and before rescheduling to prevent stacked callbacks
- Expand child-process runtime tests to cover timer cancellation, generation safety, and spawn generation increments
2026-04-08 09:56:28 -07:00
gsxdsm
2a76761ce8 fix(FN-1249): degrade failed wave worktrees to sequential fallback
- Track per-step worktree creation failures in step-session execution waves
- Split wave execution into parallel and sequential phases so failed-worktree steps run on the primary worktree
- Cherry-pick only successful parallel-step commits and return consistently ordered results
- Add comprehensive tests covering partial/all worktree creation failures, fallback ordering, and cleanup behavior
2026-04-08 09:47:26 -07:00
gsxdsm
91211cb81c feat(FN-1166): improve task description editing in TaskForm
- Increase edit-mode description textarea height and add fullscreen expand/collapse controls with Escape support
- Add debounced 1.5s description auto-save in edit mode with Saving/Saved status feedback
- Wire TaskDetailModal to persist auto-saved descriptions via updateTask and show success/error toasts
- Add TaskForm coverage for expand mode and auto-save debounce behavior, and update related icon/test/style support
2026-04-08 09:46:28 -07:00
gsxdsm
8db7689f77 fix(FN-1243): add build-time dashboard stub fallback for CLI bundles
- Add resilient client asset staging in packages/cli/build.ts with automatic dist/client/index.html stub generation when dashboard assets are missing
- Update packages/cli/tsup.config.ts onSuccess hook to clear stale client output and emit the same minimal stub fallback in clean checkout builds
- Make bundle-output test build-aware by running pnpm build in beforeAll when bundle artifacts are absent, then assert client assets are present
- Preserve build output visibility by reporting whether real or stub client assets were staged
2026-04-08 09:44:42 -07:00
gsxdsm
108c3958ac feat(FN-1193): use sha^ base for done-task diff endpoints
- Update done-task /diff and /file-diffs routes to always resolve merge base from commitSha^ for squash merges
- Remove baseCommitSha ancestor/merge-base fallback logic that could include unrelated merged task changes
- Expand routes-diff regression tests to assert sha^ behavior and ensure baseCommitSha/baseBranch are ignored for done tasks
- Add done-task coverage in routes-file-diffs tests for sha^ success, missing commitSha, and rev-parse failure paths
2026-04-08 09:35:24 -07:00
gsxdsm
cc4c4dc7e1 feat(FN-1225): add headless fn serve command with health checks
- Add a new serve command implementation that runs the dashboard server in headless mode and exposes a health endpoint
- Register the serve command in CLI routing and extend bin command coverage for dispatch behavior
- Add comprehensive serve command tests for startup flow, options handling, and health-check responses
- Fix mission event ordering in MissionStore to keep health snapshots deterministic under concurrent updates
- Include a changeset for @gsxdsm/fusion documenting the new fn serve capability
2026-04-08 09:26:56 -07:00
gsxdsm
f0878ce7b6 refactor(FN-1242): migrate desktop vitest config to project-based setup
- Replace environmentMatchGlobs with explicit Vitest test.projects entries for desktop and desktop-renderer suites
- Keep desktop core tests on the threads pool and renderer tests in a jsdom-targeted project
- Increase the batch-import 429 retry test timeout from 30s to 60s to reduce CI flakiness
2026-04-08 09:17:23 -07:00
gsxdsm
ebb8e63274 feat(FN-1148): add AI session keep-alive pings for SSE streams
- Add AiSessionStore.ping() and expose POST /api/ai-sessions/:id/ping for lightweight heartbeat updates without emitting high-frequency session events
- Add pingSession() client API and integrate 25s keep-alive timers into planning, subtask, and mission interview resilient SSE connections
- Ensure keep-alive timers stop on stream completion, fatal errors, and explicit close while treating ping failures as best-effort non-fatal behavior
- Expand API/store/routes coverage with targeted tests for ping endpoint behavior, ping store semantics, and SSE keep-alive lifecycle handling
- Stabilize MissionStore latest-error lookup ordering with a rowid tiebreaker when timestamps are equal
2026-04-08 09:15:25 -07:00
gsxdsm
c07c9f4aba fix(FN-1241): stabilize PlanningModeModal race-condition test
- Replace fragile real-timer setTimeout sequencing with fake timers to eliminate CI flakiness
- Refactor mocked planning stream/response flow to deterministically deliver the second question
- Add explicit timer advancement and intermediate assertions around Continue click and response dispatch
- Ensure timer state is always restored with try/finally and keep single-SSE-connection verification
2026-04-08 09:12:15 -07:00
gsxdsm
d2db088642 fix(FN-1162): keep mobile file browser header controls accessible
- Update file browser header styles to wrap cleanly on small screens and preserve readable truncated labels
- Increase mobile close-button hit area and keep close action visible within header actions layout
- Add responsive WorkspaceSelector constraints to prevent menu/trigger overflow on narrow viewports
- Add a regression test that verifies the mobile close button remains visible and clickable
2026-04-08 09:07:34 -07:00
gsxdsm
468b0070c5 fix: include remaining local updates 2026-04-08 08:57:19 -07:00
gsxdsm
c152517d1e fix: recover approved triage tasks stuck specifying 2026-04-08 08:57:09 -07:00