Commit Graph

33 Commits

Author SHA1 Message Date
gsxdsm
faf2a7b43b fix: resolve all 41 pre-existing dashboard test failures
- AgentsView: add missing fetchModels/fetchAgentStats mocks, update tests
  for new multi-step NewAgentDialog and ActiveAgentsPanel dual rendering
- routes-diff: rewrite tests to match new resolveDiffBase() two-dot syntax
- routes.test: fix spec/revise test — done→triage is valid per VALID_TRANSITIONS
- activity-feed CSS: replace hardcoded rgba(88,166,255) with color-mix token,
  fix var(--error) → var(--color-error)
- server/webhook/websocket tests: add getDatabase() mock for AiSessionStore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 13:17:03 -07:00
gsxdsm
4f80480a44 feat(FN-867): add task-scoped diff base via baseCommitSha
- Introduce baseCommitSha on sessions for task-scoped file diffs independent of shared worktrees
- Add /api/sessions/:id/files and /api/sessions/:id/file-diffs routes using baseCommitSha
- Update TerminalModal to consume task-scoped file list and diff endpoints
- Add regression tests for shared worktree scenario (multiple tasks in same worktree)
- Expand route tests for file diffs and session files with edge cases
- Clean up stale TerminalModal test helpers and simplify diff display styles
- Update README and route documentation for task-scoped diffing
2026-04-04 06:43:45 -07:00
gsxdsm
fb9f92a0ca feat(FN-799): align file-diffs route with session-files merge-base strategy
- Switch /api/tasks/:id/file-diffs to use merge-base (three-dot) diff instead of two-dot diff, matching session-files behavior
- Rewrite file-diffs route tests with comprehensive coverage and add count/detail consistency regression tests
- Update mission-types to export MissionSummary and fix MissionManager imports
- Remove obsolete MissionManager.test.tsx and mission-e2e.test.ts
- Update README docs to clarify board card count matches changed-files viewer
2026-04-03 19:31:13 -07:00
gsxdsm
10a6443483 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
651ec03698 fix(FN-756): correct task card change counts 2026-04-03 07:29:42 -07:00
gsxdsm
a7e2ca5adb fix(FN-756): reset recycled worktree baselines 2026-04-03 07:09:27 -07:00
gsxdsm
bed9fcb378 fix: resolve race condition in project-store-resolver breaking real-time dashboard updates
Concurrent SSE and API requests for the same projectId both missed the
cache (storeCache.set ran after await store.watch()), creating independent
TaskStore instances with separate EventEmitters. SSE listeners attached
to one instance while mutations fired on the other, so no events reached
the browser.

Fix: add a pendingCreations promise map that deduplicates concurrent
calls, ensuring all callers share the same in-flight promise and thus
the same store instance. Also clear pendingCreations in evictProjectStore
and evictAllProjectStores. Adds a concurrent-call regression test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 07:08:47 -07:00
gsxdsm
95374b7c3d fix(FN-758): fix project-scoped real-time dashboard updates
- Add project-store-resolver to correctly scope SSE and WebSocket connections to the active project's TaskStore
- Fix shared resolver so multi-project setups deliver task events only to the right dashboard clients
- Add regression tests for project store resolver (routing, missing project, SSE integration)
- Remove unused import and clean up stale changeset
- Add changeset for published package patch bump
2026-04-02 23:11:47 -07:00
gsxdsm
74c0f8fdc2 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
05f2114743 fix(FN-000): scope dashboard project flows 2026-04-02 17:51:04 -07:00
gsxdsm
6daf95bbb3 fix(FN-679): use merge-base diff in modal changes tab
- Updated /tasks/:id/diff endpoint to use merge-base comparison
- Changed from HEAD~1..HEAD to ...HEAD syntax
- Added fallback to HEAD when merge-base fails
- Verified fix matches /tasks/:id/file-diffs endpoint pattern
2026-04-02 10:25:57 -07:00
gsxdsm
bd67380e3d feat(FN-675): align session-files endpoint with diff endpoint
- Add git diff for session-files using baseCommitSha with double-dot syntax
- Add merge-base fallback to find common ancestor when baseCommitSha is missing
- Add HEAD~1 fallback when merge-base fails (e.g., no remote main)
- Add 10-second in-memory cache for session-files computation
- Fix scheduler to immediately schedule tasks created via dashboard
- Add task:moved to done handler for immediate scheduling on status change
- Add comprehensive unit tests for scheduler immediate scheduling
- Add unit tests for session-files caching and base ref resolution
2026-04-02 09:22:50 -07:00
gsxdsm
566f531361 feat: rename data directory, add global project settings, multi-project CLI commands, and provider badge in model selector
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 09:10:42 -07:00
gsxdsm
1fa8837c6b refactor: improve mocking for GitHubClient and enhance SIGINT handling in tests 2026-04-01 22:55:16 -07:00
gsxdsm
dc442cf391 feat: refactor tests and improve mocking for file-service and GitHub polling
- Updated mocking strategy for node:fs and node:fs/promises in file-service tests.
- Removed redundant test files and improved test implementations for better clarity.
- Enhanced GitHub polling service tests with rate limiter integration.
2026-04-01 22:44:44 -07:00
gsxdsm
04b194982d feat: add per-provider timeout for usage panel to prevent blocking on slow responses
fix: update scheduler filesystem path from .kb to .fusion for task validation

style: clean up TaskDetailModal styling with reusable CSS classes

test: add comprehensive tests for file-service operations with mocked filesystem
2026-04-01 22:38:18 -07:00
gsxdsm
a19912af9a feat(KB-662): complete Step 2 — add visibility refresh tests for useProjects 2026-04-01 21:36:22 -07:00
gsxdsm
fbf749a525 feat(KB-651): add task file diffs API
- Add API endpoint to fetch git diffs for tasks in review
- Implement file diff routes with support for changed files view
- Add comprehensive test suite for file diffs endpoint
- Update dashboard API client for diff fetching capabilities
2026-04-01 17:28:21 -07:00
gsxdsm
7cacce000b feat(FN-675): align session-files endpoint with diff endpoint
- Align session-files API endpoint behavior and response structure with diff endpoint

- Add comprehensive test suite for session-files routes (241 lines)

- Update route handlers to match diff endpoint patterns and file counting

- Include changeset for the file count alignment fix
2026-04-01 08:30:46 -07:00
gsxdsm
017c1bb8d5 feat(KB-504): add migration and first-run experience for multi-project support
- Add MigrationOrchestrator with filesystem scanning and auto-registration

- Add FirstRunExperience with setup wizard state management

- CLI integration with automatic migration hook on first run

- Backward-compatible single-project mode support

- \"--project\" flag support for CLI multi-project targeting

- KB_SKIP_MIGRATION environment variable for recovery

- Graceful fallback when central database unavailable

- New fn init command to initialize kb projects

- Interactive first-run setup wizard API in dashboard
2026-04-01 08:17:30 -07:00
gsxdsm
31fbe031e7 feat(FN-674): add multi-project dashboard support
- Add Project Overview page with responsive grid and health status cards
- Add Project Selector dropdown in header for quick context switching
- Add project drill-down navigation with task board/list views
- Add Setup Wizard components for first-run project registration
- Add global activity feed with project attribution and filtering
- Add project-aware task fetching to backend API
- Add project health polling and status badges
- Update ActivityLogModal with project filter and useActivityLog hook
2026-04-01 07:27:29 -07:00
gsxdsm
0ba42c92f3 feat(KB-502): add dashboard multi-project hooks and project API routes
- Add project API routes for multi-project backend integration
- Create useProjects hook for listing and managing registered projects
- Create useCurrentProject hook for current project selection and switching
- Create useProjectHealth hook for real-time project health metrics
- Create useActivityLog hook with ActivityLogModal integration
- Add comprehensive test coverage for all hooks (useProjects, useCurrentProject, useActivityLog)
- Add test setup utilities for React Query mocking
2026-04-01 01:15:44 -07:00
gsxdsm
80ab88db3d feat(KB-336): rename data directory from .kb to .fusion
- Rename data directory from .kb to .fusion across core, CLI, dashboard, and engine
- Update all path references in source files, tests, and CLI output
- Remove deprecated central-core infrastructure (central-core, central-db, central-integration)
- Remove obsolete test files (PlanningModeModal.test.tsx, ScheduleForm.test.tsx)
- Add changeset for the directory rename breaking change
2026-03-31 20:00:25 -07:00
gsxdsm
e4579728ba 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
ab3dff2100 feat(KB-335): rename environment variables from KB_* to FUSION_*
- Rename all KB_* environment variables to FUSION_* prefix across CLI and dashboard
- Update CLI runtime files (native-patch.ts) and build configuration
- Update dashboard server, badge-pubsub, GitHub webhooks, and terminal service
- Update test files to use new FUSION_API_KEY and related env vars
- Update documentation in README, AGENTS.md, STANDALONE.md, and dashboard README
- Update changeset files with new environment variable names
2026-03-31 17:03:23 -07:00
gsxdsm
3f77d80096 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
a9b0cb55f9 test(KB-316): add comprehensive test coverage for dashboard services
- Add file service tests (680 lines) covering file operations and error handling
- Extend GitHub polling service tests with GitHubPollingService coverage
- Extend rate-limit tests with additional boundary and edge cases
- Total of 1405 new test lines across 3 test files
2026-03-31 12:01:55 -07:00
gsxdsm
f78f01ac5b feat(KB-137): add GitHub App webhooks for real-time badge updates
- Add verified POST /api/github/webhooks endpoint with signature verification
- Implement GitHub App installation token authentication for API calls
- Add webhook handlers for pull_request, issues, and issue_comment events
- Support multi-task resource matching by parsed badge URL
- Retire live GitHub polling service in favor of push-based updates
- Add comprehensive webhook integration and unit tests
- Keep 5-minute REST refresh endpoints as fallback
2026-03-30 13:37:33 -07:00
gsxdsm
2dbcf2433e feat(KB-136): add shared badge pub/sub for multi-instance deployments
- Add BadgePubSub interface with Redis and in-memory adapters

- Implement cross-instance badge snapshot delivery via Redis pub/sub

- Add message validation, echo loop prevention, and structured caching

- Support graceful fallback to in-memory mode when Redis unavailable

- Update ServerOptions for dependency injection and add documentation
2026-03-30 12:52:07 -07:00
gsxdsm
0e61a45d72 feat(KB-141): fix workspace type resolution and add clean-checkout typecheck tests
- Remove dist-dependent workspace type resolution from all tsconfig files

- Add clean-checkout typecheck regression test to CI suite

- Update package.json type definitions for core, engine, dashboard, and cli packages

- Update README with typecheck testing documentation

- Clean up unused test files and component dependencies
2026-03-30 08:24:16 -07:00
gsxdsm
04711205fb feat(KB-134): remove planning mode checkbox and repair strict typecheck gate
- Remove PlanningModeModal checkbox functionality and related tests
- Delete NewTaskModal.test.tsx and PlanningModeModal.test.tsx
- Repair strict typecheck gate in typecheck.test.ts
- Update engine dependencies (add execa)
- Add development note about strict typecheck to dashboard README
- Clean up App.tsx and NewTaskModal.tsx planning mode code
2026-03-30 08:00:41 -07:00
gsxdsm
4e23716b7d feat(KB-063): add realtime GitHub badge updates
- Add a focused GitHub badge poller with shared rate-limit, freshness, and cleanup handling
- Wire a dedicated badge websocket server and routes to stream PR and issue badge snapshots
- Add a shared useBadgeWebSocket hook and update TaskCard to subscribe only when visible while preserving partial badge state
- Cover polling, websocket, and task card flows with tests and document the realtime badge channel
2026-03-30 03:19:51 -07:00
Dustin Byrne
a12550d625 feat(HAI-088): add @types/node to dashboard and typecheck regression test
- Add @types/node ^22.0.0 to @hai/dashboard devDependencies
- Add typecheck regression test that runs tsc --noEmit --skipLibCheck false
- Update pnpm-lock.yaml with resolved dependencies
2026-03-26 01:00:50 -04:00