feat(thread-sub-pin-save-toolbar-react): add documentation for thread subscription, pin/save messages, pin conversation and toolbarTrailingView prop + Custom formatter guide in react v7 uikit docs - #464
Conversation
… subscription, pin/save messages, pin conversation and toolbarTrailingView prop + Custom formatter guide in react v7 uikit docs
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
…beds and css selectors for pin-save and thread subscription feature in react v7 uikit
…op in message list, deprecation of parentMessageId, events list updates and permission error toasts for pin msg
Docs review —
|
Thread subscription - Add an "Automatic subscription" section to the threaded-messages guide: sending a message subscribes you to its thread, sending a reply subscribes you to the parent, and being @mentioned in a reply subscribes you — the trigger is always your own send, across devices, mirrored to every surface whether or not the thread panel is open. - Document useThreadSubscription's onChange argument and the read-only useThreadSubscriptionState hook. - Correct thread-header: it emits ui:thread/subscription-changed (was documented as emitting nothing). - List the subscription mirror in message-list's emitted events. Pin & save - Add a "Custom UI" section to the pin/save guide: the SDK calls and the ui: events to publish when driving pin/save from a custom UI. - Add brief permission/limit notes to the pinned-messages and saved-messages component pages. Event system - Document missing SDK-derived events: message/ai-assistant-received, conversation/pinned, conversation/unpinned.
…n of thread subscription option being available only in groups, as its now available in both
Two things in one commit: the pending working-tree expansion of these pages, and a set of corrections found by diffing every documented symbol against uikit-angular#559 and against React's docs PR #464. Corrections — the docs described an API that does not exist: - `IThreadSubscriptionChanged` was documented with `state: CometChat.ThreadSubscriptionState` (`SUBSCRIBED`/`NOT_SUBSCRIBED`/`UNKNOWN`) and a `source` string. Neither field exists, and `ThreadSubscriptionState` is nowhere in the repo. The payload is `{ parentMessageId, subscribed }`. React publishes the identical shape on `ui:thread/subscription-changed`, so this was a superseded design, never a platform difference. - `IPinSaveChanged.source` likewise does not exist; the payload is `{ message }`. - `ccConversationPinned`, `ccConversationUnpinned` and `IConversationPinChanged` do not exist. `CometChatConversationEvents` has only `ccConversationDeleted` and `ccUpdateConversation`. See the note below. - `ThreadSubscriptionService.getState()` does not exist, and `isFollowing()` / `toggle()` take the message, not a parent id, returning a boolean. The worked example passed an id to both. - The capability probe checks `subscribeToThread` and `unsubscribeFromThread` only. `getThreadSubscriptionState` was listed as a third probe and is not one. - The debounce was described backwards: docs said rapid taps collapse so the user's *last* intent reaches the server and a mid-request tap is re-armed. The service is leading-edge — the write leaves on the FIRST tap and anything within 400ms, or while in flight, is swallowed whole. A failed write clears the stamp so a deliberate retry is not swallowed. - "The service holds the unacked value as an overlay" described a mechanism that is not there. State is read off the message; toggle() publishes and each surface stamps its held copies, and a failure publishes the reverse. Additions — real API that was undocumented: - The optimistic tier, `ccMessagePinChanged` / `ccMessageSaveChanged` with `IPinChanged` / `ISaveChanged`. React documents its equivalent (`ui:message/pin-changed`, `ui:message/save-changed`) with the same payloads. - The merged observables `pinned$` / `unpinned$` / `saved$` / `unsaved$`, which pair both tiers per direction. The source says to prefer these over the raw subjects; the docs taught only the raw subjects. - The typed `on*` helpers, which take a `DestroyRef` and unsubscribe with the component — while events.mdx was telling readers to hand-manage subscriptions to avoid leaks. - `getSystemPinnedMessagesLimit()` / `getSystemPinnedConversationsLimit()`, folded into the existing system-pin paragraph rather than given a section of their own, since that paragraph already had the app-setting keys. Known gap, deliberately not papered over: React has three conversation pin events (`conversation/pinned`, `conversation/unpinned`, and optimistic `ui:conversation/pin-changed`); Angular publishes none. Conversation pinning works in the UI but emits nothing, so an integrator's own sidebar has no sync path. The false claim is removed and readers are pointed at `conversation.isPinned()` on render; the missing events are raised against #559. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018rhePm8oMBbjPeRFzN7HTg
raj-dubey1
left a comment
There was a problem hiding this comment.
Docs review — structure passes; one release-timing blocker risk
Mechanical / structural checks: all clear.
- Build is safe — 0 dangling nav refs; all 4 new pages are registered in
docs.jsonand resolve. - Redirect coverage complete — add-only PR (0 removed, 0 renamed), so no live URL dies; 0 chained 404s.
- 0 orphans, 0 broken internal links across the scanned
ui-kit/react/tree; all section anchors resolve. - No TODO/FIXME/placeholders; no version/package drift; content is internally consistent (event names, payloads, optimistic-vs-network-confirmed semantics, pin-vs-save distinction all agree across pages).
@cometchat/chat-uikit-react@7.1.0contains none of:CometChatPinnedMessages,CometChatSavedMessages,toolbarTrailingView,hidePin*/hideSave*/hideUnsave*,onPinnedMessagesClicked,hidePinnedMessagesOption,hideThreadSubscription*,onThreadSubscription*. (usePublishEventandCometChatTextFormatter, used by the custom-formatter guide, do exist — that guide is fine.)@cometchat/chat-sdk-javascript@4.1.14has none of:pinMessage,unpinMessage,saveMessage,unsaveMessage,pinConversation,unpinConversation,isPinned,isSaved,getPinnedAt,getSavedAt,MessagesRequestBuilder.setPinned/.setSaved.
Affected examples: the SDK-call table + PinButton example in guide-pin-and-save-messages.mdx:162-198, the setPinned(true)/setSaved(true) filtering examples in pinned-messages.mdx:201-214 and saved-messages.mdx:160-172, and component/prop references across all four new feature pages.
Recommendation: If this PR is timed to land with the UI Kit / SDK release that ships these APIs, the content is accurate and merge is clean — treat this as a scheduling gate. If it would publish while the packages still lack these symbols, every code example fails to import/compile for readers; hold until the release ships. No redirect changes needed (add-only).
Docs review — ✅ Approve (one should-fix)The React v7 UI Kit entry in this feature family (15 files, +1,836/−15) — two new component pages, two new guides, and updates across the component docs. Structurally clean, and every documented symbol verifies against the published package. ✅ API verified against published
|
| Package | Present in | Absent in |
|---|---|---|
@cometchat/chat-uikit-react |
7.2.0 only | 7.1.0 |
Both CometChatPinnedMessages and toolbarTrailingView are absent from 7.1.0 — the previously-latest release. Anyone on 7.1.0 following these pages gets "component doesn't exist" errors with no explanation.
<Note>
**Available since v7.2.0** — pin, save, and `toolbarTrailingView` require
`@cometchat/chat-uikit-react` v7.2.0 or later. See [Getting Started](/ui-kit/react/overview) to upgrade.
</Note>🔁 Pattern worth fixing at the template level
Three PRs, three platforms, same omission — and in every case the feature exists only in the single newest release:
| PR | Platform | Requires | Absent in (previously latest) |
|---|---|---|---|
| #461 | Flutter | cometchat_sdk 5.0.7 / cometchat_chat_uikit 6.1.1 |
5.0.6 / 6.1.0 |
| #493 | React Native | chat-sdk-react-native 4.1.0 |
4.0.29 |
| #464 | React | chat-uikit-react 7.2.0 |
7.1.0 |
That's less three oversights than a missing step in how this feature set is being documented. The transcription rollout (#487) got it right on all 5 platforms, so the pattern already exists in-repo — worth adding the availability callout to the page template before the Android/iOS versions land, rather than retrofitting it five times.
Content is accurate and well-structured throughout. Approving on the assumption the version note lands here or in a quick follow-up. 🚀
🤖 Automated docs review (Mintlify link/redirect/nav checks + API verification against published @cometchat/chat-uikit-react).
jitvarpatil
left a comment
There was a problem hiding this comment.
Docs review — ✅ Approve (one should-fix)
The React v7 UI Kit entry in this feature family (15 files, +1,836/−15) — two new component pages, two new guides, and updates across the component docs. Structurally clean, and every documented symbol verifies against the published package.
✅ API verified against published @cometchat/chat-uikit-react@7.2.0
CometChatPinnedMessages · CometChatSavedMessages · toolbarTrailingView · CometChatTextFormatter · CometChatEventsProvider · CometChatAttachmentHideOptions — all present.
Structure: all 4 new pages wired into nav; 0 nav breaks, 0 orphans, 0 broken links, redirects +0; no placeholders/TODOs across 1,836 new lines.
🟡 Should-fix — no minimum version stated
| Package | Present in | Absent in |
|---|---|---|
@cometchat/chat-uikit-react |
7.2.0 only | 7.1.0 |
Both CometChatPinnedMessages and toolbarTrailingView are absent from 7.1.0 — the previously-latest release. Anyone on 7.1.0 following these pages gets "component doesn't exist" errors with no explanation.
<Note>
**Available since v7.2.0** — pin, save, and `toolbarTrailingView` require
`@cometchat/chat-uikit-react` v7.2.0 or later. See [Getting Started](/ui-kit/react/overview) to upgrade.
</Note>🔁 Pattern worth fixing at the template level
Three PRs, three platforms, same omission — and in every case the feature exists only in the single newest release:
| PR | Platform | Requires | Absent in (previously latest) |
|---|---|---|---|
| #461 | Flutter | cometchat_sdk 5.0.7 / cometchat_chat_uikit 6.1.1 |
5.0.6 / 6.1.0 |
| #493 | React Native | chat-sdk-react-native 4.1.0 |
4.0.29 |
| #464 | React | chat-uikit-react 7.2.0 |
7.1.0 |
That's less three oversights than a missing step in how this feature set is being documented. The transcription rollout (#487) got it right on all 5 platforms, so the pattern already exists in-repo — worth adding the availability callout to the page template before the Android/iOS versions land, rather than retrofitting it five times.
Content is accurate and well-structured throughout. Approving on the assumption the version note lands here or in a quick follow-up. 🚀
🤖 Automated docs review (Mintlify link/redirect/nav checks + API verification against published @cometchat/chat-uikit-react).
Description
Docs: Pin & Save, Thread Subscription, and Composer Toolbar Trailing View
Documents three v7 features across the React UI Kit docs, plus the toolbarTrailingView composer slot and a custom text-formatter guide.
New pages
components/pinned-messages.mdx — CometChatPinnedMessages (per-conversation pins, opened from the message header).
components/saved-messages.mdx — CometChatSavedMessages (personal, cross-conversation; standalone screen with no built-in trigger).
guide-pin-and-save-messages.mdx — end-to-end pin/save walkthrough.
guide-custom-text-formatter.mdx — minimal color formatter bound to a toolbarTrailingView button, rendered read-only in bubbles.
Updated pages
message-composer — toolbarTrailingView (View Props + Props + example).
message-list — hidePin/Unpin/Save/Unsave/ThreadSubscriptionOption + a "Pin and Save Options" section.
conversations — hidePinConversation, a "Pin Conversation" section (pin indicator, limits, system pins), and the ui:conversation/pin-changed event.
message-bubble — pinned/saved indicators (chrome table, section, CSS selectors).
message-header — onPinnedMessagesClicked / hidePinnedMessagesOption.
thread-header — subscription bell (hideThreadSubscriptionToggle, onThreadSubscriptionChange).
event-system — SDK events (message/pinned|unpinned|saved|unsaved, thread/subscription-changed) and UI events (ui:message/pin-changed, ui:message/save-changed, ui:conversation/pin-changed, ui:thread/subscription-changed).
core-features — "Pin and Save Messages" section + the features.ux.* limit settings.
components-overview — pinned/saved components.
guide-threaded-messages — "Thread Subscription" section.
docs.json — registered the new pages.
Related Issue(s)
Type of Change
Checklist
Additional Information
Screenshots (if applicable)