Skip to content

SD-3357 - fix: dedupe tracked changes from merged activity feed#3609

Merged
harbournick merged 4 commits into
mainfrom
gabriel/sd-3357-bug-tracked-change-in-suggesting-mode-renders-as-both-a
Jun 3, 2026
Merged

SD-3357 - fix: dedupe tracked changes from merged activity feed#3609
harbournick merged 4 commits into
mainfrom
gabriel/sd-3357-bug-tracked-change-in-suggesting-mode-renders-as-both-a

Conversation

@chittolinag
Copy link
Copy Markdown
Contributor

Tracked changes were being displayed twice in the sidebar.

…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>
@chittolinag chittolinag requested a review from a team as a code owner June 2, 2026 19:55
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 2, 2026

SD-3357

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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.

Re-trigger cubic

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread demos/editor/custom-ui/src/components/ActivitySidebar.tsx Outdated
…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>
Copy link
Copy Markdown
Contributor

@andrii-harbour andrii-harbour left a comment

Choose a reason for hiding this comment

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

Nice job! Minor comments here.

P.S. PR title typo: title says SD-3557; the ticket is SD-3357

Comment thread demos/editor/custom-ui/src/components/ActivitySidebar.tsx Outdated
Comment thread demos/editor/custom-ui/src/components/ActivitySidebar.tsx Outdated
@chittolinag chittolinag changed the title SD-3557 - fix: dedupe tracked changes from merged activity feed SD-3357 - fix: dedupe tracked changes from merged activity feed Jun 3, 2026
@chittolinag
Copy link
Copy Markdown
Contributor Author

@andrii-harbour thanks for the review! updated the ticket title and also pushed a commit removing dead code + adding comments.

@chittolinag chittolinag requested a review from caio-pizzol June 3, 2026 17:05
@harbournick harbournick self-assigned this Jun 3, 2026
Copy link
Copy Markdown
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

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

LGTM

@harbournick harbournick merged commit 75c94b4 into main Jun 3, 2026
20 checks passed
@harbournick harbournick deleted the gabriel/sd-3357-bug-tracked-change-in-suggesting-mode-renders-as-both-a branch June 3, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants