fix(ui-kit/react-native): unexported imports, wrong event names, the missing unban path and Ongoing Call page — ENG-39154 - #524
Open
suraj-chauhan-cometchat wants to merge 4 commits into
Conversation
…port
ENG-39166. Five imports on four React Native pages named symbols that
@cometchat/chat-uikit-react-native does not export from its package root, so
copied snippets failed with TS2305 (and EnterKeyBehavior, used as a value, was
undefined at runtime). Each is now fixed with a docs-only change that uses the
kit's public API as it ships today.
call-buttons
OutgoingCallConfiguration is not exported. outgoingCallConfiguration is spread
straight into the outgoing call component, so a plain object satisfies it.
This is also more correct than the class it replaces: that class's
constructor copies only 3 of its 9 fields and silently drops the rest.
compact-message-composer
- EnterKeyBehavior is not exported by name, but it is public through the
exported CometChatUiKitConstants namespace. All four references (two in the
example, one in the props table) now use
CometChatUiKitConstants.EnterKeyBehavior.*. A plain "sendMessage" string
does not work: string enums are nominal, so it fails with TS2322.
- Removed the "Configuration" section. It built a
SingleLineMessageComposerConfiguration that no v5 component accepts and
never used it. Every option it showed is already a direct prop in the props
table (hideVoiceRecording is an alias of the documented
hideVoiceRecordingButton). Nothing linked to the section.
component-styling
CometChatReceipt is not exported, and the snippet also used
CometChatUiKitConstants without importing it. The theme override is now shown
on CometChatConversations. It is deliberately not shown on
CometChatMessageList: message bubbles pass their own receipt style, which wins
the merge, so a top-level receiptStyles override does not change them. Run
against the kit's default light theme and its real deepMerge, the read-receipt
tint resolves to the override (#FFAB00) for Conversations and stays at the
bubble default (#09C26F) for MessageList. The prose now says exactly that.
search
SearchStyle was imported only as a type annotation. The type is now derived
from the component (React.ComponentProps<typeof CometChatSearch>["style"]),
which also corrects Partial<> to the prop's real DeepPartial<>.
Verified: every edited code block was extracted from the page and compiled
against the published kit; deliberately broken copies (a misspelled theme key,
enum member and component name) fail, so the checks are live. MDX fences and
tags remain balanced on all four pages. Rendered behaviour was confirmed by the
reporter on device before commit.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ENG-39167. The React Native events page listed names the kit never emits, so a
listener copied from it silently never fired. Every name on the corrected page
was checked against the kit source.
Names
ccUserUnblocked -> ccUserUnBlocked (kit spelling, capital B)
ccGroupMemberUnbanned -> ccGroupMemberUnBanned
ccLiveReaction -> removed; no such event exists
Call events
onIncomingCallAccepted -> ccCallAccepted
onIncomingCallRejected -> ccCallRejected
onCallEnded -> ccCallEnded
onCallInitiated -> ccOutgoingCall. ccCallInitiated is declared but never
emitted; ccOutgoingCall is what fires after
CometChat.initiateCall() succeeds.
onOutgoingCallAccepted/Rejected -> removed. ccOutgoingCallAccepted and
ccOutgoingCallRejected are declared but never emitted.
The page now points to the Chat SDK's call listener,
where these callbacks do exist.
Handlers receive { call }, not a bare call. Two descriptions were also wrong:
ccCallRejected fires when the user cancels their own outgoing call as well as
when they reject an incoming one, and ccCallEnded is emitted with no call when
an answered call ends.
Structure
ccActiveChatChanged moved from UI events to message events: it is declared on
the message listener and only fires through addMessageListener. The
"CometChatUIEventListener" heading is renamed "UI Events"; no such symbol
exists in the kit.
Verified
- All 39 names on the page type-check on the listener their section belongs
to; a known-wrong name fails, so the check is live.
- All 39 reach an inline listener through the real CometChatUIEventHandler
dispatcher (39/39), and each has at least one emit site in the kit.
- The SDK example compiles. CallListener does not key-check its argument, so
the callback names were confirmed against the SDK's CallListener class and
five shipped kit call sites, including CometChatOutgoingCall.
- Rendered in a local Mintlify preview; confirmed by the reporter.
Not addressed here: listeners whose handler is a named function never fire
even with the correct name, because the dispatcher matches on the function's
.name. That is a kit defect, tracked separately as ENG-39300.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ENG-39170 (ban round trip).
CometChatGroupMembers gives owners, admins and moderators a Ban option by
default, but the UI Kit ships no screen to list banned members or unban them,
and the group chat guide never said so. It listed banGroupMember() in its
feature matrix with no unban counterpart, and described the members list as
offering only "scope changes and removal". A reader following the guide could
ban a member and find no documented way back.
The round trip is already documented, and correct, on the Chat SDK page
sdk/react-native/group-kick-ban-members; the guide simply never pointed to it.
guide-group-chat
- Section 4 now says what the menu offers and to whom: owners, admins and
moderators can change scope, remove, or ban (RolePermissions in
CometChatGroupMembers; participants get no actions).
- A note after the section 4 example states the UI Kit has no banned-members
or unban screen, links to the SDK sections for listing banned members
(BannedMembersRequestBuilder) and unbanning (unbanGroupMember), and to
hideBanMemberOption for removing the Ban option instead.
- The feature matrix gains "Unban member" and "List banned members".
Verified
- The kit on dev-v5 has no unbanGroupMember or BannedMembersRequestBuilder
usage and exports no banned-members component.
- The SDK page's ban, unban and banned-members TypeScript examples compile
against the Chat SDK; misspelled copies of both APIs fail, so the check is
live.
- All three new links resolve in a local Mintlify preview: the two SDK anchors
exist on the rendered page, and group-members renders the
hideBanMemberOption row. Confirmed by the reporter.
Not in this change: a details-screen recipe and replacement guidance in the
upgrade guide (ENG-39170 items 2 and 3) are left as follow-ups.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
suraj-chauhan-cometchat
requested a review
from jitvarpatil
as a code owner
September 16, 2026 11:01
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
ENG-39171. The kit exports CometChatOngoingCall, the in-call screen, but the
React Native v5 docs had no page for it: ui-kit/react-native/ongoing-call has
never existed (only the v4 page does), and the live URL redirects to the docs
home. iOS and Vue have current Ongoing Call pages; the new page follows the iOS
structure (Usage, Customization, Common Patterns), since Vue's is an older
props-only page. It uses React Native code and documents only what the RN kit
supports.
ongoing-call (new)
- Integration: render it with a session ID and a CallSettingsBuilder whose
OngoingCallListener ends the session, mirroring CometChatIncomingCall.
Incoming and Outgoing Call normally render it for you.
- Actions: onError is the only callback. It fires when the component cannot
get a call token; a plain Error arrives as a CometChatException with code
TOKEN_GENERATION_FAILED, and SDK exceptions pass through unchanged.
- Filters: the CallSettingsBuilder methods and defaults, taken from the Calls
SDK typings; the three methods the SDK marks obsolete are left out.
- Events: the component emits none. ccCallEnded comes only from Incoming and
Outgoing Call.
- Customization: no style prop and no view slots; the loading spinner uses
the theme's primary color. The builder must be an instance (its build() is
called), and only the settings built on the first render are used.
- Common Patterns: accepting a call, video and audio-only settings, call-end
handling, and passing a builder to Incoming Call, Outgoing Call or Call
Buttons. Given a builder, those components set their own
OngoingCallListener on it and skip their default layout and audio-only
settings.
docs.json
Adds the page to the React Native nav after Outgoing Call, as on iOS.
components-overview
Adds CometChatOngoingCall to the Calling catalog.
Verified
- The component's source is identical in kit 5.4.0 and 5.5.0, and the builder
props on Incoming Call, Outgoing Call and Call Buttons are unchanged.
- All 8 code blocks compile against kit 5.4.0, Chat SDK 4.0.28 and Calls SDK
5.0.5 under strict TypeScript. A misspelled copy of each fails, and a
control file with a deliberate error confirms the checker ran.
- Runtime claims ran in Jest against the real component with the SDKs mocked:
spinner then call view, full-size root view, the onError codes, first-render
settings kept, a plain settings object throws, and the spinner color.
- Rendered in a local Mintlify preview: the section structure matches the iOS
page, and all 28 links and anchors resolve. Confirmed by the reporter.
Not verified: the end-of-call steps in a live call on a device.
Not in this change: an onError function that changes between renders, such as
an inline arrow, makes the component request a new call token and fall back to
the spinner (reproduced in Jest). That is a kit defect, not documented here as
intended behavior.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Four changes to the React Native UI Kit docs from the ENG-39154 triage, one commit each. Every claim below was checked against the kit and SDK source, and every changed code block was compiled.
1. Four pages imported names the kit does not export — ENG-39166 (
59bac322)Copied into a TypeScript project, each of these imports failed with
TS2305(no exported member).call-buttonsnew OutgoingCallConfiguration({...})outgoingCallConfigurationcompact-message-composerEnterKeyBehavior.SendMessageCometChatUiKitConstants.EnterKeyBehavior.SendMessage, which is already publiccompact-message-composerSingleLineMessageComposerConfigurationhideVoiceRecordingunder its main name,hideVoiceRecordingButton)component-styling<CometChatReceipt>CometChatConversationssearchimport { SearchStyle }CometChatSearchThe receipts example does not use
CometChatMessageListon purpose. Message bubbles pass their own receipt style, which wins the merge. Run against the kit's default theme and its real merge, a read receipt resolves to the override (#FFAB00) in Conversations but stays at the bubble default (#09C26F) in the message list.2. The events page listed names the kit never emits — ENG-39167 (
a0aae25a)A listener copied from the page silently never fired.
ccUserUnblocked→ccUserUnBlocked, andccGroupMemberUnbanned→ccGroupMemberUnBanned.ccLiveReactionremoved; the kit has no such event.on…callbacks (onIncomingCallAccepted,onCallInitiated, …) that are not UI Kit event names. It now lists the four call events the kit emits:ccCallAccepted,ccCallRejected,ccCallEnded,ccOutgoingCall. The kit also declaresccCallInitiated,ccOutgoingCallAcceptedandccOutgoingCallRejectedas listener keys, but nothing emits them, so outgoing accept/reject now points to the Chat SDK's call listener.{ call }.ccCallRejectedalso fires when the user cancels their own outgoing call, and oneccCallEndedpath sends nocall.ccActiveChatChangedmoved to message events: it is emitted withemitMessageEvent, so onlyaddMessageListenerreceives it.CometChatUIEventListenerheading named a symbol the kit does not have; it is now "UI Events".3. No documented way to undo a ban — ENG-39170 (
aaa21c0f)CometChatGroupMembersgives owners, admins and moderators a Ban option by default, but the UI Kit has no screen to list banned members or unban them, andguide-group-chatnever said so. The Chat SDK pagegroup-kick-ban-membersalready documents both, and the guide now points to it:hideBanMemberOption.4. The in-call screen had no page — ENG-39171 (
af864950)The kit exports
CometChatOngoingCall, the screen users see during a call, but the React Native v5 docs never had a page for it. Only the v4 page exists, and/ui-kit/react-native/ongoing-callredirects to the docs home. iOS and Vue have current Ongoing Call pages, so the new page follows the iOS structure (Usage, Customization, Common Patterns); Vue's is an older props-only page. It uses React Native code and documents only what the RN kit supports:sessionID,callSettingsBuilderandonError. There is nostyleprop and there are no view slots, and the component emits no UI events of its own.CallSettingsBuilderwhoseOngoingCallListenerends the session, the same stepsCometChatIncomingCalltakes. Incoming and Outgoing Call normally render it for you.CallSettingsBuildermethods and their defaults, taken from the Calls SDK typings. The three methods the SDK marks obsolete are left out.ccCallEnded, so it never fires for a call screen you render yourself.OngoingCallListeneron it, and they skip their default layout and audio-only settings.The page is also added to the nav after Outgoing Call, as on iOS, and to the Calling catalog in
components-overview.Related Issue(s)
{ ccCallAccepted: handleAccept }, never fires even with the right event name, because the kit dispatches by comparing the event name with the function's.name.onErrorfunction that changes between renders, such as an inline arrow, makesCometChatOngoingCallrequest a new call token and fall back to the loading spinner (reproduced in Jest). The page'sonErrorexample usesuseCallback.Type of Change
Checklist
Additional Information
How it was verified. Compile checks used TypeScript 6.0.3 in strict mode against UI Kit 5.4.0, Chat SDK 4.0.28 and Calls SDK 5.0.5. A control file with a deliberate type error was included to prove the checker ran.
user,chatUser,loggedIn). The receipts block was wrapped in a function because it starts atreturn, and the two alternative composer usages were compiled as separate statements.CometChat.CallListener's constructor takes...args: any[], so a misspelled handler still compiles. Its two handler names were checked against theCallListenerclass in the SDK'sCometChat.d.tsinstead.TS2305.CometChat.BannedMembersRequestBuilderandCometChat.unbanGroupMember(), which the guide now names, compile.ccUserUnblocked,ccGroupMemberUnbanned,ccLiveReaction,onIncomingCallAcceptedandonCallInitiatedare rejected, and so isccActiveChatChangedon the UI listener.CometChatUIEventHandlerin Jest.onErrorcodes, only the first render's settings being used, a plain settings object throwing, and the spinner color.Unrelated, not touched:
sdk/react-native/authentication-overview.mdx:16:104, in a file this PR does not change. The|insidePromise<CometChat.User | null>splits that table cell, leaving<CometChat.Useroutside its code span, where MDX parses it as JSX.components-overview#components, an anchor that page does not have.components-overviewlistsonClosePressforCometChatOutgoingCall. Kit 5.5.0 has no such prop; the prop isonEndCallButtonPressed.Screenshots (if applicable)
Text, table and new-page changes only; each page was verified by rendering it locally.
🤖 Generated with Claude Code