Trust backend pendingCount, drop client offsets

Fixkamo-internal
Ya
26 Aprili 2026, 02:13 UTC
Mwandishi
kamo
Ahadi ya
4d32ce7

Backend pendingCount is now unread-based (counts SUPPORT_TICKET sessions with messages newer than the owner's lastViewed). When the agent opens a ticket, markAsRead → backend broadcast → frontend reflects the new count automatically. Removes the focusedSessionsRef subtraction in fetchCount and the PENDING_COUNT handler — those were compensating for a status-based backend count and now double-decrement, which is why the count rebounded after a browser refresh: focusedSessionsRef resets to empty on mount, so the offset went away. Optimistic decrement on markSessionFocused is kept for snappy UX and is reconciled by the broadcast.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei