mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
abd5759324
Seven concurrent useLiveStatus hooks each opened their own PocketBase SSE connection during hydration. The PB SDK multiplexes subscriptions over a single EventSource, but the concurrent subscribe() calls raced the initial SSE handshake — some POST /api/realtime calls fired before the clientId was available, returning 400. After MAX_RECONNECT_ATTEMPTS (3), affected hooks set connection="error", triggering the "dashboard unavailable" banner on all tabs. Fix: replace 7 per-dimension hooks with a single useLiveStatus() call (no dimension filter). All rows are fetched in one subscription and the existing client-side keyFor() lookups filter by dimension implicitly. Eliminates the 7-way race, reduces PB connection count from 7 to 1, and removes the aggregateConnection helper entirely. Verified live at dashboard.showcase.copilotkit.ai — zero banners, all four tabs show real PB data with D2/D4 depth chips.