Skip to content

DX-1211: RealtimeAnnotations & RestAnnotations interface docstrings#2245

Draft
umair-ably wants to merge 3 commits into
DX-1211/realtimepresence-docstringsfrom
DX-1211/annotations-docstrings
Draft

DX-1211: RealtimeAnnotations & RestAnnotations interface docstrings#2245
umair-ably wants to merge 3 commits into
DX-1211/realtimepresence-docstringsfrom
DX-1211/annotations-docstrings

Conversation

@umair-ably

Copy link
Copy Markdown
Contributor

Stacked on #2244. One commit per change:

  1. Docstrings — rewrite all RealtimeAnnotations/RestAnnotations docstrings so prerequisites, side-effects and failure modes are discoverable at the call site (the DX-1211 effort): the default-off annotation_subscribe mode, the mutable-messages channel rule, the annotation-publish/annotation-subscribe capabilities, the unencrypted-annotation-data caveat, and each member's reject behaviour. Server-side failure shapes were verified by live traces against sandbox.
  2. RestAnnotations.delete declaration — the implementation has existed since 04fed9c but was never declared on the interface, so the working method is uncallable from TypeScript. Public API addition (changelog-worthy).
  3. src fixes — annotation validation errors now name the calling method instead of always saying annotations.publish(), and the 93001 hint no longer tells users to expect a rejected attach for a missing capability (the server actually silently grants fewer modes; live-traced).

🤖 Generated with Claude Code

umair-ably and others added 3 commits June 10, 2026 14:15
… subscribe hint capability branch

serialFromMsgOrSerial/constructValidateAnnotation now take the calling
method's name, so annotations.get()/delete() failures no longer report
"annotations.publish()". The 93001 hint told users to check the
annotation-subscribe capability "if the subsequent attach is rejected",
but a missing capability does not reject the attach (live-traced: the
server silently grants fewer modes than requested); the hint now
distinguishes the channel-rule case (attach rejected) from the
capability case (attach succeeds, error persists).

Co-Authored-By: Claude Fable 5 (1M context) <noreply@anthropic.com>
…cstrings (prerequisites, side-effects, failure modes)

Co-Authored-By: Claude Fable 5 (1M context) <noreply@anthropic.com>
delete() has existed in the RestAnnotations implementation since
04fed9c (which declared it only on RealtimeAnnotations), so the method
works at runtime but TypeScript users cannot call it. Verified live
that the server accepts REST-published deletes.

Co-Authored-By: Claude Fable 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb15efe1-f54a-4bd6-b5eb-52f723e545df

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DX-1211/annotations-docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant