Skip to content

feat(pin-save-thread-subscription-js-sdk): add documentation for pin/save messages, pin conversations and thread subscription - #469

Merged
ketanyekale merged 4 commits into
mainfrom
feature/pin-save-thread-subscription-js-sdk
Sep 8, 2026
Merged

ketanyekale merged 4 commits into
mainfrom
feature/pin-save-thread-subscription-js-sdk

Conversation

@PrajwalDhuleCC

Copy link
Copy Markdown
Contributor

Description

Add documentation for pin/save messages, pin conversations and thread subscription

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)

…save messages, pin conversations and thread subscription
@mintlify

mintlify Bot commented Aug 16, 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 16, 2026, 6:24 PM

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

…no longer honours

Both pages described behaviour that changed when the SDK stopped self-echoing
pin/save writes and gained a composite thread cursor.

save-message: the Real-time Save Events note said the acting device also receives
its own event, de-duplicated by the SDK, and that a consumer could insert into the
saved list from the callback alone. The SDK no longer local-emits — the acting
device gets nothing and must update from the saveMessage() promise, while the
callbacks fire for that user's other devices. Following the old note would have
left the saved list un-updated on the device that performed the save.

thread-subscription: the paging section said only "call fetchNext() repeatedly",
which leads to looping until an empty page. hasMore() is the end-of-list signal —
a page can be shorter than the limit because the server's inclusive cursor repeats
the boundary row and the SDK filters it out. Adds a while (hasMore()) example in
both tabs and states the rule explicitly.
…pages

The three links in the Ongoing Call Listener section pointed at
/sdk/javascript/direct-call, /standalone-calling and /default-call, none of which
exist — in v4 those pages live under the Calls SDK. Now /calls/v4/javascript/
call-session, /standalone-calling and /ringing, matching the link text already in
place. v4 rather than the v5 beta, since OngoingCallListener is the v4 API.

Pre-existing 404s, unrelated to the pin/save and thread work in the surrounding
commits.
@raj-dubey1

Copy link
Copy Markdown
Contributor

Docs review — structurally clean, one content contradiction.

Ran the mechanical checks (redirect coverage, nav integrity, orphans, in-content link rot) plus a content read of all 7 changed files. Build is safe: 0 unresolved nav refs, 0 missing redirects (additive), 0 orphans. Method-name consistency is clean — setPinned / setSaved, the five limit getters, and the onMessagePinned / onMessageUnpinned / onMessageSaved / onMessageUnsaved callbacks match across every page, and the all-real-time-listeners.mdx reference table lines up with the pin-message.mdx / save-message.mdx samples.

One content item worth fixing before merge:

pin-message.mdx — the pin cap is stated two contradictory ways on the same page (should-fix)

  • Line 129 (Note): "A conversation can hold at most 100 pinned messages, so setLimit(100) fetches the whole list in a single call" — states 100 as a hard invariant and bases the advice on it.
  • Line 215 (Pin Limit section): "A conversation holds a capped number of pins, configurable per app. Read the cap rather than hard-coding it — it is tenant-overridable and will drift."

These disagree: if the cap is per-app / overridable, setLimit(100) is not guaranteed to fetch the whole list. Suggest softening the Note to reference the value from getPinnedMessagesLimit() (which the page already documents at lines 220/231) instead of hard-coding 100 — or present 100 explicitly as the default and drop the "read it because it drifts" framing, but not both.

Optional heads-up (pre-existing — not introduced by this PR): the older sections of message-filtering.mdx have several TypeScript (Group) tabs that declare GUID but call .setUID(UID) (e.g. lines 150, 217) and TypeScript (User) tabs that call .setGUID(UID) (e.g. line 1066). Your new pin/save tabs are correct; since you're already editing this file, these would be cheap to fix in the same pass. Not a blocker.

Everything else checks out — packages/imports, images (none), placeholders (none), and cross-links all resolve.

raj-dubey1
raj-dubey1 previously approved these changes Sep 7, 2026
…THREADS

Thread subscription added a fourth value to RepliesOptions, and it was documented
nowhere — neither dashboard-preference table listed it, and no note described the
enum. A reader had three options in front of them and a fourth in the SDK.

Adds "Notify for subscribed threads" to the New replies row in both the group and
one-on-one tables, and a note listing all four RepliesOptions values. The note
explains what makes the fourth usable: a user is subscribed to a thread by starting
it, replying in it, being @-mentioned in it, or following it explicitly — with a
link to the Thread Subscription page.

Deliberately mirrors the QuotedRepliesOptions note in #472 so the two read as a
pair once both land.

@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; code-example bugs to fix before merge

Mechanical / structural checks: all clear. Build is safe (all 5 new pages wired into docs.json nav and resolve), add-only PR so 0 removed/renamed → no 404 risk, 0 chained 404s, 0 orphans, all cross-links and /sdk/reference/* anchors resolve. docs.json is valid JSON.

Code-example bugs in sdk/javascript/message-filtering.mdx (all newly added, each has a correct sibling tab so intent is unambiguous):

  • Group tabs use .setUID(UID) but should use .setGUID(GUID) (and never use the declared GUID) — :150, :217.
  • User tabs use the group setter .setGUID(UID) but should use .setUID(UID):1066, :1138, :1204, :1273, :1342, :1411, :1480.
  • .withTags(tags) where tags is never declared:1108; should be .withTags(true) (matches the documented usage and the TS sibling tab).

Nit: sdk/javascript/all-real-time-listeners.mdx:350 — comment typo "Message Delted" (JS sibling at :418 is correct). Cosmetic.

⚠️ Blocker risk — documentation is ahead of the published SDK. The documented pin/save/thread methods (pinMessage, unpinMessage, saveMessage, unsaveMessage, pinConversation, unpinConversation, subscribeToThread, isPinned, isSaved, etc.) are absent from the latest published @cometchat/chat-sdk-javascript@4.1.13 (verified by unpacking the published tarball and grepping CometChat.js / CometChat.d.ts — 0 hits, while control methods sendMessage/editMessage/deleteMessage are present, so the negative is real, not a bad grep). If this publishes before the SDK release that ships these methods, the pin/save/thread pages document non-functional APIs — hold until the release ships, or confirm it lands together. No redirects needed (add-only).

Recommendation: fix the ~10 one-token code-example bugs before merge.

@jitvarpatil

Copy link
Copy Markdown
Contributor

Docs review — ✅ Approve (one should-fix)

The JavaScript SDK entry in this feature family (9 files, +1,521/−7). Structurally clean, 0 new broken links, and all 16 documented methods verify against the published package.

✅ API verified against published @cometchat/chat-sdk-javascript@4.2.0

All 16 methods present: pinMessage · unpinMessage · saveMessage · unsaveMessage · pinConversation · unpinConversation · subscribeToThread · unsubscribeFromThread · isPinMessageEnabled · isPinConversationEnabled · isSaveMessageEnabled · getPinnedMessagesLimit · getPinnedConversationsLimit · getSavedMessagesLimit · getSystemPinnedMessagesLimit · getSystemPinnedConversationsLimit

Structure: all 6 new pages wired into nav; 0 nav breaks, 0 orphans, redirects +0; no placeholders across 1,521 new lines. The 3 broken links the analyzer flagged (default-call, direct-call, interactive-messages) are pre-existing in unchanged files — none appear in this PR's added lines.

🟡 Should-fix — no minimum version stated

Package Present in Absent in
@cometchat/chat-sdk-javascript 4.2.0 only 4.1.14
<Note>
**Available since v4.2.0** — pin, save, and thread subscriptions require
`@cometchat/chat-sdk-javascript` v4.2.0 or later. See [Setup](/sdk/javascript/setup) to upgrade.
</Note>

🔁 Now 4 of 4 — worth fixing at the template level

PR Platform Requires Absent in (previously latest)
#461 Flutter cometchat_sdk 5.0.7 / 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
#469 JavaScript chat-sdk-javascript 4.2.0 4.1.14

Every one of these features exists only in the single newest release, and none of the pages say so. Four platforms, same omission — a process gap rather than four separate mistakes. With Android/iOS presumably still to come, adding the availability callout to the shared page template now fixes it once instead of six times. The transcription rollout (#487) already does this correctly across all 5 platforms — same pattern, ready to copy.

Content is accurate and well-structured. 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-sdk-javascript).

@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 JavaScript SDK entry in this feature family (9 files, +1,521/−7). Structurally clean, 0 new broken links, and all 16 documented methods verify against the published package.

✅ API verified against published @cometchat/chat-sdk-javascript@4.2.0

All 16 methods present: pinMessage · unpinMessage · saveMessage · unsaveMessage · pinConversation · unpinConversation · subscribeToThread · unsubscribeFromThread · isPinMessageEnabled · isPinConversationEnabled · isSaveMessageEnabled · getPinnedMessagesLimit · getPinnedConversationsLimit · getSavedMessagesLimit · getSystemPinnedMessagesLimit · getSystemPinnedConversationsLimit

Structure: all 6 new pages wired into nav; 0 nav breaks, 0 orphans, redirects +0; no placeholders across 1,521 new lines. The 3 broken links the analyzer flagged (default-call, direct-call, interactive-messages) are pre-existing in unchanged files — none appear in this PR's added lines.

🟡 Should-fix — no minimum version stated

Package Present in Absent in
@cometchat/chat-sdk-javascript 4.2.0 only 4.1.14
<Note>
**Available since v4.2.0** — pin, save, and thread subscriptions require
`@cometchat/chat-sdk-javascript` v4.2.0 or later. See [Setup](/sdk/javascript/setup) to upgrade.
</Note>

🔁 Now 4 of 4 — worth fixing at the template level

PR Platform Requires Absent in (previously latest)
#461 Flutter cometchat_sdk 5.0.7 / 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
#469 JavaScript chat-sdk-javascript 4.2.0 4.1.14

Every one of these features exists only in the single newest release, and none of the pages say so. Four platforms, same omission — a process gap rather than four separate mistakes. With Android/iOS presumably still to come, adding the availability callout to the shared page template now fixes it once instead of six times. The transcription rollout (#487) already does this correctly across all 5 platforms — same pattern, ready to copy.

Content is accurate and well-structured. 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-sdk-javascript).

@ketanyekale
ketanyekale merged commit 1209967 into main Sep 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

5 participants