Skip to content

🐛 Load descriptions before the first overview render - #9054

Open
John Wooten (JFWooten4) wants to merge 6 commits into
microsoft:mainfrom
JFWooten4:pr-description
Open

John Wooten (JFWooten4) wants to merge 6 commits into
microsoft:mainfrom
JFWooten4:pr-description

Conversation

@JFWooten4

Copy link
Copy Markdown

Possibly related to #9049: pull request descriptions load after the overview is initially rendered, so descriptions appear blank.

Screenshot 2026-10-11 at 3 48 31 PM
Output
axListenersExceededWarning: Possible EventEmitter memory leak detected. 11 quoteReply listeners added. Use emitter.setMaxListeners() to increase limit
    at _addListener (webview-pr-description.js:2896:21433)
    at EventEmitter.addListener (webview-pr-description.js:2896:21738)
    at AddComment (webview-pr-description.js:2911:7763)
    at oh (webview-pr-description.js:672:52433)
    at di (webview-pr-description.js:672:61905)
    at Rj (webview-pr-description.js:674:9375)
    at Qj (webview-pr-description.js:674:950)
    at Kj (webview-pr-description.js:674:853)
    at yj (webview-pr-description.js:672:89461)
    at webview-pr-description.js:672:38939
ProcessEmitWarning @ webview-pr-description.js:2896
_addListener @ webview-pr-description.js:2896
addListener @ webview-pr-description.js:2896
AddComment @ webview-pr-description.js:2911
oh @ webview-pr-description.js:672
di @ webview-pr-description.js:672
Rj @ webview-pr-description.js:674
Qj @ webview-pr-description.js:674
Kj @ webview-pr-description.js:674
yj @ webview-pr-description.js:672
(anonymous) @ webview-pr-description.js:672
M.unstable_runWithPriority @ webview-pr-description.js:2903
cg @ webview-pr-description.js:672
fg @ webview-pr-description.js:672
gg @ webview-pr-description.js:672
Ig @ webview-pr-description.js:672
zh @ webview-pr-description.js:672
(anonymous) @ webview-pr-description.js:2904
(anonymous) @ webview-pr-description.js:2904
handleMessage @ webview-pr-description.js:2904
postMessage
(anonymous) @ index.html?id=63975aeb-badc-4f2b-a95c-04c4e8641f6f&parentId=2&origin=88970d2d-44af-44bb-8f27-21ec8edb847a&swVersion=6&extensionId=GitHub.vscode-pull-request-github&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app:1250
HostMessaging.channel.port1.onmessage @ index.html?id=63975aeb-badc-4f2b-a95c-04c4e8641f6f&parentId=2&origin=88970d2d-44af-44bb-8f27-21ec8edb847a&swVersion=6&extensionId=GitHub.vscode-pull-request-github&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app:304
postMessage
doPostMessage @ webviewElement.ts:588
_send @ webviewElement.ts:408
postMessage @ webviewElement.ts:399
postMessage @ overlayWebview.ts:391
$postMessage @ mainThreadWebviews.ts:72
_doInvokeHandler @ rpcProtocol.ts:458
_invokeHandler @ rpcProtocol.ts:443
_receiveRequest @ rpcProtocol.ts:370
_receiveOneMessage @ rpcProtocol.ts:297
(anonymous) @ rpcProtocol.ts:159
_deliver @ event.ts:1391
fire @ event.ts:1422
fire @ ipc.net.ts:658
(anonymous) @ localProcessExtensionHost.ts:436

The changes also guards against stale asynchronous results to prevent outdated data from updating a closed or superseded overview.

Co-authored-by: Codex <noreply@openai.com>
Discard description and initialization results after an overview closes or a newer request replaces it, and add GraphQL hydration and race regression coverage.

Co-authored-by: Codex Web <noreply@openai.com>
Copilot AI balanced review requested due to automatic review settings October 11, 2026 20:19

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.

🟢 Approval recommended

The implementation addresses the blank-description race with focused safeguards and comprehensive regression tests.

0 open findings

What changed in this PR

Ensures pull request descriptions are hydrated before the overview’s initial render while preventing stale asynchronous updates.

Changes:

  • Fetches missing rendered description HTML before initialization.
  • Adds stale-update and disposal guards.
  • Adds regression coverage for hydration, failures, and races.
File Description
src/​github/​pullRequestOverview.ts Hydrates descriptions and guards asynchronous updates.
src/​test/​github/​pullRequestOverview.test.ts Covers description loading and stale-result scenarios.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@JFWooten4 John Wooten (JFWooten4) left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@microsoft-github-policy-service agree

Integrate description hydration and stale-update guards with the latest upstream stack-prefetch workflow. Retain upstream changes and carry forward description and race regression tests.

Co-authored-by: ChatGPT 6 <noreply@openai.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 22:26

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.

🟡 Changes recommended

The cached-model lookup can overwrite newer descriptions before freshness checks and preserve whitespace-only HTML, causing stale or blank pull request descriptions.

2 open issues

Review effort: Balanced

Comment thread src/github/pullRequestOverview.ts Resolved
Comment thread src/github/pullRequestOverview.ts Resolved
The PR adds regression coverage for loading description HTML before initialization and ignoring stale asynchronous overview loads. Upstream adds branch-label coverage for single and multiple repositories and forked pull requests at the same insertion point. Preserve both independent test groups so the description fix and the newer overview labels remain covered.

Validation: TypeScript test compilation and all three webpack targets pass; 1,379 extension tests, 130 webview tests and 75 script tests pass.
Copilot AI balanced review requested due to automatic review settings November 16, 2026 12:12

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.

🔵 Needs a closer look

Cached models retain whitespace-only bodyHTML even after successful hydration, leaving descriptions blank, and the regression test bypasses the cached-model update path.

2 open issues

Review effort: Balanced

Co-authored-by: Codex <noreply@openai.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 18:20
@JFWooten4

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

🟢 Approval recommended

No active review issues block the changes to load missing descriptions and guard against stale asynchronous updates.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

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.

2 participants