iachat/app/javascript/dashboard/components/widgets/conversation
Gabriel Jablonski 11e9932e9b
feat(whatsapp): show contact typing and recording indicators via baileys presence (#264)
* feat(whatsapp): show contact typing and recording indicators via baileys presence

Subscribe to WhatsApp presence updates via the baileys-api provider to
display real-time typing and recording indicators in the dashboard.

- Handle presence.update webhook events (composing, recording, paused,
  available) and broadcast via ActionCable
- Add conversation.recording event to ActionCable, webhook, and channel
  listeners for parity with typing_on/typing_off
- Show "typing..." / "recording..." in green text on the chat list,
  replacing the message preview
- Show "X is typing" / "X is recording audio" in the conversation view
- Add presence_subscribe provider config option (default off) to gate
  all subscription calls to the baileys-api
- Subscribe to presence on conversation open and periodically (1 min)
  for the top 10 chat list conversations
- Consolidate contact LID from presence.update jidAlt payload
- Prevent echo-back of contact typing events to the channel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address review feedback

- Filter chat list typing indicator to contact-only events
- Add dedupe to presence subscribe bulk calls
- Use strong parameters for conversation_ids
- Remove redundant YAML quotes in swagger webhook enum

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address review feedback

- Extract phone from data[:id] when JID is @s.whatsapp.net (fallback
  when jidAlt is absent)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address review feedback

- Filter recording users in getTypingUsersText to show correct names
- Add 10s timeout to presence_subscribe HTTP request

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: scope typing timer per user instead of per conversation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: make presence subscribe best-effort with rescue per channel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address review feedback

- Add messagePreviewClass to typing preview for consistent padding
- Fix specs to use WebMock assertions instead of instance spying

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:38:11 -03:00
..
advancedFilterItems feat: group conversations (#228) 2026-03-19 21:56:58 -03:00
components chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
ContentTemplates feat: Add call-to-action template support for Twilio (#13179) 2026-01-06 10:38:36 +04:00
contextMenu feat: Allow removing labels via conversation context menu (#13525) 2026-02-17 13:30:55 +05:30
conversation fix: apply installation branding replacement in tooltip copy (#13538) 2026-02-13 16:47:25 -08:00
conversationBulkActions feat: Add natural language date parser for snooze functionality (#13587) 2026-03-06 12:20:22 +04:00
conversationCardComponents chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
copilot feat: new Captain Editor (#13235) 2026-01-21 13:39:07 +05:30
EmptyState chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
helpers chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
linear chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
specs feat(internal-chat): implement internal chat system for agents (#247) 2026-04-11 13:50:15 -03:00
WhatsappTemplates feat(scheduled-messages): add WhatsApp templates (#205) 2026-02-02 19:50:17 -03:00
CannedResponse.vue style: apply fixes for eslint issues [cw-3590] (#10210) 2024-10-03 15:02:12 +05:30
ConversationBasicFilter.vue Merge branch 'chatwoot/develop' into chore/merge-upstream-4.12.0 2026-03-20 00:27:45 -03:00
ConversationBox.vue Merge branch 'main' into chore/merge-upstream-4.12.0 2026-03-19 23:24:55 -03:00
ConversationCard.vue feat(whatsapp): show contact typing and recording indicators via baileys presence (#264) 2026-04-13 11:38:11 -03:00
ConversationHeader.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
ConversationSidebar.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
CopilotEditorSection.vue chore: Hide reply-to when copilot is active (#13749) 2026-03-11 11:30:30 +05:30
EmailTranscriptModal.vue fix: show upgrade prompt when email transcript returns 402 (#13650) 2026-02-26 12:54:40 +05:30
FilterItem.vue chore: Update chat list header UI (#10573) 2024-12-12 10:12:07 +05:30
MessagePreview.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
MessageSignatureMissingAlert.vue feat: new Captain Editor (#13235) 2026-01-21 13:39:07 +05:30
MessagesView.vue fix(groups): restrict enable CTA to superadmin users (#248) 2026-03-21 13:01:02 -03:00
MoreActions.vue fix: Update design to fix the crowded header (#11633) 2025-05-29 18:45:28 -06:00
OnboardingFeatureCard.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
OnboardingView.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
PriorityMark.vue fix: Conversation list overlay issue with Virtua virtualizer (#13648) 2026-02-25 20:18:34 +05:30
QuotedEmailPreview.vue fix: Rendering on email without html content (#12561) 2025-10-01 13:43:05 +05:30
ReplyBox.vue fix(whatsapp): include baileys and z-api in multi-attachment split (#256) 2026-04-07 20:13:29 -03:00
ReplyBoxBanner.vue fix: Wrong assignee displayed after switching conversations (#13501) 2026-02-10 15:23:55 +05:30
ReplyEmailHead.vue chore: Update styles in settings pages (#11070) 2025-03-18 14:40:02 -07:00
ReplyToMessage.vue chore: Hide reply-to when copilot is active (#13749) 2026-03-11 11:30:30 +05:30
ShopifyOrderItem.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
ShopifyOrdersList.vue feat(apps): Shopify Integration (#11101) 2025-03-19 15:37:55 -07:00
TagAgents.vue feat(internal-chat): implement internal chat system for agents (#247) 2026-04-11 13:50:15 -03:00
TagConversations.vue feat(internal-chat): implement internal chat system for agents (#247) 2026-04-11 13:50:15 -03:00
TagGroupMembers.vue feat: group conversations (#228) 2026-03-19 21:56:58 -03:00
TagTools.vue feat: New Scenarios page (#11975) 2025-07-30 19:34:27 +05:30
VariableList.vue fix: Variable search item not showing after braces/commas (#11864) 2025-07-03 19:39:36 +05:30
VoiceCallStatus.vue feat: outbound voice call essentials (#12782) 2025-11-24 17:47:00 -08:00