Skip to content

docs: clarify that channels.release() is for niche use cases#3348

Merged
SimonWoolf merged 1 commit intomainfrom
release-warning
Apr 20, 2026
Merged

docs: clarify that channels.release() is for niche use cases#3348
SimonWoolf merged 1 commit intomainfrom
release-warning

Conversation

@SimonWoolf
Copy link
Copy Markdown
Member

Summary

  • Reframes the channels.release() docs on both the Realtime and REST API pages to match the recent specification update.
  • Adds an important admonition making clear that most applications should never call release — it exists for niche use cases (clients cycling through a continually changing set of channels).
  • Warns that retaining and using a channel reference after release is undefined behaviour.
  • Removes the singleton-client cautionary paragraphs, since they are subsumed by the stronger "don't use this unless you really need to" framing.

Test plan

  • Visual check of the rendered pages in a review app for both /docs/api/realtime-sdk/channels#release and /docs/api/rest-sdk/channels#release.

🤖 Generated with Claude Code

@SimonWoolf SimonWoolf requested a review from m-hulbert April 17, 2026 10:50
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

Important

Review skipped

Auto reviews are disabled on this repository. 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3ab9e42e-a0c1-40de-b2c0-ed6a5d7629f2

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 release-warning

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.

Copy link
Copy Markdown
Contributor

@m-hulbert m-hulbert left a comment

Choose a reason for hiding this comment

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

I know it might seem pedantic, but I think the comma here is important 🙂

Comment thread src/pages/docs/api/realtime-sdk/channels.mdx Outdated
Most users never need to call release(). Reframe the docs to match the
recent spec update, discouraging general use and warning that using a
channel reference after release is undefined behaviour.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@SimonWoolf
Copy link
Copy Markdown
Member Author

@m-hulbert note that the wording has now changed significantly since you reviewed it since I noticed that the ably-js behaviour differed from all other SDKs and ended up changing that in the interests of uniformity, so am now documenting the new behaviour, cf ably/specification#448 (comment)

@SimonWoolf SimonWoolf enabled auto-merge April 20, 2026 18:54
@SimonWoolf SimonWoolf merged commit 87a60de into main Apr 20, 2026
7 checks passed
@SimonWoolf SimonWoolf deleted the release-warning branch April 20, 2026 18:57
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.

2 participants