Files
hikari-desktop/src-tauri
hikari 9a8816f6a0 fix: comprehensive agent tracking and cleanup improvements
This commit fixes all 4 reported agent tracking bugs and adds comprehensive test coverage:

**Bug Fixes:**
1. Agents stuck in "running" state after completion
   - Added SubagentStop hook parsing in wsl_bridge.rs
   - Emits claude:agent-end events when SubagentStop hooks detected
   - Includes 8 new Rust tests for hook parsing

2. Agents persisting after disconnect
   - Added clearConversation() call on disconnect in tauri.ts
   - Prevents agents from persisting across sessions

3. "Kill All" button doing nothing
   - Added markAllErrored() call in AgentMonitorPanel after interrupt
   - Updates UI state immediately after killing process

4. Badge persisting after closing tab
   - Added clearConversation() call in conversations.ts deleteConversation()
   - Properly cleans up agent tracking when tab is closed

**Test Coverage:**
- Added comprehensive agents.test.ts with 24 new tests
- Tests all store methods: addAgent, updateAgentId, endAgent, markAllErrored, clearCompleted, clearConversation, runningAgentCount
- Added 8 Rust tests for SubagentStart/Stop hook parsing
- All 387 frontend tests pass
- All 426 backend tests pass

**Documentation:**
- Updated CLAUDE.md with comprehensive testing guidelines
- Documents coverage goals, console mocking strategies, and E2E integration testing patterns

 This fix was implemented with help from Hikari~ 🌸
2026-02-07 18:45:12 -08:00
..
2026-01-28 12:51:05 -08:00
2026-01-14 20:56:28 -08:00
2026-01-14 20:56:28 -08:00
2026-02-07 01:56:47 -08:00
2026-02-07 01:56:47 -08:00