Skip to content

Conversation

@rockwellll
Copy link
Collaborator

@rockwellll rockwellll commented Nov 23, 2025

This PR adds support for handling the Message Carousel and quick-reply buttons within carousel cards.

Screen.Recording.2025-11-23.at.5.03.04.PM.mov

Additions

  1. Adds new sendQuickReplyMessage to the WebchatController for sending quick replies
  2. New MessageController that handles the card clicks and dispatches information about the context (product id, button id, card element) to the Webchat controller.
  3. Adds new tests for the new controller and new methods with slight refactoring.

Note

Add carousel message support with quick-reply handling, introducing MessageController and enhancing WebchatController to send/insert messages and update docs/tests.

  • Webchat:
    • Carousel Support: Handle incoming carousel messages via insertCarouselMessage, mark as seen, update unread counter, and emit webchat:message:received.
    • Quick Replies: Add sendQuickReplyMessage to build/send messages from carousel card clicks, broadcast results, dispatch IDs/events, and handle failures.
    • Message Building: Extract buildMessageElement; insert before typing indicator when present; clone attachments when composing.
  • New Controller:
    • MessageController: Manage carousel interactions (setId, fades on scroll, left/right movement, quickReply dispatch with product/button/body/cardElement).
  • Docs:
    • Expand webchat:message:sent payload to include replied_to, product, and button for carousel card clicks.
  • Tests:
    • Add comprehensive tests for MessageController (scroll/fades/quickReply) and WebchatController (sendQuickReplyMessage, carousel, typing indicator, broadcast handling).
  • Build:
    • Register hellotext--message and include compiled controller changes in dist.

Written by Cursor Bugbot for commit 4ff1497. This will update automatically on new commits. Configure here.

@rockwellll rockwellll merged commit 25ffb4f into main Nov 24, 2025
3 checks passed
@rockwellll rockwellll deleted the carousel branch November 24, 2025 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants