Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(dashboard): describe what a reconnect decision refreshes

Yudhi Armyndharis446420a870a8
diff --git a/dashboard/src/utils/reconnectState.ts b/dashboard/src/utils/reconnectState.ts
index 3498ae863..b7e1eae9c 100644
--- a/dashboard/src/utils/reconnectState.ts
+++ b/dashboard/src/utils/reconnectState.ts
@@ -17,9 +17,10 @@ export interface ReconnectDecision {
* after the initial connection. Extracted from the component so the transition is unit-testable
* independent of React/socket.io.
*
- * A reconnect means realtime events (message.received/ack/revoke) were missed during the gap. The
- * chat message cache uses staleTime:Infinity, so it won't refetch on its own; the caller invalidates
- * on `invalidate: true` to force a refresh of the thread the gap left stale.
+ * A reconnect means realtime events (message.received/ack/revoke) were missed during the gap. On
+ * `invalidate: true` the caller re-reads what it holds outside the per-connect refresh (Chats: the
+ * chat list and contact statuses; useSessionFeed: the session cards). Chat threads are not refreshed
+ * here: Chats invalidates them in its subscribe effect on every connect.
*
* - First connect (hadConnected false): no invalidate. The cache is not necessarily empty (a remount
* within gcTime keeps the threads read before it); refreshing those is not this decision's job.