Skip to content

Make opening a PR overview fast - #8919

Merged
Alex Ross (alexr00) merged 2 commits into
mainfrom
alexr00/big-manatee
Sep 2, 2026
Merged

Make opening a PR overview fast#8919
Alex Ross (alexr00) merged 2 commits into
mainfrom
alexr00/big-manatee

Conversation

@alexr00

Copy link
Copy Markdown
Member

No description provided.

@alexr00 Alex Ross (alexr00) self-assigned this Sep 2, 2026
@alexr00
Alex Ross (alexr00) marked this pull request as ready for review September 2, 2026 12:50
Copilot AI lite review requested due to automatic review settings September 2, 2026 12:50
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) September 2, 2026 12:50

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.

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.update message path so the webview can apply partial PR updates after initialization.
  • Refactor PullRequestOverviewPanel initialization 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.

@alexr00
Alex Ross (alexr00) merged commit f1aee02 into main Sep 2, 2026
7 checks passed
@alexr00
Alex Ross (alexr00) deleted the alexr00/big-manatee branch September 2, 2026 14:58
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.

3 participants