Skip to content

docs(ui-kit): fix the offline keyword-search claim on all six kits, plus mentions and four Angular inaccuracies - #638

Open
raj-dubey1 wants to merge 4 commits into
mainfrom
docs/uikit-offline-common-fixes
Open

raj-dubey1 wants to merge 4 commits into
mainfrom
docs/uikit-offline-common-fixes

Conversation

@raj-dubey1

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

Copy link
Copy Markdown
Contributor

What this fixes

Two passes over the six UI Kit offline-support pages.

1. The offline keyword-search claim — all six pages

Every page described a keyword search as something the saved data can answer. It cannot: searchKeyword is permanently excluded from the cache-eligible filter set on every platform, so a keyword is never matched against the saved data and an offline keyword search finds nothing, however much the device has saved.

  • JS — FilterCapability.ts:37-53,71-84 (MESSAGE_CACHE_SUPPORTED / CONVERSATION_CACHE_SUPPORTED)
  • RN — FilterCapability.ts:35,131 ("searchKeyword remains excluded")
  • iOS — Offline/Filter/FilterCapabilityGate.swift
  • Users — UsersRequest.ts:423 cacheable: !this.searchKeyword && !this.status

Flutter :134 and React Native :219 said the opposite outright ("A keyword search offline shows the saved matches"). The other four hedged it as "with no saved match", which reads as if a saved match were possible.

The condition for Connect to search is also corrected: it is nothing already on screen, not no saved match. A new keyword search replaces what the list was showing, so rows from an earlier query never stand in for a search that could not run; rows stay when paging further into results already on screen.

Filter-only wording is deliberately left as "offline with nothing saved" — filter-only lists are cache-served, so that sentence is correct.

2. Mention suggestions — React, Angular, React Native, iOS

None of the four said anything about mention suggestions. A name typed after the @ is a server-only search on every platform, so offline the popup shows nothing and reports nothing. Now documented, matching Android :151 and Flutter :138, which already said so. Verified per kit:

  • React — CometChatMessageComposerMentionsList.tsx:252-262
  • Angular — services/message-composer.mentions.offline.spec.ts:43-78
  • React Native — CometChatMentionsFormatter.tsx:398-400
  • iOS — CometChatMentionsFormatter.swift:145-148, :221-223

3. Four Angular-only inaccuracies

  • Encryption stated as fact (:453). encryption is opt-in and off by default — chat-sdk-javascript src/lib/offline/OfflineConfig.ts:115 (encryption: false, // opt-in), :231. The bullet now says so, and keeps the scope caveat (message content yes, lookup metadata no, downloaded media never).
  • The (error) table was incomplete. hideError also stops the (error) emit for a failed list load on Conversations (cometchat-conversations.component.ts:215) and the Message List (cometchat-message-list.helper-utils.ts:109-115), but not on Users (:171), Groups (:158) or Group Members (:175), which emit unconditionally and only hide the view. All five also fall back to the global configuration's hideError, so it can be on without the component input being set. Added as a note under the table.
  • A dangling pointer (:135). The Threads bullet sent readers to #limitations "for what is saved for threads"; that section has no thread bullet. Pointer dropped.
  • A missing string (:200). message_list_option_delete_failed ("Couldn't remove the message", shown as an error toast by cometchat-message-list.offline-actions.ts:87) was the only offline localization key absent from the texts table. All 24 keys in translation.json are now listed.

Verification

docs-linkcheck --base origin/main . → PASS (6 changed pages, 83 incoming anchor links, 64 anchors checked).

The one pre-existing WARN is now fixed: ui-kit/angular/components/cometchat-message-list.mdx:596 links to /ui-kit/angular/offline-support#your-own-connect-to-load-more-control, but the heading ### Your own "Connect to load more" control rendered its quotes as smart quotes, making the real id your-own-“connect-to-load-more”-control. The heading no longer carries quotes, so it matches the link that already existed. docs-linkcheck --base origin/main . → PASS, 0 warnings.

Not in this PR

Other gaps found in the same audit that are missing on some pages rather than all six — offline app start, the unsent-message row in the conversation list, retry-all, the hideError divergence in the iOS kit's own code — are listed separately and need a decision before they are written.

Round 2 (commit ab23995)

Re-verified every claim in this PR against the kit head each page documents, not a local
checkout — three of the branches I first read were stale, which is how the error below got in.

Fixed: the rows-stay sentence this PR had added to all six pages said the opposite of
what the kits do. A keyword has no cache, so the rows of an earlier query are not the answer
to a search that could not run, and every kit clears them:

Kit Head verified Evidence
React 7.3.0 temp-release-offline-v7 @ 9e6b4060 useCometChatUsers.ts:313 → :261/:274 dispatch({type:'RESET'})
Angular 5.3.0 feature/offline-messaging @ c670c62a search-messages.service.ts:99; users.service.ts:143
React Native 5.6.0 temp-release-offline-support @ 8e35f9eb CometChatList.tsx:756-759 publish([]) (AC-10.2)
iOS temp-release-offline-v5 @ f047e645 UsersViewModel.swift:212,217
Android chore/offline-ga-final-android @ 68e36d6c CometChatUsersViewModel.kt:462-466 (BEH-SNAP-04)
Flutter chore/offline-ga-final-flutter @ e08edfbc users_bloc.dart:783 → :568 → :620

Also: React still stated encryption as active (the same line this PR fixed on Angular :459);
Android was the only page without the mentions outcome; and the Angular "Connect to load more"
heading is de-quoted so the existing link to it resolves.

Withdrawn after re-verifying — these were reported against stale branches and are correct
as written on the current heads: the Angular mentions sentence (the composer's "Connect to
search" mentions notice is gone; message-composer.service.ts:103-116 returns an empty list
with no error), the "nothing already on screen" precondition (search-messages.service.ts:148
const connectToSearch = this.keywordSearch && !rowsShown;), and the Angular localization rows
(search_connect_to_search_messages and list_connect_to_search_subtitle both exist at
en-us/translation.json:939,944 and are rendered).


🤖 Generated with Claude Code

https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF

…Kit pages

Every UI Kit offline-support page said a keyword search offline depends on
whether there is a "saved match". There is no such thing: `searchKeyword` is
permanently excluded from the cache-eligible filter set on every platform, so a
keyword search is never served from the saved data at all. The Flutter and React
Native pages stated the opposite outright ("A keyword search offline shows the
saved matches").

The condition behind the **Connect to search** state is "nothing already on
screen", not "no saved match" — so in a list that is already showing cached
rows, a keyword typed while offline leaves those (non-matching) rows in place
and no offline state appears.

Verified in source:
- chat-sdk-javascript  src/lib/offline/read/FilterCapability.ts:37-53,71-84
  (searchKeyword excluded from MESSAGE_/CONVERSATION_CACHE_SUPPORTED),
  src/lib/UsersRequest.ts:423 `cacheable: !this.searchKeyword && !this.status`
- chat-sdk-react-native src/lib/offline/read/FilterCapability.ts:35,131
  ("searchKeyword remains excluded - never cached, empty offline")
- chat-sdk-ios-src CometChatSDK/CometChatSDK/Offline/Filter/FilterCapabilityGate.swift

The filter-only wording is left as it was: a list opened with filters and no
keyword IS served from the cache, so "offline with nothing saved" is correct
there, and the two cases now read as the distinct things they are.

The SDK pages were already correct (sdk/javascript/offline-cached-data.mdx:295,
sdk/javascript/offline-reference.mdx:174-177) and are untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF
@mintlify

mintlify Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

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

Project Status Preview Updated
cometchat 🟢 Ready View Preview Nov 27, 2026, 10:22 AM

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

…naccuracies

Mentions (React, Angular, React Native, iOS): the offline pages said nothing
about mention suggestions. A keyword typed after the `@` is a server-only
search on every platform, so offline the popup shows nothing and reports
nothing. Matches Android `:151` and Flutter `:138`, which already say so.
Verified in each kit:
  React   CometChatMessageComposerMentionsList.tsx:252-262
  Angular services/message-composer.mentions.offline.spec.ts:43-78
  RN      CometChatMentionsFormatter.tsx:398-400
  iOS     CometChatMentionsFormatter.swift:145-148, :221-223

Angular only:
- Encryption was stated as fact. `encryption` is opt-in and off by default
  (chat-sdk-javascript src/lib/offline/OfflineConfig.ts:115, :231).
- The `(error)` table did not mention that `hideError` also stops the emit on
  Conversations (cometchat-conversations.component.ts:215) and the Message List
  (cometchat-message-list.helper-utils.ts:109-115) — but not on Users (:171),
  Groups (:158) or Group Members (:175) — and that all five fall back to the
  global configuration.
- The Threads bullet pointed at #limitations "for what is saved for threads";
  that section has no thread bullet. Pointer dropped.
- `message_list_option_delete_failed` ("Couldn't remove the message", shown by
  cometchat-message-list.offline-actions.ts:87) was the only offline string
  missing from the texts table.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF
@raj-dubey1 raj-dubey1 changed the title docs(ui-kit): correct the offline keyword-search claim on all six UI Kit pages docs(ui-kit): fix the offline keyword-search claim on all six kits, plus mentions and four Angular inaccuracies Nov 25, 2026
The previous commit added "Rows already on screen stay, so a keyword typed
over a list that is already showing rows leaves those rows in place." to all
six offline-support pages. That is the opposite of what every kit does: a new
keyword search replaces what the list was showing, because a keyword has no
cache and the rows of an earlier query are not its answer. Rows do stay when
paging further into results already on screen, which is the rule the kits
actually implement. Verified against the head each page documents:

- React 7.3.0    temp-release-offline-v7 @ 9e6b4060
                 useCometChatUsers.ts:313 -> :261/:274 dispatch RESET
- Angular 5.3.0  feature/offline-messaging @ c670c62a
                 search-messages.service.ts:99; users.service.ts:143
- RN 5.6.0       temp-release-offline-support @ 8e35f9eb
                 CometChatList.tsx:756-759 publish([]) (AC-10.2)
- iOS            temp-release-offline-v5 @ f047e645
                 UsersViewModel.swift:212,217
- Android        chore/offline-ga-final-android @ 68e36d6c
                 CometChatUsersViewModel.kt:462-466 (BEH-SNAP-04)
- Flutter        chore/offline-ga-final-flutter @ e08edfbc
                 users_bloc.dart:783 -> :568 -> :620

Also in this commit:

- React: encryption was still stated as active, the same inaccuracy this PR
  fixed on Angular :459. chat-sdk-javascript feat/offline-support-release @
  35351376 OfflineConfig.ts:115 `encryption: false, // opt-in`, :194.
- Android: the only page without the mentions outcome. Completed to match the
  other five. CometChatMentionsFormatter.kt:313-318 ("Offline with a keyword
  lands here too: an empty list, never an error toast.").
- Angular: dropped the quotes from the "Connect to load more" heading. Mintlify
  renders them as smart quotes, so the real id was
  your-own-"connect-to-load-more"-control and the link from
  components/cometchat-message-list.mdx:596 404'd. Confirmed with mint dev via
  docs-linkcheck; the heading now matches the link that already existed.

docs-linkcheck --base origin/main . -> PASS, 0 warnings (was 1).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF
@raj-dubey1

Copy link
Copy Markdown
Contributor Author

Docs review — offline-support, all six kits

Reviewed at head ab23995f (base main). Re-verified every line below against the files at that SHA, so the third commit's rewording is accounted for. Two items need fixing before merge; the rest is clean.

The PR's central thesis checks out at source on all six kits — searchKeyword is in neither supported list in FilterCapability.ts:37-85 ("EXCLUDED — empty offline"), and the lists really are cleared as the search starts: Angular search-messages.service.ts:99 / users.service.ts:143, React useCometChatUsers.ts:261, RN CometChatList.tsx:757 publish([]), iOS UsersViewModel.swift:212,217, Android CometChatUsersViewModel.kt:465, Flutter users_bloc.dart:783. Paging-keeps-rows confirmed on Angular, RN and Android.


1. ui-kit/ios/offline-support.mdx:141 — the claim this PR removes everywhere else survives on iOS

CometChatSearch shows Connect to search when a keyword search can't connect, … Results already on screen stay.

Wrong at source. In SearchViewModel.swift, startSearch clears both lists before the request goes out — filteredMessages.removeAll() (:123, unconditional) and filteredConversations.removeAll() (:164, under OfflineGate.isOn()), whose own comment reads "no row of an older search stands in for a search that could not run (Android clears its lists as the search starts)." offlineOutcome() then computes nothingShown from those emptied lists.

It also sits two lines below the sentence this PR added at :139 ("rows from an earlier query never stand in for a search that could not run"), so the section now argues with itself. The sibling pages' equivalent sentences were updated here — Android :147 and RN :223 both became "nothing already on screen". iOS was missed.

Fix:

- Results already on screen stay.
+ A new keyword search replaces what was showing, so results from an earlier query never stand in for a search that could not run.

Scope: the sentence itself is a context line, not an added one, so under the convergence rule it doesn't mechanically block. Raising it in scope anyway because it's the PR's own declared fix left incomplete, in a file the PR already edits, one line from a line it changed.

2. All six pages — the behaviour table now contradicts the new Search prose

Each page still carries an unqualified entry:

Page Line Entry
android 226 **Rows on screen, no connection:** the rows stay. No error view, no onError.
angular 228 | Rows on screen, offline | Rows stay | Does not fire |
flutter 229 | Offline, rows on screen, a load fails | The rows stay | Not called |
ios 214 **Rows on screen, no connection:** the rows stay. No error view, no onError.
react-native 316 | Offline, rows on screen, a load fails | The rows stay | Not called |
react 112 | Rows are on screen, offline | The rows stay. No error view. | Not called |

A new keyword search typed while rows are showing is exactly this case, and the rows do not stay. The keyword entry in the same table was reworded to "nothing on screen" — but that's the result of the clear, not a condition a reader can evaluate before it happens, so a reader consulting the table alone lands on the wrong row and gets the wrong answer.

This one is genuinely introduced by this PR: the new prose is what creates the conflict.

Fix: one clause per page, e.g. the rows stay (except a new keyword search, which replaces them).


Worth a look (P2, non-blocking)

  • ui-kit/angular/offline-support.mdx:234 — the new <Note> says hideError "also stops (error) for a failed list load" on both Conversations and the Message List. The Message List gates every emit (handleServiceErrorImpl). Conversations gates only the nothing-on-screen path (cometchat-conversations.component.ts:215); a failed list load with rows on screen still fires, via keptRowsError$ → component :218, which has no hideError check (conversations.service.ts:429). "nothing shows and nothing fires" reads as restricted to the nothing-on-screen case, so it's ambiguous rather than flatly wrong — but the two components do diverge on that row and the Note lumps them. One clause would settle it.
  • ui-kit/react/offline-support.mdx:128-131 — the new paragraph replaced the lead-in "The Search component needs a connection for keyword search:", so three bullets now dangle after a paragraph that doesn't introduce them, and bullet 1 restates the paragraph.
  • Cross-kit consistency — only Flutter lists the mention-suggestion limitation in its summary sections (:47, :372). The other five document it only in the Search section, so it's absent from the "Needs a connection" and "Limitations" lists a reader skims. Given that cross-kit parity of these six pages is this PR's purpose, worth evening up.

Pre-existing, not touched by this PR (non-blocking — recommend a ticket)

The filter-only wording is wrong for the presence filter, on 5 of 6 pages. Android :141, Angular :118, iOS :134, RN :221 and React :120 all give online users as a filter-only example and say "offline with nothing saved" shows Connect to load … — implying rows appear when something is saved.

But status is excluded from the cache alongside searchKeyword: chat-sdk-javascript/src/lib/UsersRequest.ts:423 is cacheable: !this.searchKeyword && !this.status, and :389 states "searchKeyword and the presence status filter are EXCLUDED (§6.2)." So an online-users list shows Connect to load users offline however much is saved — the same shape of error this PR fixes for keywords.

This matters because the PR description explicitly declines it: "Filter-only wording is deliberately left as 'offline with nothing saved' — filter-only lists are cache-served, so that sentence is correct." That justification doesn't hold for the presence filter. (Verified on the JS SDK, which covers React and Angular. Android's CometChatUsersViewModel.kt:462 comment — "a presence filter alone is the list" — confirms the not-a-search classification, but status cache-eligibility is unverified in the Android, iOS and Flutter SDKs. Tags and keyword-less builders are fine.)


What passed (actually checked)

  • Build is safe: 0 unresolved pages refs in docs.json.
  • No 404 risk: 0 removed, 0 renamed files → 0 missing redirects; redirects correctly unchanged at 927.
  • 0 chained 404s; 0 broken internal links across 524 in-scope files.
  • docs-linkcheck --base origin/main . → PASS, reproduced independently: 6 changed pages, 83 incoming anchor links, 64 anchors checked — matching the PR body exactly.
  • The anchor fix works: ### Your own Connect to load more control yields #your-own-connect-to-load-more-control, and the sole inbound reference (ui-kit/angular/components/cometchat-message-list.mdx:596) now resolves. The pre-existing smart-quote WARN is gone, with no other reference to the old id.
  • 17 orphans, all pre-existing (llms-*.mdx autogen pages, ui-kit/kotlin/** legacy trees) — none touched here.
  • All four Angular fixes verified: encryption opt-in (OfflineConfig.ts:115 encryption: false, :231); the hideError divergence (gated on Conversations :215 and Message List handleServiceErrorImpl, unconditional on Users :171 / Groups :158 / Group Members :175; all five fall back to globalConfig.hideError); the dropped #limitations pointer (gone, and no other page has it); message_list_option_delete_failed exists (translation.json:937, toast at offline-actions.ts:87). The texts table is now exactly the 24 offline keys in translation.json — counted both.
  • Mentions claim verified: Angular message-composer.service.ts:103-116 returns of([]) without handleError when offline + not-connected + non-empty search text. All six pages now carry the outcome consistently.
  • No placeholders/TODOs, no version or package drift, no image changes.

Verdict: changes requested — items 1 and 2. Nothing else blocks.

…radiction

Review of #638 found the PR's own declared fix left incomplete in two places.

1. ios/offline-support.mdx:141 still said "Results already on screen stay"
   for CometChatSearch, two lines under the sentence this PR added at :139
   saying the opposite. Wrong at source: SearchViewModel.startSearch clears
   filteredMessages unconditionally (:123) and filteredConversations under
   OfflineGate.isOn() (:168) before the request goes out, and offlineOutcome()
   (:411) derives nothingShown from those emptied lists.

2. The offline behaviour entry on all six kits claimed rows stay when a load
   fails, unqualified. A new keyword search offline is exactly that case and
   the rows do not stay. Verified per kit: iOS SearchViewModel.swift:123,168;
   Angular search-messages.service.ts:99; Flutter users_bloc.dart:784;
   React useCometChatUsers.ts:261; Android CometChatUsersViewModel.kt:466
   (replace && isSearch && notConnected); React Native CometChatList.tsx:757
   (notConnected && keyword && firstPage).

Also qualifies the same claim where it appears as prose rather than a table
row (android:139, ios:132, angular:111). Flutter:129 and react-native:214 are
scoped to "Online, a real error" and are left as they are.

Headings unchanged on all six pages, so anchors and redirects are unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF

This branch was successfully deployed

1 active deployment
staging — 6b41c4cf Deployed Nov 27, 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