Commit Graph

1887 Commits

Author SHA1 Message Date
gsxdsm
97afba2f7e fix(ci): fix test failures from recent feature additions
- Add ChatStore mock to all dashboard route tests that mock @fusion/core,
  since server.ts now instantiates ChatStore(store.getFusionDir(), ...)
- Add getFusionDir to createMockStore in server.test.ts
- Gate AI session cleanup scheduling behind shouldScheduleAiSessionCleanup()
  (returns false in test env) to prevent open handle warnings
- Fix desktop tests: DASHBOARD_URL is now exported as a function alias,
  update assertions to call DASHBOARD_URL() instead of using as string
- Add node:os mocks to system-metrics.test.ts for deterministic results
- Replace hardcoded maxWorkers=16 with availableParallelism()-based
  calculation in all vitest configs to prevent OOM on 2-core CI runners
- Add --workspace-concurrency=2 to pnpm test commands
- Fix TaskCard tests: update mission badge title assertions to full titles
- Remove unused /api/mesh/state route
- Fix plugin-auto-label: add isError field, async onTaskCreated, "tests" keyword
- Fix plugin-ci-status: add module-level logger, tighten test assertions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 08:01:03 -07:00
gsxdsm
a11a745499 feat(FN-1439): render dependency titles in Task Detail modal
- Display task dependency titles alongside IDs in the Task Detail modal dependencies section
- Add truncation styling for long dependency titles with hover tooltip for full text
- Add comprehensive tests for dependency label rendering with various title lengths
- Update styles.css with dependency label truncation classes
2026-04-10 07:40:55 -07:00
gsxdsm
0f154496d4 feat(FN-1405): add run-audit and timeline API endpoints with typed client
- Add run-audit routes in routes.ts for starting/canceling/stream/querying agent run audits
- Add timeline routes for streaming agent run timeline events
- Create typed API client wrappers in api.ts for frontend consumption
- Add comprehensive route-level verification tests for run-audit and timeline endpoints
- Fix TypeScript errors in run-audit routes
- Document run-audit endpoints in README
2026-04-10 07:36:22 -07:00
gsxdsm
bb679d5aa1 feat(FN-1532): add performance indexes for dashboard boot queries
- Add composite indexes for dashboard boot query paths
- Optimize taskList queries with (column, updatedAt) and (column, status, updatedAt) indexes
- Optimize activityLog queries with (timestamp DESC, taskId) index
- Add idempotent CREATE INDEX IF NOT EXISTS pattern for migrations
- Document index patterns in memory.md for future schema changes
- Update schema version assertions in db.test.ts and task-documents.test.ts
- Add changeset for dashboard load performance improvement
2026-04-10 07:26:13 -07:00
gsxdsm
31aaa0ec5c fix(engine): recover orphaned tasks at startup
Run self-healing startup recovery after resumeOrphaned so stale in-progress tasks do not wait for the maintenance interval.
2026-04-10 07:20:05 -07:00
gsxdsm
75d160e3e3 fix(engine): recover orphaned tasks at startup 2026-04-10 07:19:26 -07:00
gsxdsm
24ec16f6d3 feat(FN-1438): enable description expansion in task creation forms
- Fix textbox role selector to avoid matching the expand button in TaskForm
- Enable description expansion in create mode for better task input experience
- Update tests in NewTaskModal and TaskForm to cover the new behavior
2026-04-10 07:08:13 -07:00
gsxdsm
325ae22624 feat(FN-1354): add auto-summarize task titles feature
- Add /api/ai/summarize-title endpoint for AI-generated task titles
- Integrate title summarization into task creation flow when autoSummarizeTitles is enabled
- Add debug logging and error checking to summarizeTitle in ai-summarize.ts
- Add error logging to route handler and task store for failed summaries
- Add comprehensive integration tests for the summarize-title API endpoint
- Add memory entry documenting the auto-summarize titles bug fix
2026-04-10 07:04:15 -07:00
gsxdsm
57d6305a4b feat(FN-1412): add plugin lifecycle event relay over dashboard SSE
- Add PluginLifecycleEvent type and relay infrastructure in sse.ts
- Emit plugin lifecycle events (install, uninstall, enable, disable) via dashboard SSE
- Wire up plugin events in server.ts to broadcast to connected clients
- Add comprehensive tests for SSE plugin event relay and server integration
- Add .fusion/memory.md with plugin lifecycle documentation
2026-04-10 03:15:45 -07:00
gsxdsm
5053c3b4c7 docs(FN-1462): update project memory with context-limit recovery learnings 2026-04-10 03:09:26 -07:00
gsxdsm
d1e580e577 feat(FN-1275): add Routines tab to ScheduledTasksModal
- Add RoutineCard component with status display and run history
- Add RoutineEditor form with trigger, agent, policy, and model fields
- Integrate Routines tab into ScheduledTasksModal alongside Scheduled Tasks
- Add CSS styles for routine components
- Add comprehensive tests for RoutineCard, RoutineEditor, and ScheduledTasksModal
2026-04-10 03:07:25 -07:00
gsxdsm
e028a57bea feat(FN-1462): fix compact-and-retry path to not mark task as failed on successful recovery
- Add return statement after successful context compaction and resume
- When compact-and-resume succeeds (promptWithFallback completes without error),
  executor now returns early instead of falling through to failure path
- This allows the finally block to clean up without marking the task as failed
- Add logging for recovery success and failure paths
- Add regression tests for context limit error detection
- Pattern is conservative: requires both 'context window' and 'exceeds' present
2026-04-10 03:05:41 -07:00
gsxdsm
3cb59159e5 feat(FN-1336): add write-through cache to GlobalSettingsStore
- Add in-memory cache to GlobalSettingsStore for fast settings reads
- Add getSettingsFast() to TaskStore that uses the cached settings
- Update GET /settings route to use getSettingsFast() for faster responses
- Add invalidateCache() method for testing and external process scenarios
- Document write-through cache pattern in .fusion/memory.md
2026-04-10 03:03:51 -07:00
gsxdsm
f246fe4896 feat(FN-1462): add context window exceeds limit pattern to context-limit-detector
- Add new regex pattern /context\s+window\s+exceeds/i to match provider JSON error
  envelope variant: "context window exceeds limit (2013)"
- Add 4 new test cases for the variant pattern
- Pattern is conservative: requires both "context window" and "exceeds" present
2026-04-10 03:02:38 -07:00
gsxdsm
dd77c79718 feat(FN-1529): implement search query propagation to remote node data
- Add search query propagation so remote nodes receive and use query filters
- Update api-node.ts to accept and forward search query parameters
- Add useRemoteNodeData query key dependency for proper re-fetching on filter changes
- Add api-node.test.ts with tests for search query propagation
- Add comprehensive tests for App component including remote data filtering
- Document search query propagation pitfall in .fusion/memory.md
2026-04-10 02:59:38 -07:00
gsxdsm
a3d70e5190 feat(FN-1528): sanitize Kimi 404 url.not_found errors in usage screen
- Add sanitization for Kimi API 404 url.not_found error messages in usage.ts
- Replace technical error codes with user-friendly messages to avoid leaking internal API details
- Add regression test covering error sanitization with mock usage data
2026-04-10 02:57:32 -07:00
gsxdsm
174ef490e7 feat(FN-1404): add run-audit instrumentation layer for agent run mutations
- Add shared RunAuditService in packages/engine/src/run-audit.ts for tracking agent run state transitions
- Instrument HeartbeatMonitor to log run mutations (create, complete, error, skip) with timestamps and context
- Instrument TaskExecutor to log run mutations during task execution lifecycle
- Instrument Merger to log run mutations during merge workflow
- Add run-audit pattern documentation to project memory
- Fix: remove audit calls from non-run recovery methods to avoid false positives
2026-04-10 02:56:57 -07:00
gsxdsm
61adfc87de feat(FN-1437): theme workflow steps tab with CSS classes
- Replace inline styles in WorkflowResultsTab with semantic CSS classes
- Add .workflow-results-tab, .workflow-results-header, .workflow-step-card, .workflow-step-header, and .workflow-step-output CSS rules to styles.css
- Add tests for WorkflowResultsTab component with mocked workflow step data
2026-04-10 02:50:04 -07:00
gsxdsm
d53cb83f02 feat(FN-1529): add failing regression tests for search query propagation
Tests added:
- api-node.test.ts: q parameter forwarding in fetchRemoteNodeTasks
- useRemoteNodeData.test.ts: searchQuery propagation and refetch on change
- App.test.tsx: searchQuery passed to useRemoteNodeData in remote mode

All tests fail as expected because:
- fetchRemoteNodeTasks doesn't accept searchQuery parameter
- useRemoteNodeData doesn't forward searchQuery
- App.tsx doesn't pass searchQuery to useRemoteNodeData
2026-04-10 02:44:43 -07:00
gsxdsm
e664d133ea feat(FN-1274): add routine CRUD API routes and frontend functions
- Add routineStore to ServerOptions for dependency injection
- Implement CRUD API routes for routines (create, list, get, update, delete)
- Add frontend API functions for routine management
- Include comprehensive route tests for all routine endpoints
- Update memory documentation with webhook HMAC testing pattern
2026-04-10 02:42:48 -07:00
gsxdsm
517b1bb46c feat(FN-1531): add memory-aware dev entrypoint
- Add scripts/dev-with-memory.mjs entrypoint script
- Configure memory monitoring and optimization for development mode
- Update package.json scripts to include memory-aware dev option
2026-04-10 02:42:11 -07:00
gsxdsm
bee0e399ff feat(FN-1401): integrate PluginRunner into runtime lifecycle
- Integrate PluginRunner into InProcessRuntime for plugin lifecycle management
- Wire plugin:created, plugin:updated, plugin:deleted events through runtime event bus
- Add plugin tools to StepSessionExecutor so plugins can provide tools during step execution
- Fix PluginRunner to pass PluginContext to task lifecycle hooks (onTaskCreated, onTaskUpdated, etc.)
- Add PluginRunner tests covering init/shutdown, timeout isolation, and sync event behavior
- Add InProcessRuntime tests verifying plugin integration
- Update memory documentation with plugin runner lifecycle wiring
2026-04-10 02:29:47 -07:00
gsxdsm
fbb73f79f4 feat(FN-1427): fix file browser modal height and add regression tests
- Fix file browser modal height overflow by updating CSS max-height and overflow properties
- Add regression tests for file browser modal height behavior
- Include FN-1410 changes: improve MissionManager UI and add tests
2026-04-10 02:23:38 -07:00
gsxdsm
5598b49e68 feat(FN-1410): add inline missions header parity with agents view
- Add MissionManager component updates with expanded header controls
- Implement inline mission actions (interview, autopilot toggle) matching AgentsView style
- Add MissionManager unit tests with comprehensive coverage
- Add CSS styles for mission header alignment and interaction states
2026-04-10 02:14:48 -07:00
gsxdsm
fb8e77290b feat(FN-1368): add milestone and slice interview sessions
- Create milestone-slice-interview.ts module for AI-guided milestone/slice planning
- Add interview session types (milestone_interview, slice_interview) to AiSessionStore
- Wire up server rehydration and automatic session cleanup
- Add milestone/slice interview routes to mission router with SSE streaming
- Extend MissionStore to persist planningNotes and verification fields
- Add comprehensive tests for milestone-slice interview engine
2026-04-10 02:06:23 -07:00
gsxdsm
925bb2c43b test(FN-1368): tests for planning UI and interview modal 2026-04-10 02:00:45 -07:00
gsxdsm
81dac0f3bf feat(FN-1368): add CSS styles for planning indicators and triage preview 2026-04-10 01:53:56 -07:00
gsxdsm
5a6640df1d feat(FN-1368): add triage preview panel to MissionManager 2026-04-10 01:53:22 -07:00
gsxdsm
7746174c5f feat(FN-1368): add Plan buttons and planning state indicators to MissionManager 2026-04-10 01:52:07 -07:00
gsxdsm
eb76e23aa9 feat(FN-1368): create MilestoneSliceInterviewModal component 2026-04-10 01:50:28 -07:00
gsxdsm
922eb4321d feat(FN-1368): add milestone/slice interview API functions and triage preview 2026-04-10 01:48:11 -07:00
gsxdsm
079ed58bd1 feat(FN-1368): add planState and planningNotes to frontend mission types 2026-04-10 01:45:06 -07:00
gsxdsm
aa8afb82ed feat(FN-1361): add chat view with SSE streaming and session management
- Add ChatView component with sidebar navigation and message thread layout
- Add useChat hook with SSE streaming state management for real-time updates
- Add chat API functions for sessions and messages (create, list, send, stream)
- Add mobile-responsive CSS styles for chat interface
- Add tests for useChat hook and ChatView component
- Integrate chat into task view and navigation (Header, MobileNavBar)
2026-04-10 01:42:07 -07:00
gsxdsm
f00cf6e4a1 feat(FN-1266): add Budget Governance documentation and dashboard API tests
- Add comprehensive Budget Governance documentation to AGENTS.md
- Document AgentBudgetConfig and AgentBudgetStatus interfaces
- Document budget reset behavior and API endpoints
- Add Dashboard Configuration section for budget settings UI
- Add Agent Budget API routes tests (GET/POST /api/agents/:id/budget)
- Test budget status computation with threshold and over-budget scenarios
- Test budget reset functionality with token counter clearing
- Remove extra closing brace in routes.test.ts
2026-04-10 01:22:06 -07:00
gsxdsm
50807647ec feat(FN-1266): add Budget Governance documentation to AGENTS.md 2026-04-10 01:06:48 -07:00
gsxdsm
818562bd95 feat(FN-1266): add dashboard API integration tests for budget endpoints 2026-04-10 01:05:21 -07:00
gsxdsm
bb5a78f422 docs(FN-1377): update memory with new theme count 2026-04-10 01:00:28 -07:00
gsxdsm
845003a996 test(FN-1377): add ThemeSelector tests for 6 new themes 2026-04-10 00:59:17 -07:00
gsxdsm
5efaefbe1b feat(FN-1377): register 6 new themes in ThemeSelector and flash-prevention 2026-04-10 00:58:52 -07:00
gsxdsm
01d9fba122 feat(FN-1377): add swatch classes for 6 new themes 2026-04-10 00:58:12 -07:00
gsxdsm
1909851bba feat(FN-1377): add CSS theme blocks for 6 new themes 2026-04-10 00:57:29 -07:00
gsxdsm
e5479d9692 feat(FN-1377): add sandstone, lagoon, frost, lavender, neon-bloom, sepia theme IDs to core types 2026-04-10 00:56:12 -07:00
gsxdsm
4ea294b8be feat(FN-1360): add chat API with AI agent and SSE streaming
- Add ChatManager class for managing chat sessions with AI agent integration
- Implement SSE streaming for real-time chat responses
- Add chat API routes for creating sessions, sending messages, and streaming responses
- Wire ChatStore and ChatManager into server initialization
- Add comprehensive test suite for all chat routes
2026-04-10 00:48:47 -07:00
gsxdsm
9575350432 feat(FN-1265): add agent budget settings UI and API
- Add Budget Settings section to ConfigTab with token limit, usage threshold, budget period, and reset day inputs
- Add budget usage badge to DashboardTab showing token consumption and threshold warning
- Add budget API functions to api.ts (getBudgetSummary, updateBudgetConfig, deleteBudgetUsage)
- Add budget routes to routes.ts for GET/PATCH/DELETE agent budget endpoints
- Add CSS styles for budget progress bar, warning indicators, and section layout
- Add comprehensive tests for budget UI components and API routes
2026-04-10 00:25:17 -07:00
gsxdsm
db14d9e077 feat(FN-1409): extract color-theme CSS to separate theme-data.css
- Extract all color-theme CSS variable blocks from styles.css into a dedicated theme-data.css file
- Add dynamic loading of theme-data.css for non-default color themes via useTheme hook
- Preload theme-data.css for the default theme in index.html to avoid flash
- Update status-colors-theme tests for dynamic theme loading behavior
- Update memory and README with theme-data.css file location
2026-04-10 00:07:35 -07:00
gsxdsm
dfaf768601 feat(FN-1430): add worktree execution boundaries to prevent out-of-scope modifications
- Add worktree-aware path boundaries in agent factory to prevent cross-task contamination
- Sync core agent prompts with worktree boundary guidance for consistent enforcement
- Add boundary guidance to executor prompts so agents understand their scope
- Fix TypeScript types for worktree boundary wrapping
- Add comprehensive tests for boundary wrapping behavior
- Create changeset for @gsxdsm/fusion (minor)
2026-04-09 23:59:45 -07:00
gsxdsm
cba41e68d6 feat(FN-1408): add node provider and remote node status integration
- Add NodeProvider and useNodeContext to App shell for centralized node state
- Add node selector dropdown and status indicator to Header component
- Wire remote node data and event hooks into task-facing views
- Update App.test.tsx mocks for new node context providers
- Add project memory learnings for node context wiring patterns
- Update dashboard guide documentation for node selection
2026-04-09 23:42:25 -07:00
gsxdsm
5063e24057 feat(FN-1408): complete Step 1 - Add node context plumbing at App shell
- Wrap AppInner with NodeProvider in App.tsx
- Read node context state (currentNode, currentNodeId, isRemote, setters)
- Add useRemoteNodeData and useRemoteNodeEvents hooks
- Sync selected node with useNodes() results
- Update Board/ListView/ExecutorStatusBar to use remote tasks when in remote mode
- Add mocks for NodeContext, useRemoteNodeData, useRemoteNodeEvents, useNodes in App.test.tsx
- Clear fusion-dashboard-current-node in test setup to avoid cross-test leakage
2026-04-09 23:28:25 -07:00
gsxdsm
b1fc0369e6 feat(FN-1387): add fullscreen expand toggle to agent log viewer
- Add expand/collapse fullscreen button to AgentLogViewer header
- Implement fullscreen mode with fixed overlay positioning
- Add CSS styles for fullscreen container and header visibility
- Add comprehensive tests for fullscreen toggle functionality
2026-04-09 23:22:28 -07:00
gsxdsm
bba1e45de7 feat(FN-1504): add non-mobile search toggle for board/list views
- Add search toggle button to header controls for non-mobile viewports
- Toggle persists search visibility state across board and list views
- Implement responsive visibility rules (show on non-mobile, hide on mobile)
- Add comprehensive tests for tablet header controls and Header component
- Update Header component with search toggle functionality
2026-04-09 23:03:05 -07:00