PR session shows stale changed-files list after force-push
- 主要语言
- 没有语言数据
- 星标
- 2.1k
- 派生
- 153
- PR 合并指标
- 30 天内没有已合并 PR
描述
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 |
贡献指南
调研方向
从 /chat 基于 worktree 的会话流程开始,追踪 pr_changed_files 和 PR diff 元数据在哪里被填充或缓存。复现 force-push 场景,然后验证当分支 HEAD 发生变化或通过手动刷新时,变更文件列表和 diff 统计信息会更新,且不会保留已移除的文件。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, github
- 领域
- desktop
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100