Repository navigation
docs(ui-kit): fix the offline keyword-search claim on all six kits, plus mentions and four Angular inaccuracies - #638
raj-dubey1 wants to merge 4 commits into
Conversation
…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
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 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
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
Docs review — offline-support, all six kitsReviewed at head The PR's central thesis checks out at source on all six kits — 1.
|
| 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>sayshideError"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, viakeptRowsError$→ component:218, which has nohideErrorcheck (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
pagesrefs indocs.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 controlyields#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-*.mdxautogen pages,ui-kit/kotlin/**legacy trees) — none touched here. - All four Angular fixes verified: encryption opt-in (
OfflineConfig.ts:115encryption: false,:231); thehideErrordivergence (gated on Conversations:215and Message ListhandleServiceErrorImpl, unconditional on Users:171/ Groups:158/ Group Members:175; all five fall back toglobalConfig.hideError); the dropped#limitationspointer (gone, and no other page has it);message_list_option_delete_failedexists (translation.json:937, toast atoffline-actions.ts:87). The texts table is now exactly the 24 offline keys intranslation.json— counted both. - Mentions claim verified: Angular
message-composer.service.ts:103-116returnsof([])withouthandleErrorwhen 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
What this fixes
Two passes over the six UI Kit
offline-supportpages.1. The offline keyword-search claim — all six pages
Every page described a keyword search as something the saved data can answer. It cannot:
searchKeywordis 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.FilterCapability.ts:37-53,71-84(MESSAGE_CACHE_SUPPORTED/CONVERSATION_CACHE_SUPPORTED)FilterCapability.ts:35,131("searchKeyword remains excluded")Offline/Filter/FilterCapabilityGate.swiftUsersRequest.ts:423cacheable: !this.searchKeyword && !this.statusFlutter
:134and React Native:219said 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:151and Flutter:138, which already said so. Verified per kit:CometChatMessageComposerMentionsList.tsx:252-262services/message-composer.mentions.offline.spec.ts:43-78CometChatMentionsFormatter.tsx:398-400CometChatMentionsFormatter.swift:145-148, :221-2233. Four Angular-only inaccuracies
:453).encryptionis 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).(error)table was incomplete.hideErroralso 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'shideError, so it can be on without the component input being set. Added as a note under the table.:135). The Threads bullet sent readers to#limitations"for what is saved for threads"; that section has no thread bullet. Pointer dropped.:200).message_list_option_delete_failed("Couldn't remove the message", shown as an error toast bycometchat-message-list.offline-actions.ts:87) was the only offline localization key absent from the texts table. All 24 keys intranslation.jsonare 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:596links to/ui-kit/angular/offline-support#your-own-connect-to-load-more-control, but the heading### Your own "Connect to load more" controlrendered its quotes as smart quotes, making the real idyour-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
hideErrordivergence 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:
temp-release-offline-v7@9e6b4060useCometChatUsers.ts:313→:261/:274dispatch({type:'RESET'})feature/offline-messaging@c670c62asearch-messages.service.ts:99;users.service.ts:143temp-release-offline-support@8e35f9ebCometChatList.tsx:756-759publish([])(AC-10.2)temp-release-offline-v5@f047e645UsersViewModel.swift:212,217chore/offline-ga-final-android@68e36d6cCometChatUsersViewModel.kt:462-466(BEH-SNAP-04)chore/offline-ga-final-flutter@e08edfbcusers_bloc.dart:783→:568→:620Also: 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-116returns an empty listwith no error), the "nothing already on screen" precondition (
search-messages.service.ts:148const connectToSearch = this.keywordSearch && !rowsShown;), and the Angular localization rows(
search_connect_to_search_messagesandlist_connect_to_search_subtitleboth exist aten-us/translation.json:939,944and are rendered).🤖 Generated with Claude Code
https://claude.ai/code/session_01XbguTu9in5yKt5CNV4rjXF