feat(notifications): coalesce owner-side comment notifications per-page#92
Merged
Merged
Conversation
Owner-side doc-comment notifications (a new top-level comment routed to the owning group) now use a per-page coalescing scope `rw:page:<siteRef>|<pageRef>` instead of the per-thread `rw:comment:<rootId>`. A burst of new comments on one doc collapses into a single self-updating Web-inbox row per owning group rather than one notification per thread. Participant-side notifications (replies and resolves) keep the per-thread scope; the two namespaces are disjoint, so a reply is never swallowed by the page-level owner row. Also documents the behavior and the optional official Slack module in the plugin README: install + group->channel / user->DM routing, the correct `notifications.processors.slack` config key, and an honest note that the module does not coalesce owner-side channel posts (the per-page coalescing is a Web-inbox property). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Owner-side doc-comment notifications (a new top-level comment routed to the owning group) now use a per-page coalescing scope
rw:page:<siteRef>|<pageRef>instead of the per-threadrw:comment:<rootId>. A burst of new comments on one doc collapses into a single self-updating Web-inbox row per owning group, rather than one notification per thread.Participant-side notifications (replies and resolves) keep the per-thread scope. The two namespaces are disjoint, so a reply is never swallowed by the page-level owner row.
Scope:
@rwdocs/backstage-plugin-rw-backend-module-notificationsonly — no changes to rw-backend, rw-node, or theCommentActivitycontract (which already carriessiteRef/pageRef).Why
Implements the MVP "flood fix" from the doc-comment notification design: a hot doc no longer accumulates one inbox row per comment for the owning group.
Docs
The README now documents the coalescing behavior and the optional official Slack module:
notifications.processors.slack: [{ token }](an array);processOptionssends channel posts with no scope; onlypostProcessDMs usechat.update.)Tests
CommentNotifier.test.tsnow proves the coalescing property directly (two/three top-level creates on one page → identical scope), the rootId-keying for replies/resolves, and namespace disjointness. 14/14 passing.Verification
Verified in a running Backstage instance: as a non-owner, three top-level comments on one owned page produced a single self-updating notification for the owner (showing the latest), while a comment on a different page stayed a separate row.
🤖 Generated with Claude Code