From 4a4cf350e57d4cb21dad68e738ec5070ec66b5c0 Mon Sep 17 00:00:00 2001 From: Sawyer Date: Thu, 17 Sep 2026 22:20:47 -0700 Subject: [PATCH] fix(web): chat and room subscribe to the mailbox stream's named event (CL-8446) --- apps/web/src/chat/threads-api.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/src/chat/threads-api.ts b/apps/web/src/chat/threads-api.ts index d83e6044b..87ab55b90 100644 --- a/apps/web/src/chat/threads-api.ts +++ b/apps/web/src/chat/threads-api.ts @@ -413,9 +413,11 @@ export async function readChat(tenantId: string, chatId: string): Promise void): () => void { const source = new EventSource(`${mailboxPath(tenantId)}/events`); const handler = () => onChange(); - source.addEventListener("message", handler); + // The stream writes named `mailbox` frames; the default `message` event + // never fires for those. + source.addEventListener("mailbox", handler); return () => { - source.removeEventListener("message", handler); + source.removeEventListener("mailbox", handler); source.close(); }; }