DX-1211: RealtimePresence interface docstrings#2244
Draft
umair-ably wants to merge 2 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bec860c to
ae2344a
Compare
0c60917 to
1da8dbb
Compare
1da8dbb to
31891bf
Compare
ae2344a to
1d45ea3
Compare
31891bf to
2c3359d
Compare
2c3359d to
97f56a1
Compare
61c9a99 to
20f12c5
Compare
20f12c5 to
d71092a
Compare
97f56a1 to
e2de3ee
Compare
…, side-effects, failure modes) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…trings to sentences; single @see on history() Aligns presence get/subscribe mode wording with the reviewed RealtimeChannel form, and moves the storage concept inline onto the persistence-rule prerequisite per the single-link convention. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
d71092a to
c064311
Compare
e2de3ee to
9e59a94
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2243 (RealtimeChannel docstrings, base
DX-1211/realtimechannel-docstrings); review/merge that first. Rewrites the JSDoc on theRealtimePresencepublic surface inably.d.tsperdocstringRules.md: terse folded prose that surfaces call-site prerequisites, side-effects, and failure modes (the DX-1211 silent-failure class), with an@seecompanion link to the canonical reference.Scope
ably.d.tsonly (+83/−19). 11 members rewritten (counting overload groups once).Highlights
subscribe()(DX-1211 core): documents the silent missing-presence_subscribe-mode trap — the channel attaches but the server never delivers presence events, so the listener silently never fires; also notesattachOnSubscribe: falseskips the implicit attach. On both active overloads.get(): same mode prerequisite, but the failure shape differs — resolves with an empty array rather than rejecting (or rejects with a hintedErrorInfounderstrictMode).syncComplete: precise semantics — flips back tofalseon a new sync, istrueafter the local set is cleared, so it only means "no sync in progress", not "attached"; points toget()as the way to wait for a sync.enter()/update()/leave(): identified-client prerequisite (rejects on missing/wildcardclientId), with pointers to the*Client()variants;enter()documents automatic re-enter on re-attach and that a re-enter failure surfaces as a channelupdateevent, not a rejection.leave(): unlikeenter(), does not implicitly attach — proceeds only whileattached/attachingand rejects otherwise.enterClient()/updateClient()/leaveClient(): wildcard-clientIdkey/token prerequisite is server-enforced, so violations reject with a server-returnedErrorInfo.unsubscribe(): all six overloads clarify the removal is local-only — no detach, no presence leave.history(): non-code persistence channel-rule prerequisite (72h vs the 2-minute default retention).Validation
npm run docs(TypeDoctreatWarningsAsErrors),prettier --check, andeslintall pass. A clean TypeDoc build confirms every{@link}resolves and nothing became undocumented.Reviewer notes
@seeanchors follow the kebab-case convention (matching the Auth and RealtimeChannel PRs) but are unverified — ably/docs #3400 isn't live yet and@seeis not TypeDoc-validated.attachingcan resolve silently without ever reaching the server in some failure paths); it is deliberately not documented here pending a decision on whether to fix the code instead.🤖 Generated with Claude Code