Commit Graph

66 Commits

Author SHA1 Message Date
gsxdsm
7f7da79443 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
97e153b754 feat(FN-1456): add explicit abandon flow for planning and subtask AI sessions
- Add abandon action to useBackgroundSessions hook for deterministic session cleanup
- Make background dismissal deterministic instead of relying on 7-day TTL expiration
- Update PlanningModeModal to include abandon button in header actions
- Add comprehensive tests for abandon behavior and session lifecycle
- Update dashboard guide with session lifecycle documentation
2026-04-09 19:35:17 -07:00
gsxdsm
c4a48491e2 feat(FN-1232): add remote node mesh dashboard integration
- Add core proxy API infrastructure (api-node.ts) with remote node communication
- Create NodeContext for centralized node state management
- Implement useNodeProxy hook for node operations (metrics, events, health)
- Implement useRemoteNodeData hook with 10-second polling for live metrics
- Implement useRemoteNodeEvents hook for real-time SSE event subscription
- Add NodeStatusIndicator component with animated status indicators
- Add comprehensive tests for all new hooks and components
- Update dashboard styles for node status visualization
2026-04-09 13:01:19 -07:00
gsxdsm
6388c40479 feat(FN-1328): enable optimistic task detail modal opening
- Update useModalManager to accept Task objects for immediate modal display before full detail loads
- Refactor TaskDetailModal to render with basic Task data and load TaskDetail asynchronously
- Update TaskCard click handlers to open modal immediately with optimistic data
- Update ListView click handler for same optimistic opening behavior
- Update AppModals types to support Task | TaskDetail union
- Add CSS for modal loading/skeleton states
- Add comprehensive tests for TaskDetailModal and useModalManager optimistic flow
- Simplify TaskCard and ListView tests to reflect new optimistic opening pattern
2026-04-08 22:21:24 -07:00
gsxdsm
bf141c47d5 test(FN-1156): add AI session lifecycle and reconnect coverage
- Add ai-session-store unit tests for upsert/get round-trips, active filtering, stale recovery, cleanup, thinking debounce, and update/delete events
- Add persistence and resume-history integration tests for planning, subtask, and mission interview sessions across SQLite reload and cancellation flows
- Add reconnect and cross-tab lock tests covering SSE Last-Event-ID replay, keep-alive ping touches, optimistic lock conflicts, stale lock expiry, and lock release on tab close
- Expand useBackgroundSessions hook tests for SSE-driven updates/deletes, project-scoped fetch/stream behavior, counts, dismiss, and refresh state handling
2026-04-08 18:13:36 -07:00
gsxdsm
2a34ebe6cc feat(FN-1154): sync AI session state across browser tabs
- Add a shared AiSessionSync store with BroadcastChannel + storage fallback, ownership locks, heartbeats, and stale-tab detection
- Merge cross-tab session snapshots into useBackgroundSessions with timestamp guards and rebroadcast SSE updates to peers
- Update background session UI and planning/mission/subtask modals to show active-tab lock status and only allow takeover when ownership is stale
- Add hook tests covering sync store messaging/fallback behavior and background session cross-tab merge flows
2026-04-08 16:48:35 -07:00
gsxdsm
833c7eb15a feat(FN-1209): add quick entry image attachment flow
- Return the created task from board quick create and propagate the onQuickCreate return type through board/list components
- Add pending image handling in QuickEntryBox with paste support, hidden file input, and an Attach action in the menu
- Render removable pending image previews, include image count in the actions badge, and clean up object URLs on reset/unmount
- Upload pending images after task creation with error toasts for failed uploads, and extend tests for attachment and quick-create behavior
2026-04-08 16:03:46 -07:00
gsxdsm
8b2881aad4 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
95c27f3950 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
8ef31a81c4 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
0359166b6c 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
321ec691bd feat(FN-1203): extract App orchestration into focused hooks
- Extract modal manager, app settings, deep-link handling, favorites, and auth onboarding into dedicated hooks
- Rewire App.tsx to consume the new hooks and reduce component-level state/effect complexity
- Preserve favorite-toggle error toast behavior in the updated favorites wiring
- Add hook-level test coverage for modal manager, app settings, deep links, favorites, and auth onboarding flows
2026-04-08 05:53:24 -07:00
gsxdsm
b9f6f8e56c feat(FN-1081): add dashboard nodes management workflow
- Add node API typings and client methods plus a polling useNodes hook with visibility-triggered refresh
- Introduce NodesView with NodeCard, AddNodeModal, and NodeDetailModal to register, inspect, update, health-check, and remove nodes
- Wire the Nodes surface into the app shell/header and add project node assignment UI with project card node badges
- Add unit coverage for useNodes, NodesView, NodeCard, Header, and ProjectCard behavior, plus node-specific dashboard styling
2026-04-07 23:30:32 -07:00
gsxdsm
c4a0da027e feat(FN-1021): stabilize terminal first-open bootstrap and WebSocket recovery
- Harden TerminalModal bootstrap to handle invalid/expired sessions on first open
- Add WebSocket reconnection logic for terminal sessions that become invalid mid-stream
- Create useTerminal hook with robust session lifecycle management
- Create useTerminalSessions hook for multi-session terminal coordination
- Add comprehensive tests for TerminalModal, useTerminal, and useTerminalSessions
- Document terminal first-open reliability behavior in dashboard README
2026-04-07 00:20:12 -07:00
gsxdsm
4d0de95ccc feat(FN-984): add agent hierarchy tree view with parent-child relationships
- Add GET /agents/:id/children API endpoint to fetch child agents of a parent
- Create fetchAgentChildren API function with tests in dashboard client
- Implement useAgentHierarchy hook with recursive tree loading and expand/collapse
- Add tree view mode to AgentsView with hierarchical agent display
- Enhance AgentDetailView with parent info and expandable children section
- Add tree view CSS styles for connection lines and expand/collapse indicators
2026-04-06 13:53:14 -07:00
gsxdsm
1d1737c9c9 feat(FN-950): add useTaskDiffStats hook for consistent done file count in TaskCard
- Create useTaskDiffStats hook to extract and compute diff stats from task data
- Use hook in TaskCard component for consistent done file count display
- Add diffStats priority tests ensuring diff stats take precedence over steps
- Add useTaskDiffStats mock and comprehensive unit tests for the hook
2026-04-04 20:18:35 -07:00
gsxdsm
753f2561cd feat(FN-947): show files-changed on done column task cards
- Extend useSessionFiles hook to fetch files for done column tasks
- Update TaskCard to display files-changed indicator on done column cards
- Add tests for useSessionFiles done column support
- Add tests for TaskCard files-changed display in done column
2026-04-04 18:54:13 -07:00
gsxdsm
bc900a1a8c feat(FN-900): replace ChangedFilesModal with files tab in TaskDetailModal
- Add initialTab prop to TaskDetailModal to open directly on a specific tab
- Replace onOpenFilesForTask with onOpenDetailWithTab across App, Board, Column, WorktreeGroup
- Update TaskCard click handlers to open detail modal with files tab instead of separate modal
- Delete ChangedFilesModal component and useChangedFiles hook (296 + 78 lines removed)
- Remove associated tests (ChangedFilesModal.test.tsx, useChangedFiles.test.ts)
- Add changeset for patch release
2026-04-04 17:26:51 -07:00
gsxdsm
47ccd20669 feat(FN-936): add modal description persistence for re-entry
- Add modalPersistence hook for saving/restoring modal state (description, goal) via localStorage
- Update PlanningModeModal to persist and restore description across re-opens
- Update SubtaskBreakdownModal to persist and clear description on resume flow
- Update MissionInterviewModal to clear goal after starting interview
- Add unit tests for modalPersistence hook
- Add integration tests for modal re-entry behavior across all three modals
- Add changeset for published package patch bump
2026-04-04 15:56:46 -07:00
gsxdsm
d1da9721a1 feat(FN-881): add bounded bootstrap timeouts and xterm init watchdog
- Add bounded bootstrap timeouts with stale-result guards to useTerminalSessions hook
- Implement xterm init watchdog with distinct recovery path for terminal initialization failures
- Refactor TerminalModal component with improved error handling and timeout recovery
- Add comprehensive test suites for useTerminalSessions hook and TerminalModal component
- Update dashboard README with watchdog documentation
2026-04-04 10:48:23 -07:00
gsxdsm
9900c2d115 fix: unify diff endpoints and show changed files on done task cards
- Server /tasks/:id/diff and /tasks/:id/file-diffs now both use
  resolveDiffBase() for consistent file lists across card and modal
- Both endpoints handle done tasks via mergeDetails.commitSha,
  returning structured { files, stats } from the merge commit
- TaskChangesTab uses fetchTaskDiff for all columns (no more
  fetchCommitDiff/parsePatch client-side path for done tasks)
- useChangedFiles hook simplified — server handles done tasks
- Done task cards show "N files changed" button using mergeDetails
- Updated tests for new unified data flow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 08:55:46 -07:00
gsxdsm
7f4d757802 fix(FN-868): add terminal bootstrap error handling with retry and improve workflow step manager
- Add bootstrap error state and retry logic to useTerminalSessions hook to prevent indefinite 'Starting terminal' hang
- Add error/retry UI states in TerminalModal component with CSS styling
- Add tests for useTerminalSessions bootstrap error and retry behavior
- Refactor WorkflowStepManager with template support and improved UX
- Extract CSS from inline styles to stylesheet for terminal and workflow components
- Document terminal startup error handling and non-hanging guarantee in dashboard README
2026-04-04 07:11:40 -07:00
gsxdsm
2a914dec89 feat(FN-839): add nord, dracula, gruvbox, and tokyo-night color themes
- Add new theme IDs (nord, dracula, gruvbox, tokyo-night) to core types and ThemeSelector component
- Add CSS custom properties for all four themes covering background, text, accent, border, and surface colors
- Add theme validation sync, bootstrap logic, and unit tests for ThemeSelector and useTheme hook
- Update GitManagerModal to support new theme-aware styling
- Update README theme system documentation with expanded theme list
- Add changeset for published package
2026-04-04 02:44:58 -07:00
gsxdsm
680a60a13f docs(FN-823): clarify agent log content is never truncated per-entry
- Clarify in dashboard README that agent log entries are never truncated
- Add maxLength safeguards in store (getAgentLog), routes, useAgentLogs, and useMultiAgentLogs hooks
- Add tests for store, AgentLogViewer component, useAgentLogs hook, useMultiAgentLogs hook, and dashboard routes
- All tests verify that log text and detail fields are preserved in full without per-entry truncation
2026-04-04 01:41:13 -07:00
gsxdsm
9fa8f5f223 feat(FN-801): show hidden files in workspace file listings
- Remove dotfile filtering from file-service so hidden files appear in workspace browser
- Update FileBrowserModal and TaskDetailModal UI to display hidden file entries
- Add UI/hook tests for hidden file entries in FileBrowserModal and useWorkspaceFileBrowser
- Add file-service unit tests for listing, reading, and filtering hidden files
- Update dashboard styles for hidden file display
- Document Files feature section in README
2026-04-03 18:50:05 -07:00
gsxdsm
0517750412 feat(FN-776): rework changed-files modal into mobile-friendly navigation flow
- Redesign ChangedFilesModal as a two-view navigation flow (file list → file detail) with back navigation
- Fix theming and loading/reading ergonomics for the diff viewer
- Enhance useChangedFiles hook with improved loading and error states
- Add comprehensive tests for modal navigation, diff rendering, and edge cases
- Update styles with mobile-friendly layout and diff viewer improvements
- Update dashboard README with mobile navigation description
2026-04-03 10:47:44 -07:00
gsxdsm
5c6a574b35 fix(FN-732): fix dashboard real-time updates and SSE pipeline
- Fix SSE event relay to properly broadcast task store events to dashboard clients
- Use named heartbeat events instead of SSE comments for reliable keep-alive
- Add missing event emission in core task store for state changes
- Add comprehensive tests for SSE pipeline, event emission, and UI hooks
- Remove broken useTerminal hook and AgentLogViewer tests, fix flaky test suites
2026-04-02 19:34:35 -07:00
gsxdsm
7fc187d9e6 feat(FN-723): add optimistic state insertion for createTask and duplicateTask
- Insert new tasks at correct sorted position in useTasks cache immediately on create/duplicate
- Compute insertIndex based on columnMovedAt/createdAt sorting to maintain board order
- Add comprehensive tests for optimistic insertion ordering in useTasks hook
- Cover edge cases: empty columns, single-item columns, and multi-item sorted columns
2026-04-02 18:47:38 -07:00
gsxdsm
1f8465342c fix(FN-000): scope dashboard project flows 2026-04-02 17:51:04 -07:00
gsxdsm
9f1347f1f4 feat(FN-682): add multi-tab terminal support with session persistence
- Add useTerminalSessions hook for managing multiple terminal sessions
- Update TerminalModal to support multiple tabs with persistent sessions
- Fix memory leak in useTerminalSessions (proper cleanup on unmount)
- Fix type leak (avoid exposing internal session state)
- Add comprehensive test coverage for useTerminalSessions hook
- Update TerminalModal tests for multi-tab behavior
- Remove obsolete test files and highlightDiff utility
2026-04-02 10:22:31 -07:00
gsxdsm
5b8f83d966 feat(KB-662): add visibility-based refresh to dashboard hooks 2026-04-01 21:57:23 -07:00
gsxdsm
fa90b69f2f feat(KB-662): complete Step 2 — add visibility refresh tests for useProjects 2026-04-01 21:36:22 -07:00
gsxdsm
1ccaf34d9b fix(FN-673): harden dashboard task resync and Claude usage handling
- resync dashboard tasks after stream reconnects and when the tab becomes visible again
- add regression coverage for stale board recovery and usage-fetch edge cases
- replace direct Claude usage API calls with the CLI-based usage command
- document the dashboard resync safeguards and include a published package changeset
2026-04-01 13:01:52 -07:00
gsxdsm
54f10ef641 feat(KB-662): refresh tasks when the dashboard regains focus
- Add a debounced visibilitychange refresh path to useTasks
- Reuse task normalization when refreshing task data from the API
- Preserve project-scoped fetching during initial and visibility-triggered reloads
- Add hook tests covering visibility refresh, normalization, debounce, and cleanup
2026-04-01 12:37:06 -07:00
gsxdsm
1e24e212f6 feat(KB-662): add visibility change listener with debouncing to task refresh
- Add visibilitychange listener in useTasks hook to refresh tasks when tab becomes visible
- Implement 1-second debounce to prevent rapid refetching on visibility changes
- Add comprehensive tests for visibility change behavior including debouncing
- Clean up unused variable in SettingsModal from merge conflict resolution
2026-04-01 07:05:49 -07:00
gsxdsm
c671beae96 feat(KB-503): add multi-project CLI support with project subcommands
- Add project subcommands: list, add, remove, show, set-default, detect
- Add --project flag support for all task commands
- Create project-context.ts utilities for project resolution
- Add defaultProjectId to GlobalSettings type
- Implement project auto-detection from cwd
- Update CLI argument parsing for global --project flag
- Add multi-project CLI documentation to AGENTS.md
2026-04-01 07:02:15 -07:00
gsxdsm
54767f60eb feat(KB-648): enable parallel test execution and optimize test performance
- Optimize backup tests using fake timers instead of real timeouts

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

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

- Update executor tests with exact command matching and improved assertions

- Update AGENTS.md with test optimization patterns (fake timers, unique temp dirs)
2026-04-01 06:54:50 -07:00
gsxdsm
cf5b4e55d6 feat(KB-651): add changed files diff viewer for tasks
- Add backend API endpoint to get changed files and diffs for a task worktree
- Add useChangedFiles hook for fetching and managing diff data
- Create ChangedFilesModal component with file list and diff viewer
- Integrate modal into TaskCard with click handler to view changes
- Add frontend API integration and type definitions
- Include unit tests for hook and modal components
- Add changeset for the new feature
- Remove deprecated mission-related test files
2026-04-01 02:01:31 -07:00
gsxdsm
9daffda83d feat(KB-662): add visibility change listener with debouncing
- Add page visibility change detection with debounced state handling

- Implement visibility listener for managing background task behavior

- Add comprehensive tests for debouncing and visibility transitions

- Resolve type conflicts in types.ts and SettingsModal.tsx
2026-03-31 23:32:06 -07:00
gsxdsm
1840f17ebf feat(KB-503): add multi-project CLI support
- Add project context utilities for multi-project operations

- Add project subcommands (list, add, remove, set-default, detect)

- Update CLI argument parsing with --project flag support

- Add multi-project documentation and changeset
2026-03-31 23:28:43 -07:00
gsxdsm
4b39bf1f4c feat(KB-618): add multi-project support to dashboard
- Add project API methods and types (fetchProjects, registerProject, fetchProjectHealth, etc.)
- Add ProjectCard component with health metrics, status badges, and pause/resume actions
- Add server-side project management routes for multi-project orchestration
- Add ActivityFeed component with grouped entries and project badges
- Add SetupWizard component with 5-step project creation flow
- Fix TypeScript errors in server routes for listProjects and getGlobalConcurrencyState
2026-03-31 23:19:03 -07:00
gsxdsm
3dec4b4497 feat(KB-662): add visibility change listener with debouncing to useTasks hook
- Add visibilitychange event listener to refresh tasks when tab becomes visible
- Implement 1-second debounce to prevent excessive fetch requests
- Add comprehensive tests for visibility change behavior and debouncing
- Gracefully handle fetch errors during visibility changes
2026-03-31 22:50:27 -07:00
gsxdsm
e3055f8d93 fix(KB-503): address code review feedback for Step 1
- Add optional globalDir parameter to resolveProject(), getDefaultProject(),
  setDefaultProject(), and clearDefaultProject() for test isolation
- Remove ESLint suppression by using void operator for intentionally unused var
- Update all tests to use isolated globalDir parameter
- Complete tests for default project resolution
2026-03-31 22:38:56 -07:00
gsxdsm
5647e500cf feat(KB-332): rename task prefix from KB to FN and branches from kb/ to fusion/
- Change default task prefix from KB to FN across all packages

- Rename branch naming pattern from kb/{id} to fusion/{id}

- Update all test assertions and fixtures to use new prefixes

- Add changeset for the breaking change

- Resolve merge conflicts in TaskCard.test.tsx touch gesture tests
2026-03-31 19:29:47 -07:00
gsxdsm
38bb30de68 fix(KB-613): resolve status update race condition and fix stuck timeout units
- Add timestamp comparison logic in handleUpdated to prevent stale websocket data from overwriting newer task state
- Rename stuck timeout setting from minutes to milliseconds for finer control
- Add comprehensive tests for status update race condition scenarios
- Add changeset for status update race condition fix
2026-03-31 17:37:31 -07:00
gsxdsm
fc0411713c feat(KB-330): rename internal packages from @kb/* to @fusion/*
- Rename @kb/core, @kb/dashboard, @kb/engine to @fusion/* namespace
- Update all import statements across 143+ files to use new package names
- Update workspace dependencies and root package.json references
- Fix bundler configurations (tsup, vite) for new package names
- Update test files and fix typecheck issues
- Add changeset file documenting the package rename
2026-03-31 13:33:44 -07:00
gsxdsm
d8f75d503a test(KB-301): fix useWorkspaces tests — use real timers for polling interval 2026-03-31 11:20:09 -07:00
gsxdsm
96608d1eec test(KB-301): fix useProjectFileEditor tests — wrap async save assertions in act() and waitFor() 2026-03-31 11:19:27 -07:00
gsxdsm
f2c00ad147 feat(KB-175): move file browser to header with workspace support
- Add workspace file APIs and hooks for session-scoped file browsing
- Create WorkspaceSelector component for switching between workspaces
- Update FileBrowserModal with workspace mode and improved UX
- Add files button to header with workspace-aware file browsing
- Add session files indicator to task cards for quick file access
- Include comprehensive tests for all new components and hooks
2026-03-31 01:26:57 -07:00
gsxdsm
f8622daee3 feat(KB-104): move file browser from task modal to toolbar
- Add backend API routes and file service for project-scoped file operations
- Create useProjectFileBrowser and useProjectFileEditor hooks with comprehensive tests
- Update FileBrowserModal to support both task and project modes via dualMode prop
- Add Files button to dashboard header toolbar
- Remove Files tab from TaskDetailModal
- Integrate project file browser into main App layout
- Include changeset for @dustinbyrne/kb package
2026-03-30 17:06:50 -07:00