Repository navigation
docs(react-native): Offline Support for the React Native UI Kit - #610
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WEaVigCRBjkftm78T25MQA
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbguTt1cqFxTDQyroF6wHx
- Files picked into the composer tray are not queued offline; say so,
and list what is queued (text, custom, voice notes, uploaded media).
- Logout and user switch delete the cache; a restart with the same user
keeps it (the old "logging in again keeps the cache" was wrong).
- Retry on a message the SDK no longer holds removes the row.
- A failed edit is not put back and goes to the composer's onError.
- Download and Share copy local files only from the SDK media folder.
- Thread header counts a queued reply once.
- Escape the {count} placeholders so MDX does not evaluate them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
- methods: offline setting in UIKitSettings and Init (with an example), logout clears the offline cache, send* promise behaviour offline. - CLI and Expo integration: short note with requirements and a link. - overview: Offline Support card. - conversations and message list: hideOfflineNotices prop and a note. - message composer, compact composer, thread header: one-line notes. - events: ccMessageSendStateChanged and ccOfflineCacheReset. - localize: the offline string keys with their English texts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
…messages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
The offline release ships the React Native Chat SDK as a patch from the live 4.2.0 (-> 4.2.1), so the docs that name it move with it. sdk/react-native: every offline minimum-version statement moves 4.2.0 -> 4.2.1, including the ones on real-time-listeners and retrieve-conversations. offline-sync and offline-media-caching had no minimum-version line at all; both now carry one. Install instructions in setup-sdk.mdx are unpinned and are left alone. ui-kit/react-native: the Chat SDK minimum moves 4.2.0 -> 4.2.1 across offline-support, methods, core-features and the two integration pages. The React Native UI Kit version in these pages is already 5.6.0, the minor bump from the live 5.5.4, so it needs no change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D7Ygtnje2DAqQ4FmgWhYnt
…UI Kit offline docs Public docs must not mention duplicate messages from offline sends, even indirectly (Aditya, 23 Nov). Removes the lost-send-acknowledgement bullet from "Limitations and known issues". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D7Ygtnje2DAqQ4FmgWhYnt
…ine docs Missed in the first pass: the Retry bullet claimed a queued retry "cannot duplicate it". Same rule as the limitations bullet (no mention of duplicate messages from offline sends, even indirectly), and the claim was also wrong — delivery is at-least-once (BEH-SEND-23, Outbox.ts:1918). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D7Ygtnje2DAqQ4FmgWhYnt
…d floor
Review fixes on the React Native offline docs, checked against UI Kit 5.6.0.
- Document that a group call started offline is refused rather than queued, and
that ccCallFailed carries { error } with ERROR_NO_INTERNET for it. Correct the
payload shapes in events.mdx and call-buttons.mdx, which documented and
demonstrated only { call } for that path.
- Scope the "an older SDK ignores offline" claim to init(): initFromSettings
passes chatSDK.offline straight through with no 4.2.1 check
(CometChatUIKit.ts:106-150).
- Move the compileSdkVersion 35 / media3 1.8.0 requirement into both
integration guides and the offline-off list - media3 is new in 5.6.0 and the
requirement applies whether or not offline is on (android/build.gradle:78).
- Note the iOS file-bubble full-screen preview, which is also the iPad fix.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF
…in (ec1e3df) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF
… platform-specific group-call note Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF
Removed the 10-second catch-up and unknown-failure-reason-after-restart items; both are known issues in the kit's release notes, not docs content. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF
jitvarpatil
left a comment
There was a problem hiding this comment.
🤖 Review Buddy (review-docs-pr)
Recommendation: approve. Automated review; the final decision stays with a maintainer.
Reviewed head: 1c65e1a3b536fc78b34b9d6620dda12da8a28cf9
TL;DR
This PR adds a new page, ui-kit/react-native/offline-support.mdx. It also adds short offline notes to 13 React Native UI Kit pages and changes the stated offline minimum from 4.2.0 to 4.2.1 on 10 React Native SDK pages. No files are moved or deleted, so it creates no 404 risk. The structural checks are clean: every nav entry resolves, so the build is safe, no redirects are needed, and no changed page has a broken link. I compared the API claims with the published @cometchat/chat-uikit-react-native@5.6.0 tarball, and everything I checked matches. I found no P0 or P1 issues, only two small P2 items.
P0: none
P1: none
P2 / nits
ui-kit/react-native/expo-integration.mdx:213-219: a required step sits inside an optional callout. ThecompileSdkVersion35<Warning>applies to every Android app on 5.6.0, but it is nested inside the<Note>titled "Optional: offline support." Readers who don't use offline will skip that note, and their Android build will fail onandroidx.media31.8.0. The CLI guide gets this right: it puts the same warning on its own in the setup steps (react-native-cli-integration.mdx:118-120). Move the Expo warning out of the note and up to Configure app.json (line 105). It would also help to show theexpo-build-propertiessnippet ("android": { "compileSdkVersion": 35 }) instead of only naming the plugin.- The PR description doesn't match the diff (not a docs defect). The 24 Nov update says the group-call refusal sentences were removed. They are gone from
offline-support.mdx, butcall-buttons.mdx:78/:99-101andevents.mdx:112still documentccCallFailed→{ error }withERROR_NO_INTERNETfor an offline group call. That text is correct: it is in 5.6.0 atsrc/calls/CometChatCallButtons/CometChatCallButtons.tsx:154. Please update the description so reviewers don't think those lines were left in by mistake.
Checked against the published UI Kit 5.6.0 and Chat SDK 4.2.1
UIKitSettings()passesofflinethrough, so thenew UIKitSettings({ …, offline })example inmethods.mdxworks.initFromSettings(settings, offline?)matches the signature inCometChatUIKit.ts:114.- All 23
OFFLINE_*keys inlocalize.mdxand in the offline page's table exist in every locale file. OfflineMessageEvents.ccMessageSendStateChanged/ccOfflineCacheReset,MessageSendState,MessageSendStateChangedEvent,OfflineCacheResetEventandUIKitOfflineSettingsare all exported from the package root.messageListStyles.offlineStylesexists (theme/type.ts:545), along with all 7 sub-style names,hideOfflineNoticeson Conversations and Message List,ERROR_OFFLINE_MESSAGE_DISCARDED/DISCARDED, and thecc-composer-inputtestID.android/build.gradle:76-79sets media3 1.8.0 and honours theRNVideo_media3Versionoverride. This matches the compileSdk 35 guidance.- Chat SDK 4.2.1 is on npm, and
@op-engineering/op-sqliteis an optional peer of it. The "9.0.0+" floor matchessdk/react-native/offline-enable.mdx. - The old 4.2.0 minimum doesn't appear anywhere in the changed pages, so no version references disagree.
- The new page has no TODO/FIXME/placeholder text and no images, so there is nothing that could be a broken image.
What passed (deterministic, analyze_docs_pr.py --scope ui-kit/react-native/ and --scope sdk/react-native/)
- Nav refs: 0 unresolved. The build is safe.
- Removed or renamed URLs: 0, so no redirects are needed. Redirect delta is +0, which is correct.
- Chained 404s: 0.
- Broken links in changed pages: 0. The scan found 3 broken links in other React Native SDK pages:
message-structure-and-hierarchy.mdx→/direct-calland/default-call, andauthentication-overview.mdx→/login-listener. Those pages aren't in this PR, so those links were already broken before it. - Orphans:
llms-react-native-v5andllms-react-native-v4are not in nav, which is intentional and also true onmain.
Skipped
- No build gate for docs. I didn't run
mint dev/mint broken-linkslocally; the Mintlify preview deployment reports 🟢 Ready. - Runtime behaviour (queueing, the order of reset notices, the iOS file preview) isn't something I could test here. I checked it against the source code only.
jitvarpatil
left a comment
There was a problem hiding this comment.
✅ Approved via Review Buddy after an automated review (P0: 0 · P1: 0 · P2: 2).
Findings: #610 (review)
…l offline note Review feedback on #610. The compileSdkVersion 35 requirement applies to every Android app on UI Kit 5.6.0, whether or not offline support is on, because the Android module plays voice notes with androidx.media3 1.8.0. It was nested inside the <Note> titled "Optional: offline support", so a reader who does not use offline skips it and the Android build fails. It now sits on its own in Configure app.json, as the CLI guide already does, with the expo-build-properties snippet spelled out instead of only naming the plugin. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF
|
Both P2 findings addressed in P2-1 The P2-2 Description updated. To be explicit: the group-call refusal sentences were removed from Checks: 🤖 Generated with Claude Code |
jitvarpatil
left a comment
There was a problem hiding this comment.
🤖 Review Buddy (review-docs-pr)
Recommendation: approve. Automated review; the final decision stays with a maintainer.
Re-review at c2f77f97 (previous Review Buddy pass was on 1c65e1a3).
TL;DR. This PR is safe to merge. It is additive (26 files changed, 0 removed, 0 renamed), so no URL can 404 and no redirect is needed. All navigation refs resolve, so the Mintlify build is safe. There are no broken internal links in the 68 scanned files. Both P2s from the last pass are fixed: the compileSdkVersion 35 warning now sits under Configure app.json in expo-integration.mdx, and the description now explains why call-buttons.mdx and events.mdx keep the ERROR_NO_INTERNET group-call behaviour. I spot-checked the documented API against the v5.6.0 tag of uikit-react-native and it matches. Two small P2 nits remain. Neither blocks the merge.
P0
None.
P1
None.
P2
ui-kit/react-native/expo-integration.mdx:154: the media3 pin afterexpo prebuildwon't last. The sentence "pin an older media3 release withRNVideo_media3Version = "1.4.1"afterexpo prebuild" relies on a hand edit to the generatedandroid/build.gradle. Expo regeneratesandroid/onexpo prebuild --clean, and EAS does the same for apps that don't commitandroid/, so the pin is lost without warning and the build fails again on compileSdk 34. Suggested fix: say that the edit must be redone after every clean prebuild, or recommend only theexpo-build-propertiesroute on Expo. Also, the snippet just above it (:137-151) is a completeapp.json, while the Configure app.json block earlier on the page already has anexpoobject. Add "merge this into your existingpluginsarray" so readers don't paste in a secondexporoot.ui-kit/react-native/offline-support.mdx:416: "the cache rebuilt" is not a notice the page defines.hideOfflineNoticesis described as hiding notices that include "the cache rebuilt or unsent messages lost". However, the Offline States and Texts table, and the 23OFFLINE_*keys inv5.6.0(en/translation.json), contain no "cache rebuilt" text. A reset shows only theOFFLINE_UNSENT_MESSAGES_LOST_*/_MAYBE_LOSTnotices. Suggested wording: "and the notices after a cache reset lost unsent messages". That stops readers from looking for a text they can't find or override.
What was checked and passed
- Redirects: 0 removed or renamed files, so no 404s. 0 chained redirects. The redirect count is unchanged at 927.
- Build: 0 unresolved
docs.jsonnav refs.ui-kit/react-native/offline-supportis added to RN v5 → Features → Chat. - Links: 0 broken internal links across 68 files in
ui-kit/react-native/. - Orphans: 1 (
/ui-kit/react-native/llms-react-native-v5). It is also an orphan onmain, so this PR didn't introduce it. - Version consistency: every RN SDK offline page and RN UI Kit page now says Chat SDK 4.2.1 and UI Kit 5.6.0. No 4.2.0 offline minimum is left in the touched areas.
- Checked against
uikit-react-native@v5.6.0:hideOfflineNoticesexists onCometChatConversationsandCometChatMessageList.OfflineMessageEvents,MessageSendStateChangedEvent,OfflineCacheResetEventandUIKitOfflineSettingsare all exported fromsrc/index.ts.- All 7
offlineStyleskeys are intheme/type.tswith the documented types. - All 23
OFFLINE_*keys are present in each of the 18 locales. They matchlocalize.mdxand the table on the offline page exactly. - The
RNVideo_media3Versionext key and the 1.8.0 default are read bypackages/ChatUiKit/android/build.gradle:78.
- Content: no TODOs or placeholders, and no image refs to resolve. The
{count}placeholders are escaped for MDX. The TS and JS tabs match each other. - Build gate: not applicable to a docs PR. The Mintlify preview deployment is 🟢 Ready.
jitvarpatil
left a comment
There was a problem hiding this comment.
✅ Approved via Review Buddy after an automated review (P0: 0 · P1: 0 · P2: 2).
Findings: #610 (review)
Update 24 Nov (second review follow-up,
c2f77f97)Applied the findings from the automated review on this PR. No P0 or P1 was raised.
P2
ui-kit/react-native/expo-integration.mdx: thecompileSdkVersion35 warning was nested inside the<Note>titled "Optional: offline support", but it applies to every Android app on UI Kit 5.6.0 whether or not offline support is on — the Android module plays voice notes withandroidx.media31.8.0. A reader who skipped the optional note hit an Android build failure. It now sits on its own under Configure app.json, asreact-native-cli-integration.mdxalready does, with theexpo-build-propertiessnippet spelled out instead of only naming the plugin.Clarifying the 24 Nov note below, which the review flagged as not matching the diff: "Removed the group-call refusal sentences" applies to
offline-support.mdxonly.call-buttons.mdx:78/:99-101andevents.mdx:112still documentccCallFailed→{ error }withERROR_NO_INTERNETfor an offline group call, and that is kept on purpose — it is the real behaviour of the published 5.6.0 (src/calls/CometChatCallButtons/CometChatCallButtons.tsx:154). Only the main offline guide dropped the comparison with Android and Flutter.Update 24 Nov (review follow-up)
main(ec1e3dfe) by merging it in, not rebasing, so the signed history is kept.ERROR_PENDING_QUEUE_LIMITonsdk/react-native/offline-send.mdxandoffline-reference.mdxis correct (PENDING_QUEUE_LIMITis present in the 4.2.1 bundle), andQUEUE_FULLis used only as aMessageFailureReason. No change needed.Resolved from "Needs confirmation": React Native UI Kit 5.6.0 and React Native Chat SDK 4.2.1 are released.
Checks:
analyze_docs_pr.py --pr 610 --scope ui-kit/react-native/— 0 missing redirects, 0 chained 404s, 0 unresolved nav refs (no build break), 0 broken internal links in 68 scanned files; the 1 orphan is onmaintoo.Update (ENG-57592): review against the final 5.6.0 code, plus offline coverage across the RN v5 pages
The new page was re-checked claim by claim against the final 5.6.0 UI Kit code and the Chat SDK release it pairs with. What was wrong is fixed below, and the other React Native v5 pages now mention offline where it matters. Still draft.
Corrections to
offline-support.mdxCometChatUIKit.send*promises. Rewritten from the code paths:ERROR_PENDING_QUEUE_LIMIT/QUEUE_FULL.DISCARDED. The UI Kit side effects and the composeronErrorbehaviour are spelled out.ERROR_OFFLINE_MESSAGE_DISCARDED, as does a reset whose loss the SDK cannot count.onError.hideOfflineNotices. It hides all one-line offline notices, including "Sending… try again in a moment", "File too large to send offline" and "Available when online".hideError. It also hides the "Connect to load …" state, on the lists that take the prop.cc-composer-inputtestID is new; the send button's ID already existed.{count}placeholders in tables so MDX doesn't evaluate them.Offline added to other RN v5 pages
methods.mdx:offlinerow in the UIKitSettings table, plus an "Init with offline support" example.send*promises behave offline.react-native-cli-integration.mdx,expo-integration.mdx: a short note covering the requirements, op-sqlite, the native rebuild and a link.overview.mdx: an Offline Support card.conversations.mdx,message-list.mdx: thehideOfflineNoticesprop and a behaviour note.message-composer.mdx,compact-message-composer.mdx,threaded-messages-header.mdx: short notes and a link.events.mdx:OfflineMessageEvents.ccMessageSendStateChangedandccOfflineCacheReset.localize.mdx: the 23 offline string keys with their English texts. They are present in all 18 languages.core-features.mdx: the composer row now says tray files picked offline are not queued.Review round 1
offline-support.mdx(Attachments and media): dropped the claim that a file sent withenableMultipleAttachments={false}is queued, so the page no longer promises queueing for media picked offline. The voice-note sentence stays, and the section now matches the "Works offline" list.Review round 2
offline-support.mdx(Logout and user switch): the link to thesend*promises heading now uses the id Mintlify renders,#cometchatuikit-send-promises. It pointed to#cometchatuikitsend-promises, which doesn't exist. The anchor check now uses the same slug rule.Checks
docs.jsonparses; everyui-kit/react-native/*nav entry has a file#anchorlink on the lines this PR adds resolves to a heading id, using the id Mintlify renders (.becomes-)mint broken-linksdesign-system.mdx,llms-index.mdx→/llms.txt,/llms-full.txt); none addedWhat's added (original description)
ui-kit/react-native/offline-support.mdx("Offline Support"), covering:UIKitSettings.offline,initFromSettings, andCometChat.isOfflineEnabled().onErrormatrix, thesend*promise contract, andOfflineMessageEvents.hideOfflineNotices, custom views,messageListStyles.offlineStyles, and translations.core-features.mdx: a short "Offline Support" section with a component table and a link to the new page.docs.json, RN v5 → Features → Chat, right aftercore-features.llms-react-native-v5.mdx: the new page is listed under Core & configuration.Links go to the merged RN SDK pages (
sdk/react-native/offline-*); SDK content is not repeated here.Needs confirmation
*, offline support is feature-detected at runtime, and the example app uses^4.2.0. The release that carries the latest offline fixes is newer, and the requirements section recommends the latest SDK. Should the minimum be raised to that release's version number?Agent-built with Claude Code (pipeline developer step); review by a docs code owner required.
🤖 Generated with Claude Code