Skip to content

Prevent review comment controller collisions across repositories - #8863

Open
alexr00 with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-unable-to-add-comments
Open

Prevent review comment controller collisions across repositories#8863
alexr00 with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-unable-to-add-comments

Conversation

Copilot AI commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

In multi-root workspaces, checking out a second PR could make comment controls unresponsive for the first PR. Review controllers could share an ID because the repository segment incorrectly repeated the owner.

  • Controller identity

    • Qualify IDs by owner, repository, and PR number:
      github-review-${owner}-${repositoryName}-${number}
  • Regression coverage

    • Verify same-owner, same-number PRs in different repositories receive distinct, correctly qualified controller IDs.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI and others added 3 commits July 27, 2026 08:09
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue adding comments on diff files in multiple PRs Prevent review comment controller collisions across repositories Jul 27, 2026
Copilot AI requested a review from alexr00 July 27, 2026 08:14
@alexr00
alexr00 marked this pull request as ready for review July 29, 2026 09:20
Copilot AI review requested due to automatic review settings July 29, 2026 09:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes a multi-root workspace regression where review comment “+” controls could become unresponsive because multiple vscode.comments controllers were created with colliding IDs across different repositories.

Changes:

  • Corrects ReviewCommentController ID construction to include owner, repositoryName, and PR number (instead of repeating owner twice).
  • Adds a regression test ensuring controllers for same-owner/same-number PRs in different repos produce distinct IDs.
Show a summary per file
File Description
src/view/reviewCommentController.ts Fixes controller ID composition to prevent cross-repo collisions in multi-root workspaces.
src/test/view/reviewCommentController.test.ts Adds coverage asserting controller IDs are correctly qualified and unique across repos.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Low

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to add comments on diff files in workspaces with more than one PR in review

3 participants