FN-5790: harden room chat send handling and optimistic reconciliation

Prevent duplicate room sends and avoid restoring composer text when ambiguous failures still delivered the message.

- guard room composer sends with an in-flight ref to prevent double-dispatch
- treat ambiguous post-send refresh failures as delivered when recovery confirms the user message
- centralize optimistic/SSE user-message reconciliation to replace temp messages instead of duplicating them
- add and update chat room hook/component tests that cover double-send prevention and delivered-on-ambiguous-failure behavior
- add a patch changeset for @runfusion/fusion documenting the room chat reliability fix

Files changed:
 .changeset/few-dingos-smile.md                     |  5 ++
 packages/dashboard/app/components/ChatView.tsx     |  8 +++
 .../components/__tests__/ChatView.rooms.test.tsx   | 27 ++++++++++
 .../app/hooks/__tests__/useChatRooms.test.ts       | 48 +++++++++++++++--
 packages/dashboard/app/hooks/useChatRooms.ts       | 62 +++++++++++++++-------
 5 files changed, 126 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-5790

Fusion-Task-Lineage: a1ac5e4f-4cc2-4cf9-8bc1-42587d0d1d1b
This commit is contained in:
gsxdsm
2026-05-31 16:57:42 -07:00
parent 2140ab2dcf
commit 716f3964c5
5 changed files with 126 additions and 24 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Fix room chat send reliability by preventing concurrent in-flight room dispatches, classifying ambiguous delivered sends as delivered (so composer text is not restored), and hardening optimistic/SSE reconciliation to avoid duplicate user message rendering.