- 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.