Skip to content

Conversation

mschristensen
Copy link
Contributor

Description

Adds docs for the message annotations feature to the Messages section of the Pub/Sub product docs.

Includes:

  • How to enable annotations via a channel rule (work to enable this via website is in flight)
  • Description of annotation type specifiers the different summarization methods and their semantics
  • How to publish and delete annotations
  • How to subscribe to annotation summaries and individual annotation events

Not ready to merge yet until we are ready to make the release but opening as draft now for early review.

Checklist

Copy link

coderabbitai bot commented Jun 3, 2025

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.

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

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/PUB-1676-message-annotations

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
Member

@SimonWoolf SimonWoolf left a comment

Choose a reason for hiding this comment

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

Couple comments & suggestions but generally looks good 👍
will leave it to the docs team to approve.

@m-hulbert m-hulbert temporarily deployed to ably-docs-feature-pub-1-ltnsv1 June 11, 2025 09:10 Inactive
@mschristensen mschristensen force-pushed the feature/PUB-1676-message-annotations branch from 8d7eb0c to ed9ed44 Compare June 13, 2025 17:09
@mschristensen
Copy link
Contributor Author

@m-hulbert for some reason the left nav menu gets squished when the content is too wide, despite the fact that it seems to wrap okay

image

@mschristensen mschristensen marked this pull request as ready for review June 13, 2025 17:13
@mschristensen
Copy link
Contributor Author

mschristensen commented Jun 16, 2025

In 9582fcf I have added the error codes used by message annotations, which have been updated in ably/ably-common#307

And aligned in realtime in: https://github.com/ably/realtime/pull/7514

We need to decide on the name used for the channel rule in the website and can align the error codes, error messages used in realtime and the docs here accordingly.

@mschristensen
Copy link
Contributor Author

In 66a92ed I have renamed the "Mutable messages" channel rule to "Advanced message features" per ADR-144 (pending decision) and included the appropriate caveats for features that are not yet supported on mutable messages enabled channels.

@m-hulbert m-hulbert temporarily deployed to ably-docs-feature-pub-1-l9oboc June 18, 2025 13:08 Inactive
Copy link
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.

Thanks Mike, this is comprehensive in terms of content - I just think shuffling the content around might help in understanding it a little quicker.

I know I've made various suggestions throughout, but in hindsight I wonder if the entire page should speak solely in terms of message summaries considering that is what we recommend. Then we have an independent section at the end that explains how/why you can subscribe to individual events. Otherwise it becomes quite complex to explain both instances everywhere. This would make some of my comments obsolete, but let me know what you think.

Also, the content squish is a regression in the MDX implementation which I've logged with the web team. It's related to codeblock scrolling/wrapping of long lines where we've added line numbering.

Comment on lines 259 to 261
<Aside data-type="info">
When using message annotations, normal messages delivered to the [`subscribe()`](/docs/pub-sub#subscribe) listener will have an `action` of `message.create`.
</Aside>
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this should be part of the intro section, but more importantly clearly state that annotation (summaries) use the same listener as regular messages on the channel. WDYT?

Comment on lines 311 to 313
<Aside data-type='note'>
Individual annotation events are useful for activity feeds or detailed logging, but for maintaining UI state, summary events are generally more reliable and efficient.
</Aside>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd pull this up into the intro of the section and out of the aside.

Copy link
Member

Choose a reason for hiding this comment

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

I'm rewriting this para. "More reliable" is not right (receiving raw annotations is perfectly reliable)

@mschristensen
Copy link
Contributor Author

Agree with Simon's comment, otherwise this LGTM @m-hulbert, reads nicely, thanks :)

@m-hulbert m-hulbert force-pushed the feature/PUB-1676-message-annotations branch from 0125c44 to 612c0c0 Compare July 9, 2025 11:09
@m-hulbert m-hulbert added the review-app Create a Heroku review app label Jul 9, 2025
@ably-ci ably-ci temporarily deployed to ably-docs-feature-pub-1-vur6zq July 9, 2025 11:11 Inactive
@m-hulbert
Copy link
Contributor

Made the update to the modes. I also updated the channel rule with the latest terminology, and rebased to fix the issue with the page widths, so it should be readable in the review app now.

@SimonWoolf SimonWoolf force-pushed the feature/PUB-1676-message-annotations branch from 612c0c0 to 298a0ef Compare September 11, 2025 17:47
@SimonWoolf
Copy link
Member

I've rebased this on main (somewhat painfully) and updated it for protocol v4. (Our docs will just unconditionally use protocol v4 message docs for annotations and updates, since by the time we release those features experimentally all 3 sdks which had support for them will be updated to v4).

I didn't keep the previous commit structure; there were a lot of fixup commits that didn't cleanly apply to the commit they were fixing up given other ones inbetween. I squashed it down to one commit nominally written by @mschristensen , and added my changes as a new commit after that.

@SimonWoolf SimonWoolf force-pushed the feature/PUB-1676-message-annotations branch from 4314f2b to 769c246 Compare September 30, 2025 20:06
mschristensen and others added 5 commits October 2, 2025 13:12
And remove references to `version` for now until we add the
update/delete docs.

Our docs will just unconditionally use protocol v4 message docs for
annotations and updates, since by the time we release those features
experimentally all 3 sdks which had support for them will be updated to
v4.
Removed 'Publishing individual annotation events' section separate from
'annotation publish', I think that's confusing. Just mentioned that you
can specify a data payload at the bottom of the publish section.
@SimonWoolf SimonWoolf force-pushed the feature/PUB-1676-message-annotations branch from 855fb67 to 8ddcc34 Compare October 2, 2025 12:12
Copy link
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.

LGTM - thanks for taking the hit on the rebase @SimonWoolf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-app Create a Heroku review app
Development

Successfully merging this pull request may close these issues.

4 participants