- Shipped
- August 26, 2026 at 3:50 AM UTC
- Author
- kamo
- Commit
- f9f8182
Seven independent /api/user-info calls fired on a cold authenticated load, each one asking for the member id a sibling was already asking for at the same moment. Every one of them is a Redis EXISTS plus a SETEX, a POST to SecurityService that recomputes the whole rights waterfall against the database, and a Redis master read. They go through loadUserInfoShared now — the coalescer that already existed in useUserInfo and was exported earlier in this series. UnreadContext, SocialAgentContext, SupportCountContext, useAvailabilityWebSocket, useChatWebSocket (both its subscribe and its reconnect path) and useSmsWebSocket. No context or hook fetches that endpoint directly any more. Four of them sat directly in front of a STOMP subscribe, so this also shortens the gap between the socket connecting and it actually listening. Two things the swap fixes beyond the request count. The coalescer sends the *** token from this TAB's sessionStorage, which none of the raw fetches did — they leaned on the cookie jar instead, which is the wrong source for a per-tab session. And it reports a discriminated outcome, so "no session" is now distinguishable from "request failed" rather than both arriving as a missing field. useChatWebSocket is a CRLF file; the inserted lines are CRLF too, so the diff stays at the eleven lines that actually changed instead of the whole file. Verified: tsc --noEmit clean over all six plus useUserInfo and AuthedChrome with their transitive imports; all 10 guards pass; 143 tests across the chat, hooks, voip and message suites pass.