Config Persistence:
- Save reflection config to localStorage
- Load config on startup with fallback defaults
- Auto-sync config changes to backend
Proactive Personality Suggestions (P2):
- Add check_personality_improvement to heartbeat engine
- Detects user correction patterns (啰嗦/简洁, etc.)
- Add check_learning_opportunities to heartbeat engine
- Identifies learning opportunities from conversations
- Both checks generate HeartbeatAlert when thresholds met
These enhancements complete the self-evolution capability chain.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Initialize reflection engine with allow_soul_modification: true
- Sync config changes to backend when loading data
- Ensures reflection can generate identity change proposals
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
P1.1: Identity Change Proposal UI
- Create IdentityChangeProposal.tsx with diff view for SOUL.md changes
- Add approve/reject buttons with visual feedback
- Show evolution history timeline with restore capability
P1.2: Connect Reflection Engine to Identity Proposals
- Update ReflectionLog.tsx to convert reflection proposals to identity proposals
- Add ReflectionIdentityProposal type for non-persisted proposals
- Auto-create identity proposals when reflection detects personality changes
P1.3: Evolution History and Rollback
- Display identity snapshots with timestamps
- One-click restore to previous personality versions
- Visual diff between current and proposed content
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove temporary console.log and eprintln! statements added during
troubleshooting the model configuration issue.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Integrate react-window v2 List component for messages > 100
- Add VirtualizedMessageList and VirtualizedMessageRow components
- Use useVirtualizedMessages hook for dynamic height measurement
- Preserve smooth animations for small message counts (< 100)
- Auto-scroll to bottom for both virtualized and non-virtualized modes
Performance improvements:
- Only render visible messages in viewport
- Dynamic height measurement for accurate positioning
- LRU cache for message content
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Document completed tasks and file structure
- Record technical decisions and architecture changes
- Note verification results and next steps
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add type assertions for Valtio snapshot readonly arrays
- Remove unused fromPromise import from hands machine
- Ensures type compatibility with Valtio's useSnapshot
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Chat Domain:
- Add types.ts with Message, Conversation, Agent types
- Add store.ts with Valtio-based state management
- Add hooks.ts with useChatState, useMessages, etc.
- Add index.ts for public API export
Hands Domain:
- Add types.ts with Hand, Trigger, Approval types
- Add machine.ts with XState state machine
- Add store.ts with Valtio-based state management
- Add hooks.ts with useHands, useApprovalQueue, etc.
Shared Module:
- Add types.ts with Result, AsyncResult, PaginatedResponse
- Add error-handling.ts with AppError, NetworkError, etc.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add valtio for Proxy-based state management
- Add xstate and @xstate/react for state machines
- Create domains directory structure (chat, hands, intelligence, skills)
- Create shared directory for common utilities
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SecurityError class for clear error handling
- Add validateWebSocketSecurity function
- Block ws:// connections to non-localhost hosts
- Add unit tests for security validation logic
Security: Prevents man-in-the-middle attacks on remote connections
by requiring WSS protocol for all non-localhost WebSocket connections.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Encrypt credentials before storing in localStorage when OS keyring unavailable
- Decrypt on retrieval with automatic fallback
- Backward compatible with existing unencrypted data (migration on next set)
- Add comprehensive unit tests (11 test cases)
Security: Credentials are now encrypted using AES-GCM when
OS keyring is unavailable, preventing plaintext exposure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add test for base64 string output
- Add test for 32-byte key length
- Add test for uniqueness
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add arrayToBase64/base64ToArray conversion functions
- Add deriveKey for PBKDF2 key derivation
- Add encrypt/decrypt using AES-GCM
- Add generateMasterKey for random key generation
- Update setup.ts to use real Web Crypto API instead of mock
- Add comprehensive unit tests for all crypto functions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add @vitest/coverage-v8@2.1.8 matching vitest version
- Required for test:coverage script to work
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add vitest.config.ts with jsdom environment and path aliases
- Add tests/setup.ts with mocks for Tauri API, crypto, and localStorage
- Add test:coverage script to package.json
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Install testing framework dependencies for unit testing:
- vitest@2.1.8 - Test runner
- @testing-library/react@16.1.0 - React component testing
- @testing-library/jest-dom@6.6.3 - Jest DOM matchers
- jsdom@25.0.1 - DOM simulation environment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix mock path in setup.ts to use @ alias
- Add Web Crypto polyfill for Node.js test environment
- Use pnpm exec for vitest version check
- Update Task 4.1 to note existing isLocalhost function
- Add cross-platform notes for Windows users
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comprehensive design for 14-week architecture overhaul:
- VZustand for fine-grained reactivity
- Web Worker isolation for security
- XState for Hands state machine
- Domain-driven directory structure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rewrite context-compactor.test.ts to use intelligenceClient
- Rewrite heartbeat-reflection.test.ts to use intelligenceClient
- Rewrite swarm-skills.test.ts to use intelligenceClient
- Update CLAUDE.md architecture section for unified intelligence layer
All tests now mock Tauri backend calls for unit testing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Unify all intelligence modules to use intelligenceClient
- Delete legacy TS implementations (agent-memory, reflection-engine, heartbeat-engine, context-compactor, agent-identity, memory-index)
- Update all consumers to use snake_case backend types
- Remove deprecated llm-integration.test.ts
This eliminates code duplication between frontend and backend, resolves
localStorage limitations, and enables persistent intelligence features.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>