Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Merging from the PR description tab shows "Error refreshing pull request description: Webview is disposed"

Abierto Apto para principiantes
#9,143 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github, typescript, vscode
Área
devtools

Línea de trabajo

Empieza por la implementación del panel de resumen del PR y sigue refreshPanel(), updateItem() y la gestión de la eliminación del panel; el issue señala el código minificado de dist/extension.js como referencia. Reproduce el problema fusionando desde la pestaña de descripción con las dos opciones indicadas activadas y, después, verifica que la eliminación durante una actualización pendiente ya no muestre un error como notificación toast, mientras que los errores reales de actualización sí lo sigan mostrando.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

  1. Set "githubPullRequests.deleteBranchAfterMerge": true and "githubPullRequests.postDone": "checkoutDefaultBranchAndPull".
  2. Check out a PR branch and open its description tab.
  3. 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.

Lenguaje dominante
TypeScript
Estrellas
2.6k
Forks
807
Merge medio
1 d 21 h
PR fusionados (30 d)
70

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/vscode-pull-request-github

Todos los issues de microsoft/vscode-pull-request-github

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.