Conversation
Member
|
Suggested edit: diff --git a/src/github/pullRequestModel.ts b/src/github/pullRequestModel.ts
index 498ee7f3..c920a1c6 100644
--- a/src/github/pullRequestModel.ts
+++ b/src/github/pullRequestModel.ts
@@ -783,7 +783,7 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
this.diffThreads(reviewThreads);
this._reviewThreadsCache = reviewThreads;
-
+ this._onDidChangeReviewThreads.fire({ added: reviewThreads, changed: [], removed: [] });
return reviewThreads;
} catch (e) {
Logger.appendLine(`Failed to get pull request review comments: ${e}`);
|
alexr00
requested changes
Jul 11, 2022
Member
alexr00
left a comment
There was a problem hiding this comment.
There's one change I suggested to fix a bug that this reveal, otherwise looks good.
| await this.pullRequestModel.initializeReviewThreadCache(); | ||
| await this.pullRequestModel.initializePullRequestFileViewState(); | ||
| this._fileChanges = await this.resolveFileChangeNodes(); | ||
| [, , this._fileChanges, ,] = await Promise.all([ |
Member
There was a problem hiding this comment.
I did a quick bit of testing of this, and I noticed that the little speech bubble character that we use as a file decoration for files with comments was no longer showing with this change. I suggested an edit that fixes the issue. This was a long standing bug that was only just revealed now that these methods are run in parallel. In short, this method was getting called when the comments threads changed, but not when they were originally set:
vscode-pull-request-github/src/view/treeDecorationProvider.ts
Lines 12 to 19 in 4c077d1
alexr00
approved these changes
Jul 13, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All 5 requests are now performed in parallel. I have not seen any reason why they should have some sort of dependency between each other. By paralyzing the requests, a 3-4-fold speedup can be gained. It's now also caching the current user by accessing the
CredentialStore