Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restoring comments again duplicates them #196574

Closed
joaomoreno opened this issue Oct 25, 2023 · 4 comments · Fixed by #197146
Closed

Restoring comments again duplicates them #196574

joaomoreno opened this issue Oct 25, 2023 · 4 comments · Fixed by #197146
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug comments Comments Provider/Widget/Panel issues verified Verification succeeded
Milestone

Comments

@joaomoreno
Copy link
Member

Testing #193104

  1. Follow the pre-requisites from Test continue on for PR comments #193104
  2. In a file, sprinkle three separate comments.
  3. Store changes in Cloud.
  4. In another machine, same file, restore changes in Cloud. All three comments show up.
  5. Update the first comment by adding a line.
  6. Store changes in Cloud.
  7. Back to the first machine, restore changes in Cloud.

🐛 Now there are 6 comments. All "new" 3 have been appended to the 3 existing comments.

@alexr00 alexr00 added the bug Issue identified by VS Code Team member as probable bug label Oct 25, 2023
@alexr00 alexr00 added this to the November 2023 milestone Oct 25, 2023
@alexr00 alexr00 added the comments Comments Provider/Widget/Panel issues label Oct 25, 2023
@alexr00
Copy link
Member

alexr00 commented Nov 1, 2023

Good bug, thanks for finding!

alexr00 added a commit that referenced this issue Nov 1, 2023
Add comment thread pending comment reconciliation
Fixes #196574
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Nov 1, 2023
@joyceerhl joyceerhl added the verified Verification succeeded label Nov 30, 2023
@joyceerhl
Copy link
Collaborator

joyceerhl commented Nov 30, 2023

Hm, I can't get past step 4--the comments don't show up for me and I see this in the window logs

2023-11-30 15:03:19.635 [debug] Comments: URIs of continue on comments to add to storage .
2023-11-30 15:03:24.645 [debug] Comments: URIs of continue on comments to add to storage .
2023-11-30 15:03:29.733 [debug] Comments: URIs of continue on comments to add to storage .
2023-11-30 15:03:34.740 [debug] Comments: URIs of continue on comments to add to storage .

I then also see this in the GHPRI logs--before a resume, I am able to leave comments on edited ranges, and after a resume, the comment glyph widget is disabled for all edited ranges

2023-11-30 23:18:28.964 [debug] ReviewCommentController> Found matched file for commenting ranges.
2023-11-30 23:18:29.099 [debug] ReviewCommentController> Found 3 commenting ranges.
2023-11-30 23:18:29.131 [debug] ReviewCommentController> Providing 3 commenting ranges for intents.ts.
2023-11-30 23:18:50.315 [debug] GitPostCommitCommands> Looking for remote. Comparing 1 local repo remotes with 1 GitHub repositories.
2023-11-30 23:18:50.315 [debug] GitPostCommitCommands> Found a repo when getting post commit commands.
2023-11-30 23:18:50.315 [debug] GitPostCommitCommands> Looking for remote. Comparing 1 local repo remotes with 1 GitHub repositories.
2023-11-30 23:18:50.315 [debug] GitPostCommitCommands> Found a repo when getting post commit commands.
2023-11-30 23:18:50.451 [debug] ReviewCommentController> No commenting ranges: File has diffs, but they could not be mapped to current lines.
2023-11-30 23:18:50.451 [debug] ReviewCommentController> Providing 0 commenting ranges for intents.ts.

@joyceerhl joyceerhl added verification-found Issue verification failed and removed verified Verification succeeded labels Nov 30, 2023
@joyceerhl joyceerhl reopened this Nov 30, 2023
@vscodenpa vscodenpa removed the insiders-released Patch has been released in VS Code Insiders label Nov 30, 2023
@alexr00 alexr00 modified the milestones: November 2023, December 2023 Dec 1, 2023
@alexr00 alexr00 modified the milestones: December / January 2024, February 2024 Jan 24, 2024
@alexr00
Copy link
Member

alexr00 commented Jan 31, 2024

@joyceerhl I can't reproduce this. Are you using 2 separate machines (or equivalent) + desktop VS Code?

@alexr00 alexr00 closed this as completed Jan 31, 2024
@alexr00 alexr00 removed the verification-found Issue verification failed label Feb 22, 2024
@rzhao271
Copy link
Contributor

rzhao271 commented Feb 24, 2024

LGTM.

Some notes:

  • I had to add a line to the PR to get the changes to store the first time on the first machine (Linux), which corresponds to step 4 of Test continue on for PR comments #193104
  • After restoring on the second machine (Windows), the PR comments didn't automatically show up. I had to refresh the PR for the comments to show up or update.

Adding verified because no duplicate comments showed up.

@rzhao271 rzhao271 added the verified Verification succeeded label Feb 24, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug comments Comments Provider/Widget/Panel issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants