- Add explicit return types to functions across main, preload, and renderer
- Replace `any` types with specific types or eslint-disable comments
- Fix unused variables by removing or prefixing with underscore
- Add eslint-disable for react-refresh/only-export-components
- Fix React hooks dependency warnings
- Add test mocks for electron-log/main and @electron-toolkit/utils
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add support for dynamically switching session modes and models through
the ACP protocol. This enables users to change the AI model or operating
mode during an active session.
Changes:
- Add ModeSelector and ModelSelector dropdown components
- Extend ACP client to handle mode/model update notifications
- Add IPC channels for mode/model state management
- Update Conductor and SessionLifecycle for dynamic switching
- Add max-height constraint to dropdowns for better UX
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add directoryExists runtime check for sessions
- Show warning banner when directory not found
- Disable input and only allow session deletion
- Add withDirectoryExists helper to reduce code duplication
- Validate directory on app focus to detect deleted folders
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implemented three-layer defense mechanism to prevent AI-generated code from breaking the codebase:
- Layer 1: AGENTS.md with universal AI agent instructions
- Layer 2: Husky pre-commit hooks with test file checking
- Layer 3: GitHub Actions CI with TypeScript, ESLint, tests, and coverage
Includes design document, test infrastructure, and coverage thresholds.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Added extractUserMessageText() helper to handle both new (MessageContent[])
and old ({ text: string }) user message formats. This fixes history replay
for resumed sessions after commit 913cccc changed the message storage format
without updating the extraction logic. Also updated integration test to use
the new MessageContent format.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add unit and integration tests covering core business logic:
- SessionStore: 18 tests for session persistence and management
- Conductor: 13 tests for session orchestration and agent lifecycle
- IPC Handlers: 19 tests for main-renderer communication
- Agent check: 10 tests for agent detection utilities
Tests achieve 31.74% overall coverage with focus on critical paths. Includes Vitest configuration, mock setup, and test utilities.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>