iachat/app/javascript/dashboard/components
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
..
Accordion chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
app feat(release-notes): add user-facing release notes skill and link UI to fazer.ai (#261) 2026-04-11 22:17:14 -03:00
auth feat: Add the frontend support for MFA (#12372) 2025-09-18 21:16:06 +05:30
base feat: Eslint rules (#9839) 2024-08-05 14:02:16 +05:30
buttons feat: Conversation workflows(EE) (#13040) 2026-01-27 11:36:20 +04:00
copilot chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
table chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
ui Merge branch 'main' into chore/merge-upstream-4.12.0 2026-03-19 23:24:55 -03:00
widgets feat(whatsapp): show contact typing and recording indicators via baileys presence (#264) 2026-04-13 11:38:11 -03:00
ChannelSelector.vue fix: search header overlap with new conversation form (#13548) 2026-02-20 11:24:37 +05:30
ChatList.vue feat(whatsapp): show contact typing and recording indicators via baileys presence (#264) 2026-04-13 11:38:11 -03:00
ChatListHeader.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
Code.vue feat(zapi): Z-API integration (#115) 2025-10-15 16:23:04 -03:00
ConversationItem.vue fix: Conversation list overlay issue with Virtua virtualizer (#13648) 2026-02-25 20:18:34 +05:30
CustomAttribute.vue fix: Issues with custom attributes in conversation sidebar (#11476) 2025-05-16 15:22:18 +05:30
CustomBrandPolicyWrapper.vue style: apply fixes for eslint issues [cw-3590] (#10210) 2024-10-03 15:02:12 +05:30
CustomSnoozeModal.vue chore: Update buttons in conversation screens(#11132) 2025-03-21 14:47:28 +05:30
index.js chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
IntersectionObserver.vue feat: Vite + vue 3 💚 (#10047) 2024-10-02 00:36:30 -07:00
Modal.vue chore: Update buttons in conversation screens(#11132) 2025-03-21 14:47:28 +05:30
ModalHeader.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
NetworkNotification.vue chore: Update buttons in conversation screens - 2 (#11134) 2025-03-21 21:54:54 +05:30
policy.vue feat: Add visibility checks for installation types (#10773) 2025-02-21 14:48:31 -08:00
SettingsSection.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
Snackbar.vue fix: Snackbar notifications hidden behind modal dialogs (#11616) 2025-05-29 12:49:38 +05:30
SnackbarContainer.vue feat: group conversations (#228) 2026-03-19 21:56:58 -03:00