docs(flutter): thread subscriptions, pin & save, composer trailing to… - #461
docs(flutter): thread subscriptions, pin & save, composer trailing to…#461anshuman-cometchat wants to merge 8 commits into
Conversation
…olbar actions - New SDK v5 pages: Pin Messages, Save Messages, Pin Conversations (events, fetching, feature flags, limits and cap error handling) - Thread Subscriptions section on the SDK Threaded Messages page (subscribe/unsubscribe, cached state, ThreadListener, ThreadsRequest) - UI Kit v6: trailing toolbar actions on Message Composer (richTextToolbarActions + onToolbarTap), Pin Conversations section and option visibility on Conversations, pin/save options + events on Message List, thread-subscription gate and bell on the Threaded Messages guide - Register the three new SDK pages in the Messaging nav group Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…esign Subscription state now lives on the message (threadSubscribed boolean, served on every fetch), the resolved subscribe/unsubscribe call is the acknowledgement, and replies arrive on the standard MessageListener — no ThreadListener, no getThreadSubscriptionState, no SDK-side events. Documents the two consumer rules: an un-asked false means "the server did not tell me", and a fetched false on the author's own message is an explicit unsubscribe. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The option table and example implied one flag per feature. The kit has four: the menu renders Pin or Unpin (Save or Unsave) depending on the message, and each rendered state has its own flag — message_template_utils picks hideUnpinMessageOption when the message is pinned and hidePinMessageOption when it is not. As written, hidePinMessageOption: true still left "Unpin" on the menu for already-pinned messages, which is the opposite of what the example suggests it does. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…sing New pages for CometChatPinnedMessages and CometChatSavedMessages — both are publicly exported in 6.1.1 and had no documentation at all — added to the Components nav. Also documents, against the shipped source rather than the design docs: - The five new Kit events (ccMessagePinned/Unpinned/Saved/Unsaved and ccThreadSubscriptionChanged) in events.mdx, noting they are default no-ops so existing listeners keep compiling. - CometChatMessageListController.jumpToMessage in message-list.mdx, with a warning that v5 had a different class of the same name which the upgrade guide maps to MessageListBloc. - hideThreadSubscriptionOption in the message-list option table. - The header's pinned-messages entry point and thread-subscription bell. Documented as an item in the overflow menu, which is where _overflowEntries actually puts it — the prop's own doc comment still says "pin icon in the trailing area" and is stale. - onThreadSubscriptionChange and threadSubscriptionVisibility on CometChatThreadedHeader. Every internal link resolves and docs.json still parses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The last undocumented piece of 6.1.1's public surface. It came back with the trailing-toolbar restore and is genuinely public: the controller is exported through the rich_text_toolbar barrel, which cometchat_chat_uikit re-exports. Documented where it is actually useful — a trailing toolbar action that restyles a range and should leave mentions with the styling the mentions formatter gives them. Notes that the ranges come from the attached CometChatMentionsFormatter, are sorted by start offset, and are empty when no mentions formatter is attached; the example guards the cast, since a plain TextEditingController has no such method. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…tails Checked the Flutter thread-subscription page against the SDK's combined 5.0.7 branch, where the thread work now sits alongside the notification changes. - fetchNext() takes required onSuccess/onError callbacks, matching every other request builder in the SDK. The snippet awaited a bare fetchNext(), which does not compile. - Document setUid()/setGuid() for scoping a thread list to one conversation, and note that setting both fails validation at fetch time. - Note that a ThreadsRequest is single-use, so a refresh means building a new request rather than re-running an exhausted one. - Add getMessageDetails(), which carries the subscription opt-in and is the supported way to re-read threadSubscribed for a single message — the flag is absent on socket-delivered messages. Every identifier on the page verified against lib/ on the SDK branch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Flutter tabs typed the quoted-replies preference as RepliesOptions. The Flutter SDK declares it as its own type: QuotedRepliesOptions? quotedReplies; on both GroupPreferences and OneOnOnePreferences, so the snippets did not compile. The type is deliberately separate from RepliesOptions — values 1-3 coincide, but an option is only meaningful within its own preference, and the distinct type makes a cross-assignment a compile error rather than a silently wrong setting. Fixes the two read snippets and the two constructor snippets. Only the Flutter tabs change; the JavaScript, Android and iOS tabs keep RepliesOptions, which is correct for those SDKs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Flutter SDK gained PushPlatforms.FCM_WEB ('fcm_web') for registering
an FCM token from a web build, but the push guides cover only Flutter on
Android and iOS.
Adds a note under the platform cards pointing web builds at the right
provider and the fcmToken argument, and says the dashboard setup is
unchanged from the Flutter (Android) guide. A full Flutter web walkthrough
is left for when there is a sample app to base it on — the existing
Flutter guides are walkthroughs of the UI Kit sample, which has no web
variant.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Docs review — ✅ Approve (one should-fix)Six new Flutter pages + UI Kit updates for thread subscriptions, pin/save messages, and pin conversations. Structurally clean, and every documented API verifies against the published pub.dev packages. One gap worth fixing before this ships. ✅ API verified against published packages
Structure: all 7 new pages wired into nav; 0 nav breaks, 0 orphans, 0 broken links, redirects +0; no placeholders/TODOs across 956 new lines. 🟡 Should-fix — no minimum SDK / UI Kit version stated anywhereI traced exactly when each API landed:
A developer on Suggested fix, matching the precedent from the transcription PR (#487), which added per-platform availability callouts: <Note>
**Available since v5.0.7** — pin, save, and thread subscriptions require
`cometchat_sdk` v5.0.7 or later. See [Setup](/sdk/flutter/setup) to upgrade.
</Note>…and the equivalent on the UI Kit pages for ( Content is accurate and well-structured; it just needs the version guardrail so integrators aren't debugging phantom compile errors. Approving on the assumption that lands here or in a quick follow-up. 🚀 🤖 Automated docs review (Mintlify link/redirect/nav checks + API verification against published cometchat_sdk / cometchat_chat_uikit dartdocs). |
jitvarpatil
left a comment
There was a problem hiding this comment.
Docs review — ✅ Approve (one should-fix)
Six new Flutter pages + UI Kit updates for thread subscriptions, pin/save messages, and pin conversations. Structurally clean, and every documented API verifies against the published pub.dev packages. One gap worth fixing before this ships.
✅ API verified against published packages
cometchat_sdk — all 12 documented APIs exist and are static on CometChat, matching the docs' CometChat.x() usage:
pinMessage · unpinMessage · saveMessage · unsaveMessage · pinConversation · unpinConversation · subscribeToThread · unsubscribeFromThread · isPinMessageEnabled · isPinConversationEnabled · getPinnedMessagesLimit · MessageThread / ThreadsRequest / threadSubscribed
cometchat_chat_uikit — CometChatPinnedMessages, CometChatSavedMessages, CometChatThreadedHeader + all three *Style classes, and the ccMessagePinned / ccMessageSaved events all exist.
Structure: all 7 new pages wired into nav; 0 nav breaks, 0 orphans, 0 broken links, redirects +0; no placeholders/TODOs across 956 new lines.
🟡 Should-fix — no minimum SDK / UI Kit version stated anywhere
I traced exactly when each API landed:
| Package | Feature | Present in | Absent in |
|---|---|---|---|
cometchat_sdk |
pin / save / thread APIs | 5.0.7 only | 5.0.4, 5.0.5, 5.0.6 |
cometchat_chat_uikit |
CometChatPinnedMessages / CometChatSavedMessages |
6.1.1 only | 6.0.5, 6.1.0 |
A developer on cometchat_sdk 5.0.6 or cometchat_chat_uikit 6.1.0 — both of which were the latest until very recently — will follow these pages and hit "method doesn't exist" compile errors, with nothing in the docs explaining why.
Suggested fix, matching the precedent from the transcription PR (#487), which added per-platform availability callouts:
<Note>
**Available since v5.0.7** — pin, save, and thread subscriptions require
`cometchat_sdk` v5.0.7 or later. See [Setup](/sdk/flutter/setup) to upgrade.
</Note>…and the equivalent on the UI Kit pages for cometchat_chat_uikit 6.1.1+.
(CometChatThreadedHeader is the exception — it predates 6.1.1, so the threaded-header page doesn't need the UI Kit note.)
Content is accurate and well-structured; it just needs the version guardrail so integrators aren't debugging phantom compile errors. Approving on the assumption that lands here or in a quick follow-up. 🚀
🤖 Automated docs review (Mintlify link/redirect/nav checks + API verification against published cometchat_sdk / cometchat_chat_uikit dartdocs).
Description
Adds Flutter documentation for three newly shipped feature sets across the SDK (v5) and UI Kit (v6):
SDK (v5) — new pages, registered in the Messaging nav group:
sdk/flutter/pin-messages) — pin/unpin APIs, permission model, real-timeonMessagePinned/onMessageUnpinnedevents, fetching a conversation's pinned list viaMessagesRequestBuilder, feature availability (isPinMessageEnabled()), limits and cap-error handling witherrorParams.sdk/flutter/save-messages) — private per-user bookmarks: save/unsave, own-device sync events, fetching saved messages, feature flag and limits.sdk/flutter/pin-conversations) — pin/unpin,ConversationListenerevents,app_system(admin) pins, list-ordering contract, feature flag and limits.SDK (v5) — extended:
subscribeToThread()/unsubscribeFromThread(), reading per-viewer state fromBaseMessage.threadSubscribed, re-reading it for one message withgetMessageDetails(), handling replies on the standardMessageListener, and fetching participated threads withThreadsRequest.UI Kit (v6) — extended:
richTextToolbarActionsandCometChatMessageComposerAction.onToolbarTap, including the web selection-blur caveat, plusRichTextEditingController.getMentionRanges.pinConversationOptionVisibilityproperty.UIKitSettings.enableThreadSubscriptiongate, the action-menu options, and the header notification bell.All snippets follow the existing house conventions (
<Tabs>Dart blocks, cascade builders,debugPrintcallbacks) and API names were verified against the source of both packages.Related Issue(s)
N/A — tracked internally (ENG-37600 / ENG-37601).
Type of Change
Checklist
Additional Information
docs.jsonunder SDKs → Flutter → Messaging (pin/save after Delete a Message, pin-conversations after Delete a Conversation).mint dev— all eight touched pages render.Re-verified against the combined SDK release branch
The Thread Subscriptions section was re-checked against
release-2026-v5.0.7-combined, the branch that carries the thread work together with the notification changes for the release. Two corrections came out of it:ThreadsRequest.fetchNext()takes requiredonSuccess/onErrorcallbacks, like every other request builder in the SDK. The page awaited a barefetchNext(), which does not compile. Fixed, plussetUid()/setGuid()scoping and the single-use-request contract are now documented.getMessageDetails()is documented as the supported way to re-readthreadSubscribedfor a single message, since the flag is absent on socket-delivered messages.Every
CometChat.*method, listener callback, model field and builder method on the four SDK pages was checked againstlib/on that branch.Notification changes from the same release branch
The release branch also carries the quoted-replies preference and the
FCM_WEBpush provider, so thenotifications/pages were checked against it too. Flutter tabs only — the JavaScript, Android and iOS tabs are untouched.notifications/preferences.mdx— the Flutter tabs typed the quoted-replies preference asRepliesOptions, but the Flutter SDK declaresQuotedRepliesOptions? quotedReplieson bothGroupPreferencesandOneOnOnePreferences, so those four snippets did not compile. The type is deliberately distinct: values 1-3 coincide withRepliesOptions, but keeping them separate turns a cross-assignment into a compile error rather than a silently wrong setting.notifications/push-overview.mdx— a note under the platform cards pointing Flutter web builds atPushPlatforms.FCM_WEB(fcm_web) and thefcmTokenargument. There is no Flutter web guide: the existing Flutter push pages are walkthroughs of the UI Kit sample app, which has no web variant, so a full guide is left until there is a sample to base it on.Deliberately not covered here
RepliesOptions.SUBSCRIBE_TO_SUBSCRIBED_THREADSships in the SDK as a forward-compatibility placeholder — the backend has not rolled out the value yet, so documenting it now would describe a preference users cannot set.Screenshots (if applicable)
N/A — text and code-snippet changes only.
🤖 Generated with Claude Code