From 4843686eb1f2440a4a31699e3bf49e2cbfecaaae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Jul 2026 08:03:10 +0000 Subject: [PATCH 1/5] Initial plan From 32129b45a342bccd09e21df547a31937200dd924 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Jul 2026 08:09:28 +0000 Subject: [PATCH 2/5] Fix review comment controller IDs across repositories Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/test/view/reviewCommentController.test.ts | 20 +++++++++++++++++++ src/view/reviewCommentController.ts | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/test/view/reviewCommentController.test.ts b/src/test/view/reviewCommentController.test.ts index 12e7e87a32..50369cd51c 100644 --- a/src/test/view/reviewCommentController.test.ts +++ b/src/test/view/reviewCommentController.test.ts @@ -188,6 +188,26 @@ describe('ReviewCommentController', function () { }; } + it('uses unique comment controller IDs for pull requests in different repositories', function () { + const reviewModel = new ReviewModel(); + const firstController = new TestReviewCommentController(reviewManager, manager, repository, reviewModel, gitApiImpl, telemetry); + const otherRemote = new GitHubRemote('test', 'https://github.com/github/other.git', new Protocol('https://github.com/github/other.git'), GitHubServerType.GitHubDotCom); + const otherGitHubRepo = new MockGitHubRepository(otherRemote, credentialStore, telemetry, sinon); + const otherPullRequest = new PullRequestModel( + credentialStore, + telemetry, + otherGitHubRepo, + otherRemote, + convertRESTPullRequestToRawPullRequest(new PullRequestBuilder().build(), otherGitHubRepo), + ); + manager.activePullRequest = otherPullRequest; + const secondController = new TestReviewCommentController(reviewManager, manager, repository, reviewModel, gitApiImpl, telemetry); + + assert.notStrictEqual(firstController.commentController.id, secondController.commentController.id); + firstController.dispose(); + secondController.dispose(); + }); + describe('initializes workspace thread data', async function () { const fileName = 'data/products.json'; const uri = vscode.Uri.parse(`${repository.rootUri.toString()}/${fileName}`); diff --git a/src/view/reviewCommentController.ts b/src/view/reviewCommentController.ts index 36c0641567..6674007e98 100644 --- a/src/view/reviewCommentController.ts +++ b/src/view/reviewCommentController.ts @@ -74,7 +74,7 @@ export class ReviewCommentController extends CommentControllerBase implements Co super(folderRepoManager, telemetry); this._context = this._folderRepoManager.context; this._commentController = this._register(vscode.comments.createCommentController( - `${ReviewCommentController.PREFIX}-${folderRepoManager.activePullRequest?.remote.owner}-${folderRepoManager.activePullRequest?.remote.owner}-${folderRepoManager.activePullRequest!.number}`, + `${ReviewCommentController.PREFIX}-${folderRepoManager.activePullRequest?.remote.owner}-${folderRepoManager.activePullRequest?.remote.repositoryName}-${folderRepoManager.activePullRequest!.number}`, vscode.l10n.t('Pull Request ({0})', folderRepoManager.activePullRequest!.title), )); this._commentController.commentingRangeProvider = this as vscode.CommentingRangeProvider; From 61426b1723468e33fb74d7f05ba6b0b5f87d578c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Jul 2026 08:11:06 +0000 Subject: [PATCH 3/5] Strengthen review controller ID regression test Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/test/view/reviewCommentController.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/view/reviewCommentController.test.ts b/src/test/view/reviewCommentController.test.ts index 50369cd51c..6df4fccbc0 100644 --- a/src/test/view/reviewCommentController.test.ts +++ b/src/test/view/reviewCommentController.test.ts @@ -203,6 +203,8 @@ describe('ReviewCommentController', function () { manager.activePullRequest = otherPullRequest; const secondController = new TestReviewCommentController(reviewManager, manager, repository, reviewModel, gitApiImpl, telemetry); + assert.strictEqual(firstController.commentController.id, `${ReviewCommentController.PREFIX}-${remote.owner}-${remote.repositoryName}-${activePullRequest.number}`); + assert.strictEqual(secondController.commentController.id, `${ReviewCommentController.PREFIX}-${otherRemote.owner}-${otherRemote.repositoryName}-${otherPullRequest.number}`); assert.notStrictEqual(firstController.commentController.id, secondController.commentController.id); firstController.dispose(); secondController.dispose(); From e152f8704f494f17ff09fe2afd0a4032f260f2ea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Jul 2026 08:12:39 +0000 Subject: [PATCH 4/5] Use active PR consistently for controller ID Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/view/reviewCommentController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/reviewCommentController.ts b/src/view/reviewCommentController.ts index 6674007e98..81c4d0df4c 100644 --- a/src/view/reviewCommentController.ts +++ b/src/view/reviewCommentController.ts @@ -74,7 +74,7 @@ export class ReviewCommentController extends CommentControllerBase implements Co super(folderRepoManager, telemetry); this._context = this._folderRepoManager.context; this._commentController = this._register(vscode.comments.createCommentController( - `${ReviewCommentController.PREFIX}-${folderRepoManager.activePullRequest?.remote.owner}-${folderRepoManager.activePullRequest?.remote.repositoryName}-${folderRepoManager.activePullRequest!.number}`, + `${ReviewCommentController.PREFIX}-${folderRepoManager.activePullRequest!.remote.owner}-${folderRepoManager.activePullRequest!.remote.repositoryName}-${folderRepoManager.activePullRequest!.number}`, vscode.l10n.t('Pull Request ({0})', folderRepoManager.activePullRequest!.title), )); this._commentController.commentingRangeProvider = this as vscode.CommentingRangeProvider; From 6ef29b5227dc66932b96a2e6fac29e741b963c29 Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:20:08 +0200 Subject: [PATCH 5/5] Attestation commit