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>
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
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>
- 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
- 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)
- 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
- 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
- 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
- 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
- Remove maxLength restriction from PlanningModeModal textarea input
- Allow unlimited text input for AI-assisted task planning
- Add changeset documenting the character limit removal
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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