Make opening a PR overview fast - #8919
Merged
Merged
Conversation
Alex Ross (alexr00)
marked this pull request as ready for review
September 2, 2026 12:50
Alex Ross (alexr00)
enabled auto-merge (squash)
September 2, 2026 12:50
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes are well-covered by targeted tests and the deferred-update flow is implemented consistently across host and webview code paths.
Review tier: Lite
Findings: None
What changed in this PR
This PR improves perceived performance when opening the Pull Request Overview by sending an initial lightweight pr.initialize payload quickly and deferring slower/secondary data loads via incremental pr.update messages, while also making diff-link processing lazily compute its hash map only when needed.
Changes:
- Add a new
pr.updatemessage path so the webview can apply partial PR updates after initialization. - Refactor
PullRequestOverviewPanelinitialization to defer slower data (status checks, reviewers, mergeability, timeline) and coalesce updates during initialization. - Make diff-link processing accept a lazy hash-map provider and ensure it’s resolved at most once per processing pass.
| File | Description |
|---|---|
| webviews/editorWebview/test/overview.test.tsx | Adds a unit test ensuring deferred pr.update messages merge into existing PR state. |
| webviews/common/context.tsx | Handles pr.update messages by merging partial PR updates into the current context. |
| src/test/github/pullRequestOverview.test.ts | Adds coverage for coalescing updates during initialization and avoiding stale timeline posts. |
| src/test/common/utils.test.ts | Adds coverage for lazy diff-hash-map resolution behavior (no resolution when unnecessary; single resolution for multiple links). |
| src/github/utils.ts | Updates processDiffLinks API to support a lazy hash-map provider. |
| src/github/pullRequestOverview.ts | Defers expensive PR overview data loads, introduces incremental pr.update posts, and lazily computes diff-link hash maps. |
| src/github/issueOverview.ts | Parallelizes body permalink processing and timeline processing during initialization. |
| src/common/utils.ts | Updates core processDiffLinks to support lazily-resolved hash maps with single-resolution caching per call. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sandeep Somavarapu (sandy081)
approved these changes
Sep 2, 2026
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.
No description provided.