fix(web): persistent WS connection, auto-refetch on ready, and direct selector binding with scroll fix

This commit is contained in:
2026-07-27 09:09:27 -04:00
parent 86717a2867
commit a54a67e41b
4 changed files with 19 additions and 14 deletions
+4
View File
@@ -110,6 +110,10 @@ export const useWebSocketStore = create<WebSocketState>((set, get) => ({
if (data.type === 'ready') {
set({ connected: true });
reconnectDelay = 1000;
const activeChan = useChannelStore.getState().activeChannelId;
if (activeChan) useMessageStore.getState().fetchMessages(activeChan);
const activeConv = useConversationStore.getState().activeConversationId;
if (activeConv) useConversationStore.getState().fetchMessages(activeConv);
return;
}