feat(review): 单 run 聚合只读审查入口(#1967 部分交付) - #1975
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
DeliciousBuding
force-pushed
the
feat/run-level-review
branch
from
August 25, 2026 05:26
ef854a9 to
fa9bd4e
Compare
Co-authored-by: Claude Code <claude@vectorcontrol.tech>
Co-authored-by: Claude Code <claude@vectorcontrol.tech>
Co-authored-by: Claude Code <claude@vectorcontrol.tech>
Co-authored-by: Claude Code <claude@vectorcontrol.tech>
Co-authored-by: Codex <codex@vectorcontrol.tech>
DeliciousBuding
force-pushed
the
feat/run-level-review
branch
from
August 25, 2026 06:03
3d75229 to
42841ef
Compare
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.
概要
#1967 的部分交付:审批摘要条新增变更查看入口,但当前只提供诚实的只读聚合视图,不声称可以从 ConversationHost 真实批准/驳回工作区变更。
本次修复收紧了接管审计发现的四项阻断:
evidenceRefs[kind=run].id为硬边界,只选择当前/最新的一个 run,禁止把 active conversation 内多个 run 的file_change混成“本次运行”。workDir;禁止借用当前 composer workDir 猜测。因此聚合面传入显式readOnly,隐藏 run/file/hunk 全部 accept/reject 控件,不再把本地 hunk 标记伪装成真实写回。Web 同样只读。DiffReviewPanel的真实 apply 合同:run 级批量提交前快照 mixed hunk 状态,失败时精确恢复;onAcceptRun/onRejectRun仅在异步 apply 成功后触发。file_change按editId(缺失时按 event id)保留唯一片段,并对重放的相同 hunk 去重;后续不完整事件不会覆盖掉早期 patch snippet。能力边界
DiffReviewPanel仍保留可信宿主接入runId + onApplyAllHunks后的真实批量 apply 合同,并补精确回滚/回调时序测试。workDir,且本 PR 不用 composer 当前目录猜测。主要改动
app/shared/src/transcript/runChangeAggregate.tsselectRunReview:current/latest 单-run选择、legacy scope。app/shared/src/ui/DiffReviewPanel*readOnly隐藏全部写回动作。app/shared/src/ui/RunReviewOverlay*app/workbench/src/ConversationHost.tsxapp/workbench/src/inspector/FilePreviewRouter.tsxrunId + workDir + PreviewPort路径不变。docs/component-acceptance.md验证
pnpm -C app/shared test --run src/transcript/runChangeAggregate.test.ts src/ui/DiffReviewPanel.test.tsx src/ui/RunReviewOverlay.test.tsx src/chatview/i18n/resources.test.ts --no-file-parallelism --maxWorkers=1pnpm -C app/workbench test --run src/__tests__/runReview.test.tsx src/inspector/FilePreviewRouter.apply.test.tsx --no-file-parallelism --maxWorkers=1pnpm -C app/shared typecheck✅pnpm -C app/workbench typecheck✅python scripts/verify/verify-doc-ssot.py✅git diff --check✅未运行 Playwright / Visual QA / packaged Desktop;未执行真实 Local Edge 写回验证。
real_tested=false
Relates #1967