Conversation
Observable WebSocket manager using URLSessionWebSocketTask with: - Connection states: disconnected, connecting, connected, reconnecting - Exponential backoff reconnect (1s→30s max) - Keepalive ping every 30s - Event parsing into typed enums (manifest updates, agent/worktree status) - Terminal subscribe/unsubscribe/input commands - NotificationCenter integration matching existing app patterns Closes #79
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- B2: fix doConnect() guard to reject double-connect (was tautological) - B1: remove unused closure callbacks (onStateChange/onEvent) for consistency with codebase's NotificationCenter-only pattern - B3: synchronous cleanup in deinit instead of unreliable async dispatch - T1: thread-safe state reads via queue.sync backing store - Security: replace manual JSON string interpolation with JSONSerialization to prevent injection in channel/agentId fields - Make parseEvent() internal for testability - Add WebSocketManagerTests (21 tests covering event parsing, command serialization, connection state, and edge cases)
Summary
WebSocketManagerclass withURLSessionWebSocketTaskfor real-time server communicationdisconnected,connecting,connected,reconnecting(attempt: Int)DispatchSourceTimerWebSocketEventenum: manifest updates, agent/worktree status changesWebSocketCommandenumNotificationCenter, GCD,@unchecked SendableCloses #79
Test plan
swiftc -typecheck(confirmed)