Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions REACT_V7_UIKIT_DASHBOARD_STITCHING_AUDIT.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions ui-kit/react/campaigns.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@

It does not execute actions, manage message state, or call any SDK methods. When users click interactive elements (buttons, links), the library emits the action to your callback. You decide what happens — open a URL, navigate to a chat, make an API call, etc.

<Note>
When wiring the `onAction` callback, handle each action type (`openUrl`, `chatWithUser`, `chatWithGroup`, `sendMessage`, and the rest) explicitly in your own code. For the recommended pattern of turning card actions into app behavior, see [Event System — Card Actions](/ui-kit/react/event-system#card-actions).
</Note>

### Card Schema JSON Example

```json
Expand Down Expand Up @@ -88,12 +92,12 @@
"light": "transparent",
"dark": "transparent"
},
"textColor": {

Check warning on line 95 in ui-kit/react/campaigns.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/campaigns.mdx#L95

Did you really mean 'textColor'?
"light": "#6C5CE7",
"dark": "#6C5CE7"
},
"size": 40,
"fontSize": 13,

Check warning on line 100 in ui-kit/react/campaigns.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/campaigns.mdx#L100

Did you really mean 'fontSize'?
"borderRadius": 6,
"padding": {
"top": 0,
Expand All @@ -111,14 +115,14 @@
"id": "col_98fed9bd-1a95-4cee-aa81-84a9016e41f2"
}
],
"fallbackText": "",

Check warning on line 118 in ui-kit/react/campaigns.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/campaigns.mdx#L118

Did you really mean 'fallbackText'?
"style": {
"background": {
"light": "#E8E8E8",
"dark": "#E8E8E8"
},
"borderRadius": 16,
"borderColor": {

Check warning on line 125 in ui-kit/react/campaigns.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/campaigns.mdx#L125

Did you really mean 'borderColor'?
"light": "#DFE6E9",
"dark": "#DFE6E9"
},
Expand Down Expand Up @@ -147,6 +151,10 @@

## Handling Push Notifications for Campaigns

<Note>
**Prerequisite: Push Notifications must be configured first.** The tracking calls below only apply once you have set up a push provider (**FCM** or **Web Push**) and are receiving campaign pushes. Start with [Web Push Notifications setup](/notifications/web-push-notifications), and see the [Push Notifications overview](/notifications/push-overview) for provider options and the delivery pipeline.
</Note>

When a campaign push notification arrives via Web Push or FCM, you should:

1. **Report delivery** — Call `CometChat.markPushNotificationDelivered()` when the notification is received
Expand Down
103 changes: 20 additions & 83 deletions ui-kit/react/components/ai-assistant-chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,95 +4,32 @@
---

<Accordion title="AI Integration Quick Reference">
```json
{
"component": "CometChatAIAssistantChat",
"package": "@cometchat/chat-uikit-react",
"import": "import { CometChatAIAssistantChat } from \"@cometchat/chat-uikit-react\";",
"description": "AI agent chat interface with streaming responses, suggested messages, tool calling, and conversation history.",
"cssRootClass": ".cometchat-ai-assistant-chat",
"primaryOutput": {
"prop": "onSendButtonClick",
"type": "(message: CometChat.BaseMessage) => void"
},
"props": {
"data": {
"user": {
"type": "CometChat.User",
"default": "REQUIRED",
"note": "The AI assistant user entity"
},
"streamingSpeed": {
"type": "number",
"default": 30,
"note": "Milliseconds between text chunks during streaming"
},
"aiAssistantTools": {
"type": "CometChatAIAssistantTools",
"default": "undefined",
"note": "Tool handlers for AI function calls"
},
"loadLastAgentConversation": {
"type": "boolean",
"default": false
},
"suggestedMessages": {
"type": "string[]",
"default": "[] (falls back to user metadata)"
},
"parentMessageId": {
"type": "number",
"default": "undefined",
"note": "Load a specific conversation thread"
}
},
"callbacks": {
"onSendButtonClick": "(message: CometChat.BaseMessage) => void",
"onBackButtonClicked": "() => void",
"onCloseButtonClicked": "() => void",
"onError": "((error: CometChat.CometChatException) => void) | null"
},
"visibility": {
"hideSuggestedMessages": { "type": "boolean", "default": false },
"hideChatHistory": { "type": "boolean", "default": false },
"hideNewChat": { "type": "boolean", "default": false },
"showBackButton": { "type": "boolean", "default": false },
"showCloseButton": { "type": "boolean", "default": false }
},
"viewSlots": {
"emptyChatImageView": "ReactNode",
"emptyChatGreetingView": "ReactNode",
"emptyChatIntroMessageView": "ReactNode",
"emptyView": "ReactNode",
"loadingView": "ReactNode",
"errorView": "ReactNode",
"headerItemView": "ReactNode",
"headerTitleView": "ReactNode",
"headerSubtitleView": "ReactNode",
"headerLeadingView": "ReactNode",
"headerTrailingView": "ReactNode",
"headerAuxiliaryButtonView": "ReactNode"
}
},
"events": [
{
"name": "ui:compose/text",
"payload": "{ text }",
"description": "Suggestion pill clicked (sets text in composer)"
}
],
"sdkListeners": [],
"types": {
"CometChatAIAssistantTools": "Class — maps tool function names to handler functions via constructor(actions: Record<string, (args: Record<string, unknown>) => void>)"
}
}
```

| Field | Value |
| --- | --- |
| Component | `CometChatAIAssistantChat` |
| Package | `@cometchat/chat-uikit-react` |
| Import | `import { CometChatAIAssistantChat } from "@cometchat/chat-uikit-react";` |
| CSS root class | `.cometchat-ai-assistant-chat` |
| Primary output | `onSendButtonClick: (message: CometChat.BaseMessage) => void` — emits the sent user message |
| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; plus an [AI Agent](/ai-agents/agent-builder/overview) configured in the Dashboard (passed as the `user` prop) |
| Stitching | Pass the AI Agent's `user` entity; the component streams replies and handles tool calls internally |
| Events emitted | `ui:compose/text` — sets text in the composer when a suggestion pill is clicked — see the [Event System](/ui-kit/react/event-system) |
| SDK listeners (automatic) | None directly; internally uses the message list's SDK listeners for message updates, plus an AI assistant listener for streaming replies |
| Full props | See [Props](#props) |

</Accordion>

## Overview

`CometChatAIAssistantChat` is an AI agent chat interface. It renders a full chat experience with streaming responses, suggested message pills, tool calling support, and a conversation history sidebar. Pass a `CometChat.User` representing the AI assistant and the component handles the rest — message threading, streaming display, and composer integration.

<Warning>
**Prerequisite: an AI Agent must be configured in the CometChat Dashboard.** This component renders nothing useful without one. `CometChatAIAssistantChat` requires an **AI Agent set up in the Dashboard as a `CometChat.User`**, and the `user` prop must be that agent's user entity. The agent's replies, tool execution, and metadata — including `suggestedMessages`, `greetingMessage`, `introductoryMessage`, and tool configuration — are defined when you create the agent.

Set up the agent with the [AI Agent Builder](/ai-agents/agent-builder/overview).
</Warning>

<Note>
**1:1 and group conversations.** AI Agents work in both one-on-one and group conversations. In a 1:1 chat, the end user talks directly with the agent user. In a group, the agent participates as a member — its messages (including cards) are delivered and attributed like any other member's message. If the group contains only one user and one agent, the agent responds automatically. In groups with more than two members, the agent only responds when @mentioned.
</Note>
Expand Down Expand Up @@ -468,7 +405,7 @@

---

### streamingSpeed

Check warning on line 408 in ui-kit/react/components/ai-assistant-chat.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/ai-assistant-chat.mdx#L408

Did you really mean 'streamingSpeed'?

Milliseconds between text chunks during streaming display.

Expand Down
31 changes: 12 additions & 19 deletions ui-kit/react/components/audio-bubble.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,18 @@
---

<Accordion title="AI Integration Quick Reference">
```json
{
"component": "CometChatAudiosBubble",
"package": "@cometchat/chat-uikit-react",
"import": "import { CometChatAudiosBubble } from \"@cometchat/chat-uikit-react\";",
"description": "Batch-aware audio bubble for attached audio files. Renders stacked audio cards with play/pause, seekable slider, duration, and download. NOT used for voice notes — see CometChatVoiceNoteBubble.",
"cssRootClass": ".cometchat-audios-bubble",
"selfExtracting": true,
"multiAttachment": true,
"props": {
"data": {
"message": { "type": "CometChat.MediaMessage", "required": true, "note": "Drives extraction of audio attachments and caption." },
"alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
"textFormatters": { "type": "CometChatTextFormatter[]" },
"className": { "type": "string" }
}
}
}
```

| Field | Value |
| --- | --- |
| Component | `CometChatAudiosBubble` |
| Package | `@cometchat/chat-uikit-react` |
| Import | `import { CometChatAudiosBubble } from "@cometchat/chat-uikit-react";` |
| CSS root class | `.cometchat-audios-bubble` |
| Primary output | None — renders from the SDK message |
| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
| Stitching | None — self-extracting from the SDK message |
| Full props | See [Props](#props) |

</Accordion>

## Overview
Expand All @@ -40,8 +33,8 @@

Key capabilities:

- **Stacked audio cards** — one card per audio attachment with filename, play/pause, seekable slider, elapsed/total time

Check warning on line 36 in ui-kit/react/components/audio-bubble.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/audio-bubble.mdx#L36

Did you really mean 'seekable'?
- **Inline playback** — plays audio directly in the bubble without a fullscreen viewer

Check warning on line 37 in ui-kit/react/components/audio-bubble.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/audio-bubble.mdx#L37

Did you really mean 'fullscreen'?
- **Download button** — download individual audio files
- **Batch grouping** — rendered as one connected group when several media messages are sent together (handled by the [message list](/ui-kit/react/components/message-list#multi-attachment-batch-grouping))
- **Caption support** — optional caption rendered below the cards
Expand All @@ -54,7 +47,7 @@

<iframe
src="https://storybook.cometchat.io/react/iframe.html?id=components-bubbles-message-bubble-audios--two-audios&viewMode=story&shortcuts=false&singleStory=true"
className="w-full rounded-xl"

Check warning on line 50 in ui-kit/react/components/audio-bubble.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/audio-bubble.mdx#L50

Did you really mean 'className'?
loading="lazy"
style={{height: "500px", border: "1px solid #e0e0e0"}}
title="CometChat Audio Bubble — Two Audios"
Expand Down Expand Up @@ -84,7 +77,7 @@
| --- | --- |
| Play/Pause button | Toggles playback for that audio file |
| Filename | Display name of the audio file |
| Seek slider | Seekable progress bar showing current position |

Check warning on line 80 in ui-kit/react/components/audio-bubble.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/audio-bubble.mdx#L80

Did you really mean 'Seekable'?
| Time display | `currentTime / totalDuration` in `m:ss` format |
| Download button | Downloads the audio file |

Expand Down Expand Up @@ -125,9 +118,9 @@

---

### textFormatters

Check warning on line 121 in ui-kit/react/components/audio-bubble.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/audio-bubble.mdx#L121

Did you really mean 'textFormatters'?

Text formatters applied to the caption (mentions, URLs).

Check warning on line 123 in ui-kit/react/components/audio-bubble.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/audio-bubble.mdx#L123

Did you really mean 'formatters'?

| | |
| --- | --- |
Expand Down
30 changes: 12 additions & 18 deletions ui-kit/react/components/call-action-bubble.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,18 @@
---

<Accordion title="AI Integration Quick Reference">
```json
{
"component": "CometChatCallActionBubble",
"package": "@cometchat/chat-uikit-react",
"import": "import { CometChatCallActionBubble } from \"@cometchat/chat-uikit-react\";",
"description": "Self-extracting bubble for call status system messages. Derives the status text, icon, and error color from the SDK call message and the logged-in user.",
"cssRootClass": ".cometchat-action-bubble",
"selfExtracting": true,
"props": {
"data": {
"message": { "type": "CometChat.BaseMessage", "required": true, "note": "The call message (audio/video) in the 'call' category. Drives all extraction." },
"className": { "type": "string", "default": "undefined", "note": "Additional CSS class for the root element" }
}
},
"rendersThrough": "CometChatActionBubble (base primitive)",
"usedBy": ["CometChatCallActionPlugin"]
}
```

| Field | Value |
| --- | --- |
| Component | `CometChatCallActionBubble` |
| Package | `@cometchat/chat-uikit-react` |
| Import | `import { CometChatCallActionBubble } from "@cometchat/chat-uikit-react";` |
| CSS root class | `.cometchat-action-bubble` |
| Primary output | None — renders from the SDK message |
| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
| Stitching | None — self-extracting from the SDK message |
| Full props | See [Props](#props) |

</Accordion>

## Overview
Expand All @@ -39,7 +33,7 @@

<iframe
src="https://storybook.cometchat.io/react/iframe.html?id=components-bubbles-call-action-bubble--outgoing-calls&viewMode=story&shortcuts=false&singleStory=true"
className="w-full rounded-xl"

Check warning on line 36 in ui-kit/react/components/call-action-bubble.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/call-action-bubble.mdx#L36

Did you really mean 'className'?
loading="lazy"
style={{height: "300px", border: "1px solid #e0e0e0"}}
title="CometChat Call Action Bubble — Outgoing"
Expand Down
36 changes: 17 additions & 19 deletions ui-kit/react/components/call-bubble.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,18 @@ description: "A self-extracting bubble for direct-call / meeting messages, with
---

<Accordion title="AI Integration Quick Reference">
```json
{
"component": "CometChatCallBubble",
"package": "@cometchat/chat-uikit-react",
"import": "import { CometChatCallBubble } from \"@cometchat/chat-uikit-react\";",
"description": "Self-extracting call bubble for meeting / direct-call custom messages. Derives the call type, session ID, title, icon, and timestamp from the message.",
"cssRootClass": ".cometchat-call-bubble",
"selfExtracting": true,
"props": {
"data": {
"message": { "type": "CometChat.BaseMessage", "required": true, "note": "The meeting/direct-call message; drives extraction." },
"alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
"onJoinClick": { "type": "(sessionId: string) => void" },
"className": { "type": "string" }
}
}
}
```

| Field | Value |
| --- | --- |
| Component | `CometChatCallBubble` |
| Package | `@cometchat/chat-uikit-react` |
| Import | `import { CometChatCallBubble } from "@cometchat/chat-uikit-react";` |
| CSS root class | `.cometchat-call-bubble` |
| Primary output | Self-extracting call bubble; `onJoinClick: (sessionId: string) => void` starts the call on Join |
| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; see [Calling Integration](/ui-kit/react/calling-integration) to start/join a call session |
| Stitching | Wire `onJoinClick` to start the call (see [Calling Integration](/ui-kit/react/calling-integration)) |
| Full props | See [Props](#props) |

</Accordion>

## Overview
Expand Down Expand Up @@ -92,7 +86,11 @@ Override incoming/outgoing alignment. Defaults to sender-vs-logged-in-user.

### onJoinClick

Callback when the Join button is clicked. Receives the session ID.
Callback when the Join button is clicked. Receives the session ID. Empty by default — you must start or join the call session yourself.

<Note>
See [Calling Integration](/ui-kit/react/calling-integration) for how to start or join a call session.
</Note>

| | |
| --- | --- |
Expand Down
96 changes: 16 additions & 80 deletions ui-kit/react/components/call-buttons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,85 +4,21 @@
---

<Accordion title="AI Integration Quick Reference">
```json
{
"component": "CometChatCallButtons",
"package": "@cometchat/chat-uikit-react",
"import": "import { CometChatCallButtons } from \"@cometchat/chat-uikit-react\";",
"description": "Voice and video call initiation buttons for user or group conversations. Manages the full call lifecycle (outgoing + ongoing) internally.",
"cssRootClass": ".cometchat-call-buttons",
"primaryOutput": {
"description": "Initiates calls via the SDK and renders the outgoing/ongoing call screens"
},
"props": {
"data": {
"user": {
"type": "CometChat.User",
"default": "undefined",
"note": "Pass either user or group, not both"
},
"group": {
"type": "CometChat.Group",
"default": "undefined",
"note": "Pass either user or group, not both"
}
},
"callbacks": {
"onVoiceCallClick": "(entity: CometChat.User | CometChat.Group) => void",
"onVideoCallClick": "(entity: CometChat.User | CometChat.Group) => void",
"onCallEnded": "() => void",
"onError": "((error: CometChat.CometChatException) => void) | null"
},
"visibility": {
"hideVoiceCallButton": { "type": "boolean", "default": false },
"hideVideoCallButton": { "type": "boolean", "default": false }
},
"viewSlots": {
"voiceCallButtonView": "ReactNode",
"videoCallButtonView": "ReactNode"
},
"configuration": {
"callSettingsBuilder": "(isAudioOnlyCall: boolean, user?: CometChat.User, group?: CometChat.Group) => CallSettingsBuilder",
"className": "string"
}
},
"eventsEmitted": [
{
"name": "ui:call/outgoing",
"payload": "{ call }",
"description": "User initiates a 1-on-1 voice/video call"
},
{
"name": "ui:message/sent",
"payload": "{ message, status }",
"description": "Group call meeting message sent"
}
],
"eventsReceived": [
{
"name": "ui:call/rejected",
"payload": "{ call }",
"description": "Re-enables call buttons after the call is rejected"
},
{
"name": "ui:call/ended",
"payload": "{}",
"description": "Resets all call state when the call ends"
}
],
"sdkListeners": [
"onIncomingCallReceived",
"onIncomingCallCancelled",
"onOutgoingCallAccepted",
"onOutgoingCallRejected"
],
"compositionExample": {
"description": "Standalone call buttons or embedded in the MessageHeader auxiliary view",
"components": ["CometChatCallButtons", "CometChatOutgoingCall", "CometChatOngoingCall"],
"flow": "user/group prop -> click button -> SDK initiateCall -> CometChatOutgoingCall overlay -> onOutgoingCallAccepted -> CometChatOngoingCall"
}
}
```

| Field | Value |
| --- | --- |
| Component | `CometChatCallButtons` |
| Package | `@cometchat/chat-uikit-react` |
| Import | `import { CometChatCallButtons } from "@cometchat/chat-uikit-react";` |
| CSS root class | `.cometchat-call-buttons` |
| Primary output | Initiates voice/video calls via the SDK and renders the outgoing/ongoing call screens; `onVoiceCallClick` / `onVideoCallClick` override the default initiation |
| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; plus the Calls SDK installed and calling enabled — see [Calling Integration](/ui-kit/react/calling-integration) |
| Stitching | Pass `user` or `group`; the buttons manage the outgoing/ongoing call lifecycle internally (see [Calling Integration](/ui-kit/react/calling-integration)) |
| Events emitted | `ui:call/outgoing`, `ui:message/sent` — see [Event System](/ui-kit/react/event-system) |
| Events received | `ui:call/rejected`, `ui:call/ended` — see [Event System](/ui-kit/react/event-system) |
| SDK listeners (automatic) | Incoming call events (received/cancelled) and outgoing call events (accepted/rejected) to sync button state and screen transitions |
| Full props | See [Props](#props) |

</Accordion>

## Where It Fits
Expand Down Expand Up @@ -219,7 +155,7 @@
}
```

#### onError

Check warning on line 158 in ui-kit/react/components/call-buttons.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/call-buttons.mdx#L158

Did you really mean 'onError'?

Fires on internal errors during call initiation.

Expand All @@ -231,7 +167,7 @@
return (
<CometChatCallButtons
user={chatUser}
onError={(error: CometChat.CometChatException) => {

Check warning on line 170 in ui-kit/react/components/call-buttons.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/call-buttons.mdx#L170

Did you really mean 'onError'?
console.error("CallButtons error:", error);
}}
/>
Expand Down Expand Up @@ -308,7 +244,7 @@
<CometChatCallButtons
user={chatUser}
voiceCallButtonView={<button className="my-voice-btn">Voice</button>}
videoCallButtonView={<button className="my-video-btn">Video</button>}

Check warning on line 247 in ui-kit/react/components/call-buttons.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react/components/call-buttons.mdx#L247

Did you really mean 'className'?
/>
);
}
Expand Down Expand Up @@ -417,7 +353,7 @@

### callSettingsBuilder

Builder function for customizing the ongoing call settings.
Builder function for customizing the ongoing call settings, built via `callSettings`. See [Calling Integration](/ui-kit/react/calling-integration) for call-settings setup.

| | |
| --- | --- |
Expand Down
Loading