Skip to content

docs(react-native): Offline Support for the React Native UI Kit - #610

Draft
raj-dubey1 wants to merge 13 commits into
mainfrom
docs/uikit-offline-react-native
Draft

raj-dubey1 wants to merge 13 commits into
mainfrom
docs/uikit-offline-react-native

Conversation

@raj-dubey1

@raj-dubey1 raj-dubey1 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Queued messages. Files picked into the composer tray are not queued offline: they upload when picked, and a failed upload is retried from the tile. Text, custom messages, voice notes and already-uploaded media are queued; the page makes no queueing promise for files picked offline. (The page said "text, media and custom messages".)
  • Logout and cache. Logout and a user switch delete the user's cache; a restart with the same user keeps it. (The page said logging in again as the same user keeps it.)
  • CometChatUIKit.send* promises. Rewritten from the code paths:
    • A refused send rejects with the SDK's error, for example ERROR_PENDING_QUEUE_LIMIT / QUEUE_FULL.
    • A queued message that is later dropped (the user deletes it, an outbox overflow evicts it, its conversation is removed, or a cache reset the SDK can count loses it) rejects with DISCARDED. The UI Kit side effects and the composer onError behaviour are spelled out.
    • Logout and user switch reject quietly with ERROR_OFFLINE_MESSAGE_DISCARDED, as does a reset whose loss the SDK cannot count.
    • The sample treats both codes as "never sent, nothing to show".
  • New behaviour now documented:
    • Retry on a message the SDK no longer holds removes the row.
    • A failed edit goes to the composer's onError.
    • Download and Share copy local files only from the SDK's offline media folder.
    • The thread header counts a queued reply once.
  • 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.
  • Testing ID. Only the cc-composer-input testID is new; the send button's ID already existed.
  • Placeholders. Escaped the {count} placeholders in tables so MDX doesn't evaluate them.

Offline added to other RN v5 pages

  • methods.mdx:
    • The offline row in the UIKitSettings table, plus an "Init with offline support" example.
    • A quick-reference row.
    • A logout note: logout clears the offline cache.
    • A note on how 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: the hideOfflineNotices prop and a behaviour note.
  • message-composer.mdx, compact-message-composer.mdx, threaded-messages-header.mdx: short notes and a link.
  • events.mdx: OfflineMessageEvents.ccMessageSendStateChanged and ccOfflineCacheReset.
  • 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 with enableMultipleAttachments={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 the send* 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

Check Result
docs.json parses; every ui-kit/react-native/* nav entry has a file pass (0 missing)
Every #anchor link on the lines this PR adds resolves to a heading id, using the id Mintlify renders (. becomes -) pass (21 anchors, 0 broken; round 2 fixed one)
mint broken-links 3 broken links, all pre-existing and outside this PR (design-system.mdx, llms-index.mdx → /llms.txt, /llms-full.txt); none added
No RN v5 page contradicts the offline page (version strings, old claims) pass

What's added (original description)

  • New page ui-kit/react-native/offline-support.mdx ("Offline Support"), covering:
    • Requirements: the native peers, the native rebuild, Android compileSdk/media3, and Expo.
    • Enable: UIKitSettings.offline, initFromSettings, and CometChat.isOfflineEnabled().
    • Per-component offline behavior: lists, search, message list and threads, sending, media, edits/deletes/reactions, presence, Pinned/Saved/Reactions/Notifications, and logout.
    • A table of the offline texts with their localization keys.
    • Errors and callbacks: the onError matrix, the send* promise contract, and OfflineMessageEvents.
    • Customization: hideOfflineNotices, custom views, messageListStyles.offlineStyles, and translations.
    • Behavior with offline turned off, limitations and known issues, and next steps.
  • core-features.mdx: a short "Offline Support" section with a component table and a link to the new page.
  • Nav: docs.json, RN v5 → Features → Chat, right after core-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

  • Minimum Chat SDK version. The pages say Chat SDK 4.2.0 or later, because that is what the UI Kit declares: the peer is *, 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?
  • Release versions. Please confirm UI Kit 5.6.0 is the final version.
  • Kit release notes. The UI Kit's draft release notes say "the kit adds no native code" and that a failed edit "keeps its text in edit mode". Both contradict the code: 5.6.0 adds native file-copy code, and a failed edit clears the composer. The docs follow the code.
  • Android file-open known issue. The page keeps "may not open" for a file the SDK cached but the kit never downloaded. Please confirm it still holds.

Agent-built with Claude Code (pipeline developer step); review by a docs code owner required.

🤖 Generated with Claude Code

@mintlify

mintlify Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

Project Status Preview Updated
cometchat 🟢 Ready View Preview Nov 19, 2026, 2:02 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

raj-dubey1 and others added 9 commits November 19, 2026 17:07
- 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>

This branch was successfully deployed

1 active deployment
staging — 66bc2d39 Deployed Nov 19, 2026 by mintlify[bot]
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