iachat/app/javascript/dashboard/store/modules/specs
Muhsin Keloth 939471cb3b
fix: Prevent duplicate conversations in conversation list (#13713)
Agents using API channel inboxes (e.g., WhatsApp Automate) reported
seeing the same conversation appear twice in their conversation list —
one showing the last message preview and the other showing "No
Messages". Backend investigation confirmed no duplicate conversations
exist in the database, making this purely a frontend issue.

The root cause is a race condition in WebSocket event delivery. When a
conversation is created via the API with auto-assignment, the backend
enqueues multiple ActionCable broadcast jobs (`conversation.created`,
`assignee.changed`, `team.changed`) within milliseconds of each other.
In production with multi-threaded Sidekiq workers, these events can
arrive at the frontend out of order. If `assignee.changed` arrives
before `conversation.created`, the `UPDATE_CONVERSATION` mutation pushes
the conversation into the store (since it doesn't exist yet), and then
`ADD_CONVERSATION` blindly pushes it again — resulting in a duplicate
entry.

The fix adds a uniqueness check in the `ADD_CONVERSATION` mutation to
skip the push if a conversation with the same ID already exists in the
store, matching the dedup pattern already used by
`SET_ALL_CONVERSATION`.
2026-03-06 14:07:02 +04:00
..
account feat: Agent language settings (#11222) 2025-09-09 14:27:36 +05:30
agentBots feat: Ability to reset api_access_token (#11565) 2025-05-29 14:42:13 +05:30
agentCapacityPolicies feat: Agent capacity policy Create/Edit pages (#12424) 2025-09-12 18:42:55 +05:30
agents feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
assignmentPolicies feat: Agent assignment policy Create/Edit pages (#12400) 2025-09-10 20:02:11 +05:30
attributes feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
auth feat: Ability to reset api_access_token (#11565) 2025-05-29 14:42:13 +05:30
automations feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
bulkActions feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
campaigns feat: WhatsApp campaigns (#11910) 2025-07-16 09:04:02 +05:30
cannedResponses feat: Update the design for canned responses (#9903) 2024-08-07 09:43:47 -07:00
contactConversations feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
contactLabels feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
contactNotes feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
contacts feat: outbound voice call essentials (#12782) 2025-11-24 17:47:00 -08:00
conversationLabels feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
conversationMetadata Feature: Contact Panel with conversation details (#397) 2020-01-01 22:30:43 +05:30
conversationPage feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
conversations fix: Prevent duplicate conversations in conversation list (#13713) 2026-03-06 14:07:02 +04:00
conversationSearch feat: Advanced Search Backend (#12917) 2026-01-07 15:30:49 +05:30
conversationStats feat: Add debounce for meta query (#11195) 2025-03-27 19:41:02 -07:00
conversationTypingStatus feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
conversationWatchers feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
csat feat(ee): Review Notes for CSAT Reports (#13289) 2026-01-15 19:53:57 -08:00
customRole chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00
customViews feat: Add new sidebar for Chatwoot V4 (#10291) 2024-10-23 18:32:37 -07:00
dashboardApps feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
draftMessages feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
inboxAssignableMembers feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
inboxes feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
integrations feat: Update the design for integration page (#9825) 2024-07-24 16:35:40 -07:00
labels feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
macros feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
notifications feat: Add unread badge to sidebar for inbox view (#10803) 2025-01-31 15:14:10 +05:30
reports feat: Add conversations summary CSV export (#13110) 2026-01-13 12:30:26 +04:00
sla feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
slaReports feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
teamMembers feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
teams feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
userNotificationSettings feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
webhooks feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
summaryReports.spec.js fix: add loading and silent retry to summary reports (#13455) 2026-02-06 19:53:46 +05:30