Approve and resolve act on the wrong folder when a repository and its worktrees are open in one window
Maintainer thường phản hồi trong vòng 1 ngày
@alexr00 đang làm issue này rồi.
Từ ngày 19/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
- Extension version: 0.166.1
- VSCode Version: 1.138.0 (Windows client, WSL 2 remote)
- OS: Windows 11 host, Ubuntu on WSL 2 running the extension host
- Repository Clone Configuration: single repository, with eight git worktrees under
worktrees/opened as additional repositories viagit.autoRepositoryDetection: "subFolders"andgit.scanRepositories - GitHub Product: GitHub.com
When several open folders are checkouts of the same GitHub repository (a repository plus its worktrees, each on a different pull request branch), two actions go to the wrong folder:
1. Approving from the pull request overview fails although the checkout is in sync.
Opening a description resolves the folder manager by owner and repository name (RepositoriesManager.getManagerForRepository) and takes the first folder with that remote, not the folder the clicked node belongs to. The overview panel is bound to that folder, so PullRequestModel.approve compares another worktree's checked out HEAD with the pull request's remote head and rejects with:
Submitting review failed. The remote head of the pull request branch has changed. Please pull the latest changes from the remote branch before approving.
Which folder is "first" depends on repository discovery order, so the same setup can work in one window and fail after a reload. Approving from the sidebar's active pull request view works, because ReviewManager passes its own folder manager.
2. Resolving a comment thread on the left side of a diff appears to do nothing.
Every ReviewCommentController.hasCommentThread returns true for any review: scheme thread, and resolveCommentHandler picks the handler with the longest root path, so a worktree's controller handles a thread from the main repository. It calls resolveReviewThread on its own pull request model, which does not know the thread. The GitHub mutation still runs (the thread is resolved on github.com), but no change event fires and the editor never updates.
Steps to Reproduce:
- Open a repository root as the workspace folder. Add worktrees under
worktrees/2,worktrees/3, ... and list them ingit.scanRepositoriesso the git extension opens them; check out a different open pull request branch in each. - In the "Changes in Pull Request" view of a worktree that is not the first discovered folder, click the description node and press Approve in the overview. Observe the "remote head ... has changed" error even though
git statusshows the branch in sync with its upstream. - In the same window, open a file diff from the main repository's changes view and click Resolve Conversation on a thread shown in the left editor. Observe that nothing changes in the editor, while the thread is resolved on github.com.
Fix proposed in #8967: resolve the folder from the pull request model (the folder whose GitHub repository owns the model, then the folder that has the pull request checked out, then the remote match), and have review controllers only claim review: threads whose recorded root path is their own repository.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.6k
- Fork
- 796
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 36
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. 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
-
PR overview remains stuck checking mergeability after an UNKNOWN responseCó thể đã có người làm @alexr00 đã nhận 2 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/vscode-pull-request-github#8953 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Issue 3 — DocumentationĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/vscode-pull-request-github#8792 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Run: Use multiple accounts per host, including GitHub.comCó thể đã có người làm @TylerLeonhardt đã nhận 1 ngày trước. Đang mởauthentication feature-request GitHubEnterprise
microsoft/vscode-pull-request-github#9005 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Walk: Use multiple GitHub Enterprise instances concurrentlyCó thể đã có người làm @TylerLeonhardt đã nhận 1 ngày trước. Đang mởauthentication feature-request GitHubEnterprise
microsoft/vscode-pull-request-github#9004 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
BachalorĐang mở~spam
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
microsoft/vscode-pull-request-github#8986 · 1 bình luận ·
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ự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
betagouv/mon-entreprise#4699 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jaegertracing/jaeger-ui#4547 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
linagora/twake-calendar-frontend#1467 ·
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 78/100
need4deed-org/sdk#267 ·
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 84/100
auth0/universal-login#414 ·
Maintainer thường phản hồi trong vòng 1 ngày