Repository navigation
工作台显示 PR 状态和整份 PR 的文件变动 - #185
Merged
Merged
Conversation
The sidebar reads one gh pr view, and prefix+f opens GitHub's Files changed list so a clean worktree still shows what the pull request changed. Co-authored-by: Cursor <cursoragent@cursor.com>
The panel header now shows review, merge, and the diff size that the narrow sidebar clips. File pages are read separately so a capture cut at 1 MiB does not turn the whole list into unknown. Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
|
QA 说得对,两处重要问题和两处次要问题都已按 head 3afc32e 改掉。 侧边栏最宽 36 列,第二行仍然只能看到编号、状态和 checks 的开头。完整的 review、能否合并和增删统计现在画在 PR 面板抬头,窄的时候按 文件列表改成按页读取。一页超过 1 MiB 被裁切时,保留已经读完的文件,以及 patch 被从中切断的那一个,并标成截断、大小未知;不再把整份列表变成 unknown。GitHub 没给 patch 时写成 no patch,不再一律叫 binary。
下一步:等独立 QA 对当前 head 3afc32e 再审。 |
Keep prefix+f for the pull request panel together with copy-on-select from main. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
选中 worktree 时,第二行改成一次只读
gh pr view的结果:编号、draft/open/merged/closed、checks、review、能否合并、文件数和增删行。没有 PR 写no pr;gh没装、没登录或网络失败写unknown和原因,不按分支名猜测。ctrl+b然后f(prefix+f,不占用现有 herdr 前缀键)打开 PR 面板,列出 GitHub Files changed 的净差异。回车看该文件的 patch,Esc 返回。重命名显示旧路径到新路径。GitHub 不返回 patch 的文件标成 binary,不补本地 diff。面板不能 Approve、Merge 或评论。Refs #182
验收标准
gh返回 3 个 commit、同一路径一行,patch 含+final、不含+intermediate。gone.txt,实现也不从本地 commit 补文件。R old/path.rs → src/new.rs。gh缺失、未登录、网络失败都有原因,不猜测。gh写操作。pr merge/pr comment/pr review仍被只读白名单拒绝;假gh日志里没有这些子命令。gh锁住 draft、checks 失败、冲突、无 PR、gh失败,以及上面的文件形状。gh对一个多 commit PR 对过编号、checks 和文件列表。没有这次走查,保持 pending。证据(Validation)
被忽略的那一项是原来就有的
crates/viva/src/update/tests.rs:「downloads a real public release」,这次没有跑,不算通过。git diff --check无输出,退出码 0。假
gh覆盖的测试包括git::pr::tests::gh_misses_stay_distinct_and_do_not_guess_a_pull_request、fake_gh_locks_draft_failing_checks_and_a_merge_conflict、files_are_the_net_github_list_with_rename_and_bounds,以及server::v15_tests::pr_change_set_uses_github_files_and_does_not_write。写解析器时用真实
gh pr view 163和gh api repos/zuohaisu/viva/pulls/163/files对过字段名(reviewDecision、changedFiles、statusCheckRollup、previous_filename)。这不是工作台走查,上面的验收项仍然 pending。风险与安全边界(Risk/Safety Boundaries)
只读
gh。GET repos/{owner}/{repo}/pulls/{n}/files加入 evidence 白名单;pr merge、pr comment、pr review以及其他写操作仍然在入口拒绝。gh调用前放开数据库锁。文件列表按 PR head SHA 缓存,head 变了就重拉。合并后删除 worktree 仍要当场复查为
merged,不看侧边栏缓存。PR 不改任何版本号,不发版,面板不提供批准或合并。未验证项(Known Limitations)
本机用真实
gh打开工作台、对一个多 commit PR 核对编号、checks 和文件列表,还没有做。按 issue,这项由 owner 在合并之后走查。默认侧边栏宽 26 列,拖到上限 36 列也放不下整行。PR 摘要放在第二行最前面,窄栏里先看到编号、状态和 checks;完整一行在 PR 面板抬头。
按单个 commit 翻 diff、行内评论、从面板合并或批准,都不在这次。