github / github/app

PR session shows stale changed-files list after force-push

Đang mở
#1,880 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Bugs
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
2.1k
Fork
153
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

PR session shows stale changed-files list after force-push

When reviewing a PR in a worktree-backed session, the file list shown in the app (pr_changed_files in session context) is not updated after the PR branch is force-pushed.

This causes:

- The app UI continues to show files that are no longer part of the PR diff (e.g., a file removed via force-push still appears in the changed files panel).
- The agent receives stale pr_changed_files metadata, leading to incorrect file counts and failed review comment attempts on files no longer in the diff.
- git pull reports "Already up to date" because the local worktree already matches the remote HEAD — the issue is purely in the app's cached PR metadata.

Repro:

- Open a PR session for a PR with N files changed.
- On GitHub (or via CLI outside the session), force-push (not sure if force is required) the PR branch removing one of the changed files.
- Observe the app still shows N files instead of N-1.
Expected: The app should refresh PR metadata (changed files, diff stat) when the branch HEAD changes, or provide a manual "refresh" action.

---
| Field | Value |
| --- | --- |
| App version | 1.0.18 |
| OS | Windows 10.0.26310 |
| Theme | GitHub |
| Path | /chat |
| Tenure | Week 3 |

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start at the /chat worktree-backed session flow and trace where pr_changed_files and PR diff metadata are populated or cached. Reproduce the force-push scenario, then verify that the changed-files list and diff statistics update when the branch HEAD changes or through a manual refresh, without retaining removed files.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
git, github
Lĩnh vực
desktop
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.