Issue
Critical realtime logic has no test coverage.
Current State
- No unit tests for voice functionality
- Hard to validate changes
- No regression prevention
Test Cases Needed
-
WebSocket Connection
- Successful connection to gateway
- Failed connection handling
- Disconnection and recovery
-
Audio Handling
- Audio buffer encoding to base64
- Audio data sending over WebSocket
- Invalid audio format handling
-
Message Handling
- Parsing OpenAI realtime responses
- Saving messages to ConversationStore
- Error responses from OpenAI
-
State Management
- isConnected state transitions
- isListening state transitions
- Error state updates
-
Main Actor Isolation
- Verify all UI updates happen on main thread
- No race conditions in state updates
Issue
Critical realtime logic has no test coverage.
Current State
Test Cases Needed
WebSocket Connection
Audio Handling
Message Handling
State Management
Main Actor Isolation