SD-3357 - fix: dedupe tracked changes from merged activity feed#3609
Conversation
…3357) SuperDoc surfaces tracked changes in both ui.comments.items (as trackedChange:true comments) and ui.trackChanges.items with the same id. The ActivitySidebar merged both slices without filtering, so each suggestion rendered twice (one comment card + one change card). Skip comment.trackedChange items when building the feed, and drop a leftover debug log. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
cubic analysis
No issues found across 1 file
Linked issue analysis
Linked issue: SD-3357: BUG: Tracked change in suggesting mode renders as both a comment and a tracked change (custom-ui demo)
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Skip comment.trackedChange items when building the merged activity feed in ActivitySidebar | The diff adds a filter that returns early for c.trackedChange before pushing comment items into the feed. |
| ✅ | Still include trackChanges.items so tracked changes render once from the change feed | The code continues to push trackChanges.items into the feed after filtering comments, ensuring changes are rendered from the change bucket. |
| ✅ | Activity sidebar no longer displays duplicate entries for the same tracked change (one comment + one change) | By skipping comment.trackedChange items and keeping trackChanges.items, the merged feed will contain only the change instance, preventing the previously duplicated rendering. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 048e6d6e5d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…D-3357) A real comment thread anchored over text that overlaps a suggestion also gets trackedChange:true (comments.list links it via assignTrackedChangeLink), so filtering on the flag wrongly hid those discussions. Dedupe by id instead — synthetic tracked-change comment rows reuse the tracked-change id, while real comments keep their own. Also exclude pairedWithChangeId so replacement pairs collapsed by trackChanges.list (replacements: paired) don't leak one half back as a comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
andrii-harbour
left a comment
There was a problem hiding this comment.
Nice job! Minor comments here.
P.S. PR title typo: title says SD-3557; the ticket is SD-3357
|
@andrii-harbour thanks for the review! updated the ticket title and also pushed a commit removing dead code + adding comments. |
…ting-mode-renders-as-both-a
Tracked changes were being displayed twice in the sidebar.