π OpenHands: AI-Driven Development
Prevent WebSocket provider remount by defaulting to V1 (#11458)
sp.wack9520da668cb8
diff --git a/frontend/src/routes/conversation.tsx b/frontend/src/routes/conversation.tsxindex 0bc1e16997..c1d7330f41 100644--- a/frontend/src/routes/conversation.tsx+++ b/frontend/src/routes/conversation.tsx@@ -154,7 +154,7 @@ function AppContent() {t,]);- const isV1Conversation = conversation?.conversation_version === "V1";+ const isV0Conversation = conversation?.conversation_version === "V0";const content = (<ConversationSubscriptionsProvider>@@ -174,15 +174,11 @@ function AppContent() {</ConversationSubscriptionsProvider>);- // Wait for conversation data to load before rendering WebSocket provider- // This prevents the provider from unmounting/remounting when version changes from 0 to 1- if (!conversation) {- return content;- }-+ // Render WebSocket provider immediately to avoid mount/remount cycles+ // The providers internally handle waiting for conversation data to be readyreturn (<WebSocketProviderWrapper- version={isV1Conversation ? 1 : 0}+ version={isV0Conversation ? 0 : 1}conversationId={conversationId}>{content}