diff --git a/frontend/src/hooks/query/use-active-conversation.ts b/frontend/src/hooks/query/use-active-conversation.ts index 141a4c0744..e2cd7662e5 100644 --- a/frontend/src/hooks/query/use-active-conversation.ts +++ b/frontend/src/hooks/query/use-active-conversation.ts @@ -17,6 +17,10 @@ export const useActiveConversation = () => { useEffect(() => { const conversation = userConversation.data; OpenHands.setCurrentConversation(conversation || null); - }, [conversationId, userConversation.isFetched]); + }, [ + conversationId, + userConversation.isFetched, + userConversation?.data?.status, + ]); return userConversation; }; diff --git a/tests/unit/test_mcp_client_timeout.py b/tests/unit/test_mcp_client_timeout.py deleted file mode 100644 index d731e1059b..0000000000 --- a/tests/unit/test_mcp_client_timeout.py +++ /dev/null @@ -1,30 +0,0 @@ -import pytest -from httpx import ConnectError -from mcp import McpError - -from openhands.core.config.mcp_config import MCPSSEServerConfig -from openhands.mcp.client import MCPClient - - -@pytest.mark.asyncio -async def test_connect_sse_timeout(): - """Test that connect_http properly times out""" - client = MCPClient() - - server = MCPSSEServerConfig(url='http://server1:8080') - - # Test with a very short timeout - with pytest.raises(McpError, match='Timed out'): - await client.connect_http(server, timeout=0.001) - - -@pytest.mark.asyncio -async def test_connect_sse_invalid_url(): - """Test that connect_http hits error when server_url is invalid.""" - client = MCPClient() - - server = MCPSSEServerConfig(url='http://server1:8080') - - # Test with larger timeout - with pytest.raises(ConnectError): - await client.connect_http(server, timeout=1)