- Shipped
- August 21, 2026 at 5:31 AM UTC
- Author
- kamo
- Commit
- ab39ead
Two bugs that shared a cause: the only flag saying "this window is minimized" was pinned false, so everything that asked it silently did nothing. An arriving message was marked read for as long as the session was subscribed — and that subscription outlives the member's attention, because a tool window keeps its contents mounted and STOMP attached while parked off-viewport, and a background tab renders normally. Messages that arrived while the window was minimized were marked read the instant they landed, clearing the badge that was the only sign they had come at all. chat-core 0.1.4 asks the host instead (isViewing, per message rather than once at construction); this passes `viewing`, which also covers the background tab. The incoming-message sound is forced when the member is not looking, and asked the `minimized` PROP — which an embedded tool window pins to false, because the shell owns the minimize chrome and ChatBox must never draw its own collapsed state on top of it. So the flag never once read true and a minimized chat has been arriving in silence. Now asks the same `viewing`. The prop keeps its comment explaining why it stays false, so the next reader fixes the question rather than the answer. Also drops the auto-restore that hung off the same dead flag. It would have been wrong if revived — it called onMinimize, a setter, which re-minimizes rather than restores — and it is redundant: ChatNotificationListener already listens for the chat:message-received nudge and re-opens the window, and tool:open's dedupe un-minimizes it.