Problem
The following major classes have no unit tests — they're only covered by integration tests that require a running agent-server:
RemoteConversation (338 lines) — conversation lifecycle, message sending, WebSocket management
RemoteWorkspace (318 lines) — command execution, file upload/download, git operations
RemoteState (238 lines) — state caching, locking, event-driven updates
HttpClient (207 lines) — request building, error handling, URL construction
WebSocketCallbackClient (140 lines) — reconnection, message parsing, backoff
LocalConversation (953 lines) — agent loop, tool execution, all state management
RemoteEventsList (162 lines) — pagination, caching, merging
ConversationManager (166 lines) — multi-conversation CRUD
Furthermore, there are no tests for factory functions: createConversation, createWorkspace, createConversationAuto, createWorkspaceAuto.
The existing 157 unit tests cover hooks, events/types, security, stuck-detector, and secret-registry — which are pure logic modules. The core client functionality that actually talks to servers is untested at the unit level.
Proposed Fix
Add unit tests using a mock/stub HttpClient (or a lightweight fake that records calls):
- HttpClient: Test URL construction, query param handling, error parsing, timeout behavior
- RemoteConversation: Test
start() creates correct request, sendMessage() formats messages, close() cleans up
- RemoteState: Test caching TTL,
updateStateFromEvent(), unwrapState() normalization
- RemoteWorkspace: Test
executeCommand() request format, fileUpload() FormData construction
- LocalConversation: Test agent loop iteration, tool dispatch, pause/resume, stuck detection integration
- Factory functions: Test type detection and error cases
Use a simple request-recording fake rather than heavy mocking frameworks. Assert on actual request shapes and response handling.
Impact
Medium — catches regressions in the most critical code paths without requiring a running server.
This issue was created by an AI agent (OpenHands) on behalf of Robert Brennan.
Problem
The following major classes have no unit tests — they're only covered by integration tests that require a running agent-server:
RemoteConversation(338 lines) — conversation lifecycle, message sending, WebSocket managementRemoteWorkspace(318 lines) — command execution, file upload/download, git operationsRemoteState(238 lines) — state caching, locking, event-driven updatesHttpClient(207 lines) — request building, error handling, URL constructionWebSocketCallbackClient(140 lines) — reconnection, message parsing, backoffLocalConversation(953 lines) — agent loop, tool execution, all state managementRemoteEventsList(162 lines) — pagination, caching, mergingConversationManager(166 lines) — multi-conversation CRUDFurthermore, there are no tests for factory functions:
createConversation,createWorkspace,createConversationAuto,createWorkspaceAuto.The existing 157 unit tests cover hooks, events/types, security, stuck-detector, and secret-registry — which are pure logic modules. The core client functionality that actually talks to servers is untested at the unit level.
Proposed Fix
Add unit tests using a mock/stub
HttpClient(or a lightweight fake that records calls):start()creates correct request,sendMessage()formats messages,close()cleans upupdateStateFromEvent(),unwrapState()normalizationexecuteCommand()request format,fileUpload()FormData constructionUse a simple request-recording fake rather than heavy mocking frameworks. Assert on actual request shapes and response handling.
Impact
Medium — catches regressions in the most critical code paths without requiring a running server.
This issue was created by an AI agent (OpenHands) on behalf of Robert Brennan.