- Ya
- 26 Agosti 2026, 04:50 UTC
- Mwandishi
- kamo
- Ahadi ya
- c0c80d8
Final review found markSmsRead and markAiRead had zero callers, and SocialChatWindow never called markAsRead/beginViewing at all — three of five conversation surfaces shipped an unread counter that could only go up. The design assumed ChatTool's onScreen -> beginViewing wiring covered every surface; it only ever covered ChatTool. SmsTool and AiChatTool now read onScreen from useToolWindows() (a minimized window stays mounted, parked off-viewport, so the store is the only place that can answer "is the member looking at this") and call markSmsRead/markAiRead whenever their conversation is on screen with a nonzero live count, re-firing if the count comes back up while still on screen. SocialChatWindow reuses beginViewing directly, since a social conversationId is a media session guid on the same MediaService snapshot chat already reads.