Skip to content

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

Merged
ketanyekale merged 5 commits into
mainfrom
feature/react-thread-subscription-pin-save
Sep 8, 2026

Conversation

@PrajwalDhuleCC

@PrajwalDhuleCC PrajwalDhuleCC commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

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

  • Documentation correction/update
  • New documentation
  • Improvement to existing documentation
  • Typo fix
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • [] All links in my changes are valid and working
  • My changes are accurately described in this pull request

Additional Information

Screenshots (if applicable)

… subscription, pin/save messages, pin conversation and toolbarTrailingView prop + Custom formatter guide in react v7 uikit docs
@mintlify

mintlify Bot commented Aug 8, 2026

Copy link
Copy Markdown

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

Project Status Preview Updated (UTC)
cometchat 🟢 Ready View Preview Aug 8, 2026, 3:45 PM

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

…beds and css selectors for pin-save and thread subscription feature in react v7 uikit
raj-dubey1
raj-dubey1 previously approved these changes Aug 10, 2026
…op in message list, deprecation of parentMessageId, events list updates and permission error toasts for pin msg
@raj-dubey1

Copy link
Copy Markdown
Contributor

Docs review — ⚠️ Request changes (hold until the APIs ship + one fix needed regardless)

Thanks for this! Reviewed the branch end-to-end (structural checks + verified every component/prop/event against the published UI Kit). Structurally it's clean and build-safe, but most of the pin/save/thread-subscription surface documents components and props that don't exist in any published version of @cometchat/chat-uikit-react, so if this merges to main today those pages (and the two guides) won't compile for readers.

✅ What passed

  • Build-safe: 0 dangling nav refs, 0 orphaned pages, 0 broken in-content links, 0 missing redirects.
  • Genuinely correct content: the multi-attachment composer additions (enableMultipleAttachments, .cometchat-message-composer__tray ships in the CSS), the text-formatter base classes (CometChatTextFormatter, CometChatMentionsFormatter, CometChatMarkdownFormatter, CometChatUrlFormatter), and the event-hook APIs (useCometChatEvents, usePublishEvent) are all real in 7.1.0.

🔴 Blocker — documented components/props/events don't exist in any published UI Kit

Verified against @cometchat/chat-uikit-react@7.1.0 (= npm latest; every prerelease tag — beta/alpha/legacy — points to an older build, so nothing unreleased-and-ahead could contain these). Checked the bundled dist/index.d.ts, the runtime chunk, and the shipped dist/*.css. Grep returns zero matches for all of the following (real symbols like CometChatMessageComposer match fine):

  • Two whole components don't exist: CometChatPinnedMessages and CometChatSavedMessages — not in the export list, no CSS. This makes pinned-messages.mdx, saved-messages.mdx, and guide-pin-and-save-messages.mdx document non-existent components. guide-custom-text-formatter.mdx also imports CometChatPinnedMessages.
  • toolbarTrailingView doesn't exist on the MessageComposer (0 occurrences). Both message-composer.mdx and the entire payoff of guide-custom-text-formatter.mdx depend on it — the guide won't compile.
  • All pin/save/subscription props are absent across message-list / message-header / conversations / thread-header: hidePinMessageOption, hideUnpinMessageOption, hideSaveMessageOption, hideUnsaveMessageOption, hideThreadSubscriptionOption, hidePinConversation, onPinnedMessagesClicked, hidePinnedMessagesOption, hideThreadSubscriptionToggle, onThreadSubscriptionChange.
  • Fabricated events in event-system.mdx: SDK events message/pinned|unpinned|saved|unsaved and UI events ui:message/pin-changed, ui:message/save-changed, ui:conversation/pin-changed, ui:thread/subscription-changed aren't in the event union.
  • CSS selectors for the pinned/saved bubble indicators and conversations__item-pin-indicator aren't in any shipped stylesheet.

🟠 Separately — a factual error to fix regardless of release timing

message-list.mdx marks parentMessageId as "Deprecated — pass parentMessage instead" (lines 35–38 and 756–758) and documents parentMessage: CometChat.BaseMessage as a MessageList prop. In shipped 7.1.0 this is inverted: MessageList's real prop is parentMessageId (current, not deprecated), and parentMessage exists only on ThreadHeader — it is not a MessageList prop. As written this would send every threaded-messages integrator to a prop that doesn't exist and away from the one that does. Please correct this even if the pin/save pages are held.

Ask

If these document an upcoming UI Kit release: hold/gate this PR until that version ships, pin the install/examples to it, and re-verify the exact component/prop names against the shipped build before publishing. Linking the UI Kit version/PR here would let us confirm quickly. The parentMessage/parentMessageId item should be fixed regardless.

🤖 Automated docs-PR review (structural script + API verification against the published package). Flagging for a human to confirm the release timing.

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
aanshisingh-cometchat added a commit that referenced this pull request Sep 7, 2026
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
raj-dubey1 self-requested a review September 7, 2026 15:40

@raj-dubey1 raj-dubey1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json and 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).

⚠️ Blocker risk — documentation is ahead of the published packages. The entire documented feature surface is absent from the latest published releases, verified by grepping the packages directly:

  • @cometchat/chat-uikit-react@7.1.0 contains none of: CometChatPinnedMessages, CometChatSavedMessages, toolbarTrailingView, hidePin*/hideSave*/hideUnsave*, onPinnedMessagesClicked, hidePinnedMessagesOption, hideThreadSubscription*, onThreadSubscription*. (usePublishEvent and CometChatTextFormatter, used by the custom-formatter guide, do exist — that guide is fine.)
  • @cometchat/chat-sdk-javascript@4.1.14 has 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).

@jitvarpatil

Copy link
Copy Markdown
Contributor

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

@jitvarpatil jitvarpatil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants