Stop duplicate chat popups for the same conversation

Fixkamo-internal
Shipped
July 7, 2026 at 4:47 PM UTC
Author
kamo
Commit
d5eded1

The tool-window dedup only exact-matched a single userId key against an async-mirrored windowsRef, so the same 1:1 chat opened twice: - userId from a member row is id.toString() of a possibly precision- truncated CockroachDB unique_rowid(), while the STOMP incoming notification carries the exact string senderId — they never match, so every incoming message spawned a fresh window. - sessionGuid-only opens (recent-chats list, session relocation) were never compared, and ChatTool's resolved GUID was never written back. - the guard read windowsRef, mirrored from state via useEffect, so two same-tick opens both missed and both created a window. Dedup now matches on userId OR sessionGuid OR memberIds and merges the incoming keys onto the matched window; windowsRef is updated synchronously on focus-merge and create to close the same-tick race; ChatTool writes its resolved sessionGuid back via a new tool:patchProps event so a member-row chat becomes GUID-anchored (GUIDs are immune to numeric precision loss).

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing