Merging from the PR description tab shows "Error refreshing pull request description: Webview is disposed"
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github, typescript, vscode
- Domain
- devtools
Research direction
Start in the PR overview panel implementation and trace refreshPanel(), updateItem(), and the panel’s disposal handling; the issue identifies the minified code in dist/extension.js as a reference. Reproduce by merging from the description tab with the two stated settings enabled, then verify disposal during an awaited refresh no longer shows an error toast while genuine refresh errors still do.
Written by the indexing model from the issue text.
Description
Bug. After merging a PR from the PR description tab, VS Code shows the error toast Error refreshing pull request description: Webview is disposed. The merge itself, the branch deletion and the checkout all succeed; the tab was going to close anyway, so the toast is noise.
Steps
- Set
"githubPullRequests.deleteBranchAfterMerge": trueand"githubPullRequests.postDone": "checkoutDefaultBranchAndPull". - Check out a PR branch and open its description tab.
- Merge the PR from the tab.
Expected: the tab closes with no notification.
Actual: the tab closes and the error toast appears every time.
Cause (read from the code, not stepped through). the PR overview panel's refreshPanel() (minified in dist/extension.js, v0.174.0) checks this._panel.visible and this._refreshing once, then awaits resolveModel(...) and updateItem(...); its catch shows the toast:
async refreshPanel() {
if (!(!this._panel.visible || this._refreshing)) {
this._refreshing = true;
try {
const e = await this.resolveModel(this._identity);
if (!e) throw new Error(`Failed to resolve Pull Request #...`);
await this.updateItem(e);
} catch (e) {
window.showErrorMessage(`Error refreshing pull request description: ${...}`);
} finally { this._refreshing = false; }
}
}
After a merge the extension disposes the panel (PR done, branch deleted, default branch checked out) while a refresh that started earlier is still awaiting the model. When it resumes, updateItem posts to a disposed webview and throws.
Suggested fix. Track disposal (an onDidDispose flag, or re-check the panel after each await) and return quietly instead of calling showErrorMessage when the panel is gone. Related closed reports with the same message but other triggers: #2444, #4847, #5037.
Environment: extension 0.174.0, VS Code 1.144.0, Windows 11.
- Dominant language
- TypeScript
- Stars
- 2.6k
- Forks
- 811
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 69
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-pull-request-github
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/vscode-pull-request-github#9159 ·
Maintainers usually reply within 1 day
-
Honor open-to-side placement when opening GitHub PR and issue linksPossibly taken @alexr00 claimed this 2 days ago. Openfeature-request
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
microsoft/vscode-pull-request-github#9072 · 1 reaction · 2 assignees ·
Maintainers usually reply within 1 day
-
Resolve Conflicts doesn’t open in VS Code Desktop with a GitHub Remote RepositoryPossibly taken @alexr00 claimed this 1 day ago. Open
microsoft/vscode-pull-request-github#9158 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Checkout Pull Request in Worktree still fetches fork head from base remote in 0.174.0Possibly taken @alexr00 claimed this 1 day ago. Open
microsoft/vscode-pull-request-github#9156 · 1 assignee ·
Maintainers usually reply within 1 day
-
Show loading feedback while Comment and Resolve is resolving a threadPossibly taken @alexr00 claimed this 1 day ago. Open
microsoft/vscode-pull-request-github#9155 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in microsoft/vscode-pull-request-github
Similar issues
-
apps/stage-web bug env/os-linux pending triage scope/audio-output
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
reproduced
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anomalyco/opencode#61640 · 1 comment ·
Maintainers usually reply within 1 day
-
scope: data grid status: waiting for maintainer
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
ai-driven-fuzzing bug Minor
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
ai-driven-fuzzing bug claude Minor
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
linagora/twake-calendar-frontend#1944 ·
Maintainers usually reply within 1 day