Merging from the PR description tab shows "Error refreshing pull request description: Webview is disposed"
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 74/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github, typescript, vscode
- Ambito
- devtools
Direzione di ricerca
Inizia dall’implementazione del pannello di riepilogo della PR e segui refreshPanel(), updateItem() e la gestione dello smaltimento del pannello; l’issue indica come riferimento il codice minificato in dist/extension.js. Riproduci il problema eseguendo il merge dalla scheda di descrizione con le due impostazioni indicate abilitate, quindi verifica che lo smaltimento durante un aggiornamento in attesa non mostri più un errore come notifica toast, mentre gli errori reali di aggiornamento continuino a essere mostrati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 2.6k
- Fork
- 811
- Merge medio
- 1g 5h
- PR unite (30g)
- 65
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/vscode-pull-request-github
-
feature-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
microsoft/vscode-pull-request-github#9072 · 1 reazione · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
Checkout Pull Request in Worktree still fetches fork head from base remote in 0.174.0Forse già presa @alexr00 l’ha presa 1 giorno fa. Aperta
microsoft/vscode-pull-request-github#9156 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Show loading feedback while Comment and Resolve is resolving a threadForse già presa @alexr00 l’ha presa 1 giorno fa. Aperta
microsoft/vscode-pull-request-github#9155 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Issues attached as context are invisible to CopilotForse già presa @alexr00 l’ha presa 1 giorno fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 53/100
microsoft/vscode-pull-request-github#9142 · 1 commento · 1 reazione · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
info-needed
Difficoltà 4/5 1-2 giorni Idoneità per principianti 55/100
microsoft/vscode-pull-request-github#9141 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/vscode-pull-request-github
Issue simili
-
needs investigation
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Makefile names visualizer gate targets that do not exist; the TS packages have no test runnerApertaarea:visualizer tech-debt
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 66/100
jmbarzee/temporal-architect#292 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
riverqueue/river#1576 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
colbymchenry/codegraph#3228 ·
I maintainer di solito rispondono entro 1 giorno