Commit Graph

165 Commits

Author SHA1 Message Date
Fusion
bd7ada7533 feat(FN-1671): add AI milestone suggestion feature
- Add milestone suggestion generation backend contract with scoring algorithm
- Add milestone suggestion hook actions (generate, accept, dismiss) in useRoadmaps
- Add RoadmapsView UI with suggestion panel, cards, and accept/dismiss buttons
- Document AI milestone suggestion feature in dashboard guide
- Add roadmap-suggestions unit tests covering generation and UX flows
2026-04-15 09:49:45 -07:00
Fusion
647a10b161 feat(FN-1634): promote mailbox to first-class navigation view
- Add MailboxView as a full-page navigation view replacing the modal-based approach
- Migrate MessageStore from filesystem to SQLite backend for message persistence
- Implement conversation grouping for inbox display with unread badge state
- Remove modal plumbing (useModalManager, AppModals exports) and simplify App.tsx
- Add evictStaleProcessing() to TriageProcessor for self-healing hung triage sessions
- Add comprehensive MailboxView tests and Header mailbox tests
- Update README documentation with MailboxView features
- Add CSS styles for MailboxView component
- Fix MobileNavBar tests for mailbox tab visibility
2026-04-15 08:04:02 -07:00
Fusion
940494272d feat(FN-1670): add roadmap drag-and-drop with milestone and feature reordering
- Implement RoadmapsView component with drag-and-drop support for milestones and features
- Add milestone reorder via drag-and-drop with optimistic UI updates and API persistence
- Add feature reorder within milestones and cross-milestone move support
- Add useRoadmaps hook with full CRUD API for roadmaps, milestones, and features
- Add /roadmaps route with sidebar navigation to roadmap views
- Add comprehensive tests for API, useRoadmaps hook, and RoadmapsView component
- Update dashboard guide with roadmap management documentation
- Harden API with race-condition safety and proper error handling
2026-04-15 06:55:34 -07:00
gsxdsm
cd5d4551b6 feat(FN-1792): merge fusion/fn-1792 2026-04-15 04:00:56 -07:00
Fusion
885f29382c feat(FN-1629): add pagination to agent logs
- Add pagination support to TaskStore.getAgentLogs() with limit/offset parameters
- Add GET /tasks/:id/logs API route with pagination support
- Add fetchAgentLogs API client with pagination parameters
- Refactor useAgentLogs hook for incremental loading with loadMore callback
- Update useMultiAgentLogs for pagination consistency across multiple task IDs
- Add Load More UI to AgentLogViewer component
- Wire up Load More in TaskDetailModal agent log section
- Fix offset slice direction bug in getAgentLogs
- Remove incorrect reverse() call in getAgentLogs offset logic
- Add comprehensive tests for useAgentLogs and useMultiAgentLogs pagination
2026-04-15 02:53:06 -07:00
gsxdsm
7f830626db feat(FN-1669): merge fusion/fn-1669 2026-04-15 02:01:02 -07:00
Fusion
b9264670e2 feat(FN-1549): simplify chat creation with agent-only selection and auto title
- Remove task selection from chat creation flow
- Add agent-only chat creation with automatic title generation
- Introduce useChat hook for unified chat state management
- Update ChatView with simplified creation UI
- Add CSS styles for chat creation interface
- Add comprehensive tests for chat manager and routes
- Update routes to support agent-only chat creation
2026-04-15 01:49:41 -07:00
gsxdsm
208062b8b4 feat(FN-1765): merge fusion/fn-1765 2026-04-15 01:01:08 -07:00
Fusion
a51e75941c feat(FN-1862): add completion state tracking for onboarding
- Add markOnboardingCompleted() to set completedAt timestamp when user finishes onboarding
- Add isOnboardingCompleted() to check if onboarding was completed (vs dismissed)
- Update ModelOnboardingModal to call markOnboardingCompleted on successful completion
- Skip onboarding auto-open when already completed locally
- Add completion state tracking tests in ModelOnboardingModal.test.tsx
- Add model-onboarding-state unit tests
- Update useAuthOnboarding to check local completion state before auto-opening
- Document localStorage completion state tracking pattern in .fusion/memory.md
2026-04-14 23:44:40 -07:00
gsxdsm
42da5e80cb feat(FN-1748): merge fusion/fn-1748 2026-04-14 22:45:59 -07:00
gsxdsm
fa5cd05078 feat(FN-1857): merge fusion/fn-1857 2026-04-14 18:46:34 -07:00
gsxdsm
0a4f054207 feat(FN-1704): add dashboard resume entry point for onboarding
- Add model-onboarding-state.ts module for persisting onboarding step state
- Create OnboardingResumeCard component with resume functionality
- Wire resume card into App.tsx (visible when onboarding is resumable and modal is closed)
- Add unit tests for state helpers and resume card
- Add integration tests for App.tsx resume card behavior
- Update documentation with resume banner behavior
- Fix missing contextVersionAtStart property declaration in useBadgeWebSocket.ts
2026-04-14 14:16:32 -07:00
gsxdsm
8b9ab099a2 feat(FN-1763): merge fusion/fn-1763 2026-04-14 12:15:01 -07:00
gsxdsm
102af7f4f2 feat(FN-1747): merge fusion/fn-1747 2026-04-14 11:43:52 -07:00
gsxdsm
c7252a07f1 feat(FN-1764): merge fusion/fn-1764 2026-04-14 11:29:16 -07:00
gsxdsm
8c798952c4 feat(FN-1746): merge fusion/fn-1746 2026-04-14 10:58:57 -07:00
gsxdsm
4f23883bac feat(FN-1734): merge fusion/fn-1734 2026-04-14 09:29:08 -07:00
gsxdsm
f72a3a39db feat(FN-1771): add dashboard memory settings UX with backend selector and capability-aware editing
- Add /api/memory/backend endpoint returning current backend, capabilities, and available backends
- Create useMemoryBackendStatus hook with polling and frontend-friendly interface
- Add MemorySettingsSection to SettingsModal with backend selector dropdown
- Implement capability-aware UI: readonly backends disable save, fallback on unknown types
- Add comprehensive tests for API endpoints and hook behavior
- Update architecture docs with memory backend architecture section
2026-04-13 22:32:31 -07:00
gsxdsm
26732e7e43 feat(FN-1719): rebuild eslint baseline and add memory lessons
- Rebuild eslint config with context-aware flat config for better TypeScript/JSX handling
- Add memory lessons for lint/type/test baseline restoration
- Skip pre-existing flaky stream test (flushes a final complete event)
- Fix api.ts require import path
- Add ProjectEngineManager.startReconciliation mock to tests for main compatibility
2026-04-13 18:21:31 -07:00
gsxdsm
98bc2dfdae feat(FN-1702): merge fusion/fn-1702 2026-04-13 17:04:15 -07:00
gsxdsm
ebbc463dc8 feat(FN-1650): merge fusion/fn-1650 2026-04-13 15:35:08 -07:00
gsxdsm
f395a3d9e5 feat(FN-1680): merge fusion/fn-1680 2026-04-13 15:29:41 -07:00
gsxdsm
a10dfe5f21 fix(dashboard): ensure file/import API calls are project-scoped in tests
Update 4 test files to pass projectId="project-1" to hooks/components
and assert it flows through to the API layer:
- useFileBrowser: fetchFileList receives (taskId, path, projectId)
- useFileEditor: fetchFileContent/saveFileContent receive projectId
- FileBrowser: deleteFile/renameFile/copyFile/moveFile receive projectId
- GitHubImportModal: apiImportGitHubIssue/Pull receive projectId

All 6653 tests pass across 242 test files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:40:34 -07:00
gsxdsm
d14cba949b fix: add projectId to remaining unscoped API functions
- GitHub import functions: apiImportGitHubIssue, apiBatchImportGitHubIssues, apiImportGitHubPull
- Task file operations: fetchFileList, fetchFileContent, saveFileContent
- AI title summarization: summarizeTitle
- Terminal command execution: execTerminalCommand
- Wire projectId through GitHubImportModal, AppModals, useFileBrowser, useFileEditor hooks

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 19:34:22 -07:00
gsxdsm
30eaa814e6 feat(FN-1657): merge fusion/fn-1657 2026-04-12 19:31:13 -07:00
gsxdsm
2562814518 fix: project-scope terminal, file browser, agent execution, and heartbeat monitor
- TerminalService: use per-project instance map instead of destructive singleton
- File browser: thread projectId through API functions, hooks, and components
- Workspace file editor: pass projectId to read/write operations
- Agent heartbeat: guard execution with project scope validation
- Agent runs/stop: validate heartbeatMonitor matches scoped project
- CLI dashboard/serve: pass rootDir to heartbeatMonitor via server options
- Add getRootDir() to HeartbeatMonitor for scope comparison

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 18:38:26 -07:00
gsxdsm
9d2f61501b fix: scope all git, activity, webhook, and summarize-title routes to correct project store
- Fix 30 git routes to use getScopedStore(req) instead of global store
- Fix activity GET/DELETE routes to use scoped store
- Fix POST /api/github/webhooks to use scoped store for badge updates
- Fix POST /api/ai/summarize-title to use scoped store for settings
- Fix GET /api/git/worktrees to use scoped store for task listing
- Add projectId parameter to all git and activity frontend API functions
- Update useActivityLog hook to pass projectId through

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-04-12 17:55:07 -07:00
gsxdsm
e4853c01f0 feat(FN-1656): complete Step 1 — implement canonical node-project counting rules 2026-04-12 17:36:18 -07:00
gsxdsm
a34ba41ad1 Harden architecture hot paths 2026-04-12 15:13:27 -07:00
gsxdsm
51f31f099a fix(FN-1620): show error sessions in notification banner
- Update BackgroundTasksIndicator to display error sessions count alongside active sessions
- Include error sessions in App filter for notification banner visibility
- Add session cancellation for mission interviews on banner dismiss
- Add comprehensive test coverage for SessionNotificationBanner component
- Update useBackgroundSessions hook to expose error session counts
2026-04-12 13:46:32 -07:00
gsxdsm
52f1f77369 test: remove waits from slow tests 2026-04-12 12:52:32 -07:00
gsxdsm
231c984a27 feat(FN-1594): merge fusion/fn-1594 2026-04-12 12:33:05 -07:00
gsxdsm
28e0061b2f feat(FN-1613): merge fusion/fn-1613 2026-04-12 08:25:17 -07:00
gsxdsm
8f0bcf7f00 feat(FN-1465): merge fusion/fn-1465 2026-04-12 07:00:49 -07:00
gsxdsm
98dc20b3d3 feat(FN-1584): add step-change dependency and polling to useTaskDiffStats
- Add step-based dependency to useTaskDiffStats hook to trigger refetch when task steps change
- Implement 5-second polling interval for live diff statistics updates
- Add comprehensive test coverage for polling behavior and step-change detection
- Update TaskCard to pass step information to useTaskDiffStats
- Add TaskCard unit tests for diff statistics display
2026-04-11 11:27:32 -07:00
gsxdsm
b40c9b5406 feat(FN-1433): wire prompt overrides into mission interview service
- Import resolvePrompt and PromptOverrideMap from @fusion/core
- Add promptOverrides parameter to all agent creation paths:
  - createMissionInterviewSession
  - submitMissionInterviewResponse
  - retryMissionInterviewSession
  - initializeAgent
  - createMissionInterviewAgent
  - ensureMissionInterviewAgent
- Use resolvePrompt('planning-system', promptOverrides) for effective prompt
- Fall back to MISSION_INTERVIEW_SYSTEM_PROMPT when override absent
- Update module docs to reflect prompt override behavior
2026-04-11 08:52:39 -07:00
gsxdsm
afa2e153ee fix(FN-1488): add showQuickChatFAB setting to control Quick Chat FAB visibility
- Add showQuickChatFAB boolean setting to ProjectSettings type
- Add useAppSettings hook function for accessing the setting
- Wire QuickChatFAB visibility in App.tsx based on setting
- Hide QuickChatFAB in MobileNavBar when setting is false
- Add Settings UI toggle for the new setting
- Add CSS for hiding QuickChatFAB on mobile when disabled
- Add comprehensive tests for all affected components
- Fix QuickChatFAB onOpenChange test to use controlled mode
- Update settings reference documentation
2026-04-11 00:18:22 -07:00
gsxdsm
3fdd04d6cb feat(FN-1583): merge fusion/fn-1583 2026-04-10 22:20:39 -07:00
gsxdsm
5984584d22 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
c9a1e94bbe fix(FN-1446): improve test reliability and git command TTY handling
- Fix QuickEntryBox focus restoration after task creation with proper submission state tracking
- Improve QuickEntryBox tests by using explicit promise resolution and proper afterEach cleanup with act() wrappers
- Fix TaskCard tests to use proper act() wrappers for async operations
- Add stdio: 'pipe' to all git execSync calls to prevent TTY interaction issues in CI environments
- Add test log suppression for noisy subagent and pi-claude-cli output in vitest setup
2026-04-10 19:49:05 -07:00
gsxdsm
2713616c7d feat(FN-1559): recover orphaned features in autopilot reconciliation
- Add tryRelinkOrphanedFeature() to find and link matching tasks
- Normalize titles (trim, lowercase, collapse whitespace) for matching
- Only relink when exactly one task matches (ambiguous = no action)
- Sync feature status from task state on successful relink
- Normalize to 'defined' when no safe relink exists
- Add 7 tests for orphaned feature relink scenarios
- All 57 tests passing
2026-04-10 19:14:23 -07:00
gsxdsm
f7322ab541 fix: improve merge verification and dashboard behavior 2026-04-10 18:30:23 -07:00
gsxdsm
d693e45f2b 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
9d5b0865b8 feat(FN-1544): add viewport-gated loading and lightweight memo comparison
- Add viewport-gated fetching to TaskCard component so only visible cards load their data
- Implement lightweight memo comparison to prevent unnecessary re-renders
- Add lazy enable gates to useSessionFiles and useTaskDiffStats hooks with caching
- Add comprehensive tests for useSessionFiles and useTaskDiffStats hooks
- Document viewport-gated loading patterns in memory and dashboard-load performance docs
2026-04-10 10:44:48 -07:00
gsxdsm
4161eee6e7 feat(FN-1534): fix theme-data.css URL resolution and link reuse
- Fix URL resolution in theme-data.css so it loads correctly from index.html
- Reuse theme data link element across theme updates instead of recreating it
- Update useTheme hook to properly manage theme link lifecycle
- Add comprehensive tests for useTheme hook URL handling
- Update theming documentation with URL resolution details
2026-04-10 08:53:22 -07:00
gsxdsm
2ee6d246d4 feat(FN-1535): fix theme-data.css URL resolution for file:// contexts
- Fix CSS URL resolution in memory when loading with file:// protocol
- Add DASHBOARD_URL re-export from renderer module for backward compatibility
- Update main.test.ts to use correct renderer mock reference (rendererMocks vs mocks)
- Document the URL resolution bug fix in memory
2026-04-10 08:37:28 -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
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
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
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