Skip to content

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
mainfrom
docs/eng-39154-rn-v5-docs-fixes
Open

suraj-chauhan-cometchat wants to merge 4 commits into
mainfrom
docs/eng-39154-rn-v5-docs-fixes

Conversation

@suraj-chauhan-cometchat

@suraj-chauhan-cometchat suraj-chauhan-cometchat commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

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).

Page Before After
call-buttons new OutgoingCallConfiguration({...}) a plain object passed to outgoingCallConfiguration
compact-message-composer EnterKeyBehavior.SendMessage CometChatUiKitConstants.EnterKeyBehavior.SendMessage, which is already public
compact-message-composer a "Configuration" section built from SingleLineMessageComposerConfiguration removed: it is not exported and no component takes it. Every option it showed is already a documented composer prop (hideVoiceRecording under its main name, hideVoiceRecordingButton)
component-styling a standalone <CometChatReceipt> the theme override applied to CometChatConversations
search import { SearchStyle } the type derived from CometChatSearch

The receipts example does not use CometChatMessageList on 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.

  • ccUserUnblockedccUserUnBlocked, and ccGroupMemberUnbannedccGroupMemberUnBanned.
  • ccLiveReaction removed; the kit has no such event.
  • The call table listed six 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 declares ccCallInitiated, ccOutgoingCallAccepted and ccOutgoingCallRejected as listener keys, but nothing emits them, so outgoing accept/reject now points to the Chat SDK's call listener.
  • Call handlers receive { call }. ccCallRejected also fires when the user cancels their own outgoing call, and one ccCallEnded path sends no call.
  • ccActiveChatChanged moved to message events: it is emitted with emitMessageEvent, so only addMessageListener receives it.
  • The CometChatUIEventListener heading named a symbol the kit does not have; it is now "UI Events".

3. No documented way to undo a ban — ENG-39170 (aaa21c0f)

CometChatGroupMembers gives owners, admins and moderators a Ban option by default, but the UI Kit has no screen to list banned members or unban them, and guide-group-chat never said so. The Chat SDK page group-kick-ban-members already documents both, and the guide now points to it:

  • Section 4 now says what the members menu offers and to whom.
  • A note after the section 4 example links to listing banned members, unbanning, and hideBanMemberOption.
  • The feature matrix gains "Unban member" and "List banned members".

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-call redirects 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:

  • Props: only sessionID, callSettingsBuilder and onError. There is no style prop and there are no view slots, and the component emits no UI events of its own.
  • Integration: render it with a session ID and a CallSettingsBuilder whose OngoingCallListener ends the session, the same steps CometChatIncomingCall takes. Incoming and Outgoing Call normally render it for you.
  • Filters: a table of CallSettingsBuilder methods and their defaults, taken from the Calls SDK typings. The three methods the SDK marks obsolete are left out.
  • Events: only Incoming and Outgoing Call emit ccCallEnded, so it never fires for a call screen you render yourself.
  • Your own builder on Incoming Call, Outgoing Call or Call Buttons: these components set their own OngoingCallListener on 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)

  • Parent: ENG-39154
  • Addressed here: ENG-39166, ENG-39167, ENG-39171, and item 1 of ENG-39170 (the ban round trip). Items 2 and 3 of ENG-39170 stay open as follow-ups.
  • Related kit bug, not part of this PR: ENG-39300. A handler passed by name, like { ccCallAccepted: handleAccept }, never fires even with the right event name, because the kit dispatches by comparing the event name with the function's .name.
  • Kit bug found while writing the Ongoing Call page, not part of this PR and not yet filed: an onError function that changes between renders, such as an inline arrow, makes CometChatOngoingCall request a new call token and fall back to the loading spinner (reproduced in Jest). The page's onError example uses useCallback.

Type of Change

  • Documentation correction/update
  • New documentation
  • Improvement to existing documentation
  • Typo fix
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

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.

  • Changed code blocks (sections 1–3): all five compile. Fragments got only the declarations they reference (user, chatUser, loggedIn). The receipts block was wrapped in a function because it starts at return, and the two alternative composer usages were compiled as separate statements.
  • Misspelling checks (sections 1–3): for each of the four UI Kit blocks, a copy with one misspelled key or member fails to compile, so those blocks really are type-checked. The SDK snippet is different: CometChat.CallListener's constructor takes ...args: any[], so a misspelled handler still compiles. Its two handler names were checked against the CallListener class in the SDK's CometChat.d.ts instead.
  • Old imports: all five fail with TS2305.
  • Unban APIs: CometChat.BannedMembersRequestBuilder and CometChat.unbanGroupMember(), which the guide now names, compile.
  • Events:
    • All 39 names on the page are accepted by their listener types.
    • The old names ccUserUnblocked, ccGroupMemberUnbanned, ccLiveReaction, onIncomingCallAccepted and onCallInitiated are rejected, and so is ccActiveChatChanged on the UI listener.
    • Each of the 39 has at least one emit site in the kit source.
    • All 39 reached a listener through the real CometChatUIEventHandler in Jest.
  • Links (sections 1–3): the four links in the added lines resolve in a local Mintlify preview, and their target headings exist. Each page was also checked in that preview before commit.
  • Ongoing Call page (section 4):
    • The component's source is identical in kit 5.4.0 and 5.5.0, and so are the builder props on Incoming Call, Outgoing Call and Call Buttons.
    • All 8 code blocks compile, and a misspelled copy of each fails.
    • The page's runtime claims ran in Jest against the real component, with the SDKs mocked: the spinner until the token arrives, the full-size root view, the onError codes, only the first render's settings being used, a plain settings object throwing, and the spinner color.
    • All 28 links and anchors resolve in the local preview, and the page was checked there before commit.
    • Not verified: the end-of-call steps in a live call on a device.
  • Spelling and grammar: proofread by hand; the repo has no spell-check workflow.

Unrelated, not touched:

  • The local preview reports an MDX parse error at sdk/react-native/authentication-overview.mdx:16:104, in a file this PR does not change. The | inside Promise<CometChat.User | null> splits that table cell, leaving <CometChat.User outside its code span, where MDX parses it as JSX.
  • Eight React Native pages link to components-overview#components, an anchor that page does not have.
  • The Calling catalog in components-overview lists onClosePress for CometChatOutgoingCall. Kit 5.5.0 has no such prop; the prop is onEndCallButtonPressed.

Screenshots (if applicable)

Text, table and new-page changes only; each page was verified by rendering it locally.

🤖 Generated with Claude Code

…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>
@mintlify

mintlify Bot commented Sep 16, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cometchat 🟢 Ready View Preview Sep 16, 2026, 1:17 PM

💡 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>
@suraj-chauhan-cometchat suraj-chauhan-cometchat changed the title fix(ui-kit/react-native): unexported imports, wrong event names, and the missing unban path — ENG-39154 fix(ui-kit/react-native): unexported imports, wrong event names, the missing unban path and Ongoing Call page — ENG-39154 Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant