Merging from the PR description tab shows "Error refreshing pull request description: Webview is disposed"
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github, typescript, vscode
- Lĩnh vực
- devtools
Hướng nghiên cứu
Bắt đầu từ phần triển khai bảng tổng quan PR và theo dõi refreshPanel(), updateItem() cùng cách xử lý việc hủy bảng; issue chỉ ra mã đã rút gọn trong dist/extension.js làm tài liệu tham khảo. Tái hiện lỗi bằng cách merge từ tab mô tả khi bật hai cài đặt đã nêu, sau đó xác minh rằng việc hủy bảng trong lúc đang chờ làm mới không còn hiển thị lỗi dưới dạng toast, còn lỗi làm mới thực sự vẫn được hiển thị.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.6k
- Fork
- 807
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 75
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/vscode-pull-request-github
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/vscode-pull-request-github#9072 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 53/100
microsoft/vscode-pull-request-github#9142 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
microsoft/vscode-pull-request-github#9141 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
githubIssues.queries is applied to auto-detected linked worktreesCó thể đã có người làm @alexr00 đã nhận 1 ngày trước. Đang mởbug
microsoft/vscode-pull-request-github#9140 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
microsoft/vscode-pull-request-github#9125 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/vscode-pull-request-github
Issue tương tự
-
BeOS .json missingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mihaip/infinite-mac#475 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
marmelab/atomic-crm#401 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Deltares/webgl-streamline-visualizer#83 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ubicloud: usage is an awk syntax error on macOS, which also disables the vCPU quota preflightĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày