Skip to content

Bug: Conversations bulk "Send messages" inserts a hardcoded untranslated placeholder and never delivers via the integration #2047

Closed

Description

@yannickmonney

Area / route
Conversations inbox bulk actions — /dashboard/{org}/conversations/open lane. Frontend: services/platform/app/features/conversations/hooks/use-bulk-actions.ts, components/bulk-send-dialog.tsx, components/conversations.tsx. Backend: convex/conversations/mutations.ts + convex/conversations/add_message_to_conversation.ts.

Steps to reproduce

  1. Open a populated /dashboard/{org}/conversations/open lane.
  2. Select one or more conversation rows (the bulk toolbar appears).
  3. Click the bulk Send icon (tooltip/aria-label conversations.bulk.sendMessages, rendered only when status === 'open').
  4. In the BulkSendDialog, click Send.

Expected
Either a composer collects a real message body and the reply is dispatched to each customer through the conversation's integration (mirroring the single-conversation reply path, which calls sendMessageViaIntegration with to/subject/html/text), or the bulk Send action should not be offered.

Actual
handleSendMessages calls addMessage(...) for every selected conversation with a hardcoded, untranslated content literal 'Message sent'. The dialog has no text input to enter a body. useAddMessage maps to addMessageToConversation, whose helper performs a plain ctx.db.insert('conversationMessages', ...) (plus an internal emitEvent) and never dispatches to any external integration/email. The result: each selected conversation gets an identical outbound conversationMessages row reading "Message sent" that looks like a real agent reply but carries no real content and is never delivered to the customer. The success toast ("Messages sent / Successfully sent N messages") falsely implies delivery.

Evidence (confirmed by reading the code)

  • services/platform/app/features/conversations/hooks/use-bulk-actions.ts:64-104 — handleSendMessages; lines 78-86 pass content: 'Message sent', sender: 'Agent', isCustomer: false, status: 'sent'. The body string is a bare literal, not an i18n key.
  • services/platform/app/features/conversations/components/bulk-send-dialog.tsx:16-50 — confirm-only dialog (heading, description, Cancel, Send); no textarea/input for message content.
  • services/platform/app/features/conversations/hooks/mutations.ts:8-12 — useAddMessage → api.conversations.mutations.addMessageToConversation.
  • services/platform/convex/conversations/add_message_to_conversation.ts:78-96 — ctx.db.insert('conversationMessages', ...); no integration/email dispatch anywhere in the helper.
  • Contrast: services/platform/convex/conversations/send_message_via_integration.ts builds threading headers and dispatches outbound; the single-reply path services/platform/app/features/conversations/components/conversation-panel.tsx:265-277 uses sendMessageViaIntegration with to/subject/html/text.
  • Wiring/reachability: services/platform/app/features/conversations/components/conversations.tsx:257-269 (bulk Send button → openBulkSendDialog, gated by status === 'open') and :401-408 (BulkSendDialog with onConfirm={handleSendMessages}).
  • i18n: services/platform/messages/en.json defines conversations.bulkSend.title/description/send and conversations.bulk.messagesSent* toasts, but the inserted body 'Message sent' is a hardcoded literal with no key.

Notes
Two distinct defects in one feature: (a) the inserted message body is a hardcoded, untranslated placeholder regardless of any user intent, and (b) bulk Send uses the plain DB-insert path rather than the integration dispatch path, so nothing reaches the customer even though the UI reports success. The placeholder-content defect alone is clearly provable from the cited code; the non-dispatch behavior is also confirmed. Minimal honest fix is to either remove the bulk Send action or add a message-body composer to BulkSendDialog and route through sendMessageViaIntegration per conversation (resolving each conversation's customer.email, integrationName, and subject, as the single-reply path does).


Filed by an automated manual-review pass (live browser QA + a 25-agent code-grounded audit, each finding adversarially verified). Deduped against open issues (incl. #1972–#1999, settings/forms epic #1941–#1966, audit cluster #1842–#1846) and recently-closed issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    automatedbugpriority: highservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions