Commit Graph

41 Commits

Author SHA1 Message Date
gsxdsm
4cabe7f613 refactor: eliminate ~400 no-explicit-any warnings across the workspace
Parallel subagent pass: four typescript-pro agents on non-overlapping scopes.

Patterns applied:
- catch (err: any) { ... err.message ... } → catch (err) { ... getErrorMessage(err) ... }
  using the new @fusion/core helper. Bare catch {} where the error was unused.
- SQLite row types: defined typed XxxRow interfaces per table and cast
  .all()/.get() results via `as unknown as XxxRow[]` (the double cast is
  required because better-sqlite3 returns Record<string, SQLOutputValue>).
- rowToX(row: any) converters: typed argument with the matching row interface.
- Dynamic settings key writes: (settings as Record<string, unknown>)[key].
- React event handlers and setState callbacks: inferred types or concrete
  React.{Mouse,Change,Form}Event<...> where needed.
- pi-claude-cli: local PiMessage / PiContext duck types to avoid re-typing
  pi-ai concrete shapes; typed Claude stream event message fields.

72 files changed, ~400 anys eliminated. Typecheck passes across the workspace.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:36 -07:00
Fusion
74f2b25c1d fix(FN-2176): honor planning summary overrides for task generation
- Add optional summary payload support to planning create-task and start-breakdown API client calls
- Pass edited summary data from PlanningModeModal when creating a task or starting breakdown
- Parse and validate summary overrides in planning routes and prioritize override data when present
- Add and update dashboard tests to verify override handling and modal call expectations
2026-04-20 09:32:04 -07:00
Fusion
a794cc0237 fix(FN-2151): recover modal retries after stream disconnects
- Handle retry API "not in an error state" responses by refreshing the server session instead of failing immediately
- Restore the correct view state for generating, awaiting_input, complete, and error sessions during retry recovery
- Reconnect planning/interview/subtask streams only when needed while preserving in-flight output and history
- Add regression tests for connection-loss retry recovery across PlanningModeModal, MissionInterviewModal, and SubtaskBreakdownModal
2026-04-19 20:48:13 -07:00
Fusion
be8add9ef4 style(FN-1847): unify dialog overlay styling and add accessibility attributes
- Add role=dialog and aria-modal attributes to all modal dialogs for accessibility
- Standardize close button aria-labels across all modals
- Unify overlay backdrop-filter, z-index, and background styles in styles.css
- Add light theme overrides for non-standard overlay backgrounds
- Update AgentListModal tests to reflect new aria attributes
- Add changeset for @gsxdsm/fusion package
2026-04-15 20:44:40 -07:00
gsxdsm
136d9cc4ce feat(FN-1809): merge fusion/fn-1809 2026-04-14 13:00:02 -07:00
gsxdsm
9292681234 feat(FN-1649): remove Kimi from usage indicator flow
- Remove Kimi provider from usage tracking module
- Clean up unused Kimi-related code in usage.ts (225 lines removed)
- Remove Kimi-specific tests from usage.test.ts (686 lines removed)
- Add tests for usage routes (routes.test.ts)
- Add new usage API routes for usage data endpoints
- Fix planning resume state mismatch in PlanningModeModal
- Add PlanningModeModal tests for state consistency
2026-04-12 16:20:51 -07:00
gsxdsm
e015fc8a54 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
7d599a5387 refactor(FN-1364): extract modal inline styles to CSS classes
- Add CSS classes in styles.css for planning and breakdown modal styling
- Refactor MissionInterviewModal to use CSS classes instead of inline styles (164 lines reduced)
- Refactor PlanningModeModal to use CSS classes (67 lines reduced)
- Refactor SubtaskBreakdownModal to use CSS classes (26 lines reduced)
- Improve maintainability and consistency of modal styling
2026-04-09 17:57:06 -07:00
gsxdsm
345e0954a2 fix(FN-1306): improve PlanningModeModal layout for mobile screens
- Move model selector from sticky footer into scrollable content area
- Slim the footer to only contain the Start Planning button
- Add .planning-model-select-group CSS for proper flexbox layout
- Center footer button and model-select row for better mobile UX
- Remove inline styles from model selector, use CSS classes instead
2026-04-09 05:37:57 -07:00
gsxdsm
e5dc8373b9 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
02148d79b6 feat(FN-1153): add cross-tab locks for AI planning sessions
- Bump SQLite schema to v19 with ai_sessions lock columns and lock index, and align migration coverage in core DB tests
- Extend AiSessionStore with acquire/release/force lock APIs, stale lock cleanup, and lock metadata in ai_session update summaries
- Enforce lock checks on planning, subtask, and mission interview mutation routes with 409 conflict responses while keeping stream reads unaffected
- Add frontend tab identity + useSessionLock hook and wire Planning, Subtask, and Mission modals to pass tabId, show lock overlay, and support Take Control
- Expand dashboard route/e2e and modal tests to validate lock enforcement, lock handoff, and lock-aware session reentry behavior
2026-04-08 16:14:32 -07:00
gsxdsm
e80fb448d4 feat(FN-1152): add retry flows for failed AI planning sessions
- Keep errored AI sessions retryable in the session store and add backend retry handlers for planning, subtask breakdown, and mission interview flows
- Add retry API routes and dashboard API client helpers for planning, subtask, and mission interview session retries
- Update PlanningModeModal, SubtaskBreakdownModal, MissionInterviewModal, and background session handling to show error states with retry/cancel UX
- Expand unit and integration tests across store, services, routes, and modal components to cover retry success and failure paths
2026-04-08 15:10:46 -07:00
gsxdsm
324f28a90c feat(FN-1151): preserve and display planning conversation history
- Persist per-turn thinking output for planning and mission interview sessions, including history serialization and recovery-safe state fields
- Add shared conversation history parsing/API types and a reusable timeline component with formatted answers and expandable AI reasoning
- Restore and render conversation history across Planning Mode, Mission Interview, and Subtask Breakdown modals during resume and live question flow
- Harden response submission with nullable-question guards and expand unit/e2e coverage for history rendering and persistence behavior
2026-04-08 14:17:20 -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
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
b6fbadec4d feat(FN-1145): harden dashboard SSE streams with replay and reconnect
- Add a shared SSE event buffer utility and wire it into planning, subtask, mission interview, and task stream routes
- Support Last-Event-ID replay semantics and robust event serialization so clients can recover missed stream events
- Add a resilient client-side reconnect wrapper and surface reconnecting state in planning, subtask breakdown, and mission interview modals
- Expand test coverage across API routes, SSE buffering behavior, reconnect handling, and mission/planning stream flows
2026-04-08 06:02:28 -07:00
gsxdsm
e555eee564 feat(FN-1144): add planning model override support to planning mode
- Add planning model selection UI to PlanningModeModal initial view with model loading, favorites wiring, and default/custom badge state
- Extend startPlanningStreaming client API to send optional planningModelProvider/planningModelId overrides
- Propagate planning model overrides through /planning/start-streaming and createSessionWithAgent so agent creation uses selected model settings
- Add frontend and backend tests covering modal selection behavior, request forwarding, and end-to-end planning model flow
2026-04-08 04:10:10 -07:00
gsxdsm
c6f4d3b51d feat(FN-1157): switch planning size controls to dropdowns
- Replace Summary view suggested size buttons with a select dropdown and keep loading-state disabling
- Replace Breakdown view subtask size button groups with per-subtask size dropdowns
- Add PlanningModeModal tests for summary and breakdown size dropdown rendering and change handling
- Expand API test mocks used by planning breakdown flows to support the new coverage
2026-04-07 23:00:04 -07:00
gsxdsm
1982362fb5 feat(FN-1106): preserve planning sessions when closing modal
- Stop canceling active planning sessions on modal close and keep server-side progress intact
- Remove progress-loss confirmation prompts and simplify close/escape/unload handling to just reset local UI state
- Ensure close flows always disconnect the SSE stream connection without clearing the backend session
- Rewrite PlanningModeModal close-behavior tests to verify no confirmation/cancel calls across initial, loading, question, summary, and overlay dismiss paths
2026-04-07 22:14:14 -07:00
gsxdsm
3bfaa6070e 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
78e95246d8 feat(FN-892): add planning mode multi-task creation with Break into Tasks
- Add generateSubtasksFromPlanning function to generate subtasks from planning session key deliverables
- Add POST /planning/start-breakdown and POST /planning/create-tasks API routes
- Add startPlanningBreakdown and createTasksFromPlanning frontend API functions
- Extend PlanningModeModal with Break into Tasks UI and subtask editing (drag-and-drop, dependency validation)
- Add comprehensive tests for generateSubtasksFromPlanning with edge cases
- Document planning mode multi-task creation feature in AGENTS.md
2026-04-04 14:25:34 -07:00
gsxdsm
dd0b53c358 feat: add background AI sessions with persistent storage and SSE streaming
Introduces ai_sessions table (schema v9), AiSessionStore, and background
session support for mission interviews, planning, and subtask breakdown.
Adds BackgroundTasksIndicator component, SSE-based progress streaming,
and dashboard API routes for session management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 13:42:02 -07:00
gsxdsm
05f2114743 fix(FN-000): scope dashboard project flows 2026-04-02 17:51:04 -07:00
gsxdsm
d2d32acce8 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
fa37de1bed 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
fb65d4bf0b 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
7344a80e40 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
3e96e9ef71 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
591345c791 feat(KB-639): add dismiss warning for unsaved progress in PlanningModeModal
- Add hasProgress state to track unsaved changes in PlanningModeModal\n- Show confirmation dialog when dismissing modal with unsaved progress\n- Prevent accidental data loss when users close the planning modal\n- Add comprehensive tests for dismiss warning behavior
2026-03-31 19:58:25 -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
234d6f7b1d feat(KB-275): remove 500-character limit from planning mode textarea
- Remove maxLength restriction from PlanningModeModal textarea input
- Allow unlimited text input for AI-assisted task planning
- Add changeset documenting the character limit removal
2026-03-31 07:08:46 -07:00
gsxdsm
2a222a2be6 fix(KB-263): fix text not being passed into Planning Mode from quick entry
- Fix stale closure bug in PlanningModeModal auto-start useEffect
- Move handleStartPlanning definition before the effect that references it
- Remove redundant handleStartPlanningWithPlan callback
- Add planOverride parameter to handleStartPlanning for proper prop passing
- Fix hasAutoStartedRef timing to prevent early triggering
2026-03-30 23:39:20 -07:00
gsxdsm
762b8d1107 feat(KB-243): fix loading state text and ensure thinking container visibility in PlanningModeModal
- Fix loading state text rendering in PlanningModeModal

- Ensure thinking container is always visible during planning operations

- Add comprehensive tests for loading state behavior and thinking container visibility
2026-03-30 19:26:38 -07:00
gsxdsm
ffe42cbb6c fix(KB-217): resolve planning mode hanging race condition
- Fix race condition causing planning mode to hang after submitting answers
- Keep SSE connection alive during response submission to prevent premature disconnect
- Add scrollable CSS styling for AI thinking output display in planning mode
- Add tests for race condition fix ensuring subsequent questions are received
- Include changeset for planning mode patch release
2026-03-30 18:12:49 -07:00
gsxdsm
8debaec941 fix(KB-165): resolve planning modal autostart in StrictMode
- Fix double-render bug by using ref for hasAutoStarted instead of state\n- Enable auto-start planning tests in App.test.tsx and ListView.test.tsx\n- Add changeset for the planning modal autostart fix\n- Add comprehensive tests for planning mode auto-start behavior
2026-03-30 09:13:10 -07:00
gsxdsm
c12428e996 feat(KB-159): complete Step 4 — update frontend for streaming display 2026-03-30 08:55:07 -07:00
gsxdsm
f7091c9a40 feat(KB-150): remove title input fields from task creation modals
- Remove title input from NewTaskModal component
- Remove title input from PlanningModeModal SummaryView
- Update NewTaskModal tests to remove title field references
- Clean up unused title-related form state and handlers
2026-03-30 08:30:12 -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
3c9901b2cf feat(KB-125): add planning mode checkbox to new task flow
- Add planning mode checkbox to NewTaskModal with onPlanGenerated callback
- Wire up planning mode flow in App.tsx to open modal after task creation
- Add initialPlan prop to PlanningModeModal with auto-start logic
- Add comprehensive tests for planning mode checkbox flow in both modals
- Include changeset for the planning mode checkbox fix
2026-03-30 07:57:53 -07:00
gsxdsm
0322f50907 feat(KB-092): polish planning mode modal UX
- Rework the planning modal into scrollable content regions with fixed footers for the initial, question, and summary states
- Refresh question and summary styling with clearer progress, polished selection controls, and improved dependency and deliverable presentation
- Improve responsive behavior with full-height mobile layout, stacked actions, and better overflow handling
- Expand PlanningModeModal coverage to verify the new structure and add a TaskDetailModal smoke check
2026-03-30 03:46:55 -07:00
gsxdsm
385739ee2c feat(KB-032): add Planning Mode for AI-assisted task creation
- Add PlanningModeModal component with interactive task planning UI
- Implement backend planning API with /api/planning endpoints
- Add PlanningSession class for managing planning state
- Integrate planning mode into dashboard with header button
- Add comprehensive tests for planning components and API routes
- Include AI agent structure for future planning automation
- Update README with Planning Mode documentation
2026-03-29 21:40:14 -07:00