查看哪些内容需要审阅
在一处集中查看各 agent 的 worktree 及其未提交的改动。审阅有风险的改动,排查需要修复的问题,并直接在 Changes 页面提交代码。
本指南使用 Panolayer 的 Twitter 示例 twitter-starter。如果你已经跟着用 Panolayer 修复第一个 bug操作过,可以用这些步骤审阅删除修复。
截图和短视频展示了同一个 Twitter 应用中的多项改动,包括格式、搜索、导出和已保存帖子的改动。你的文件列表、风险评分和提交 ID 取决于你正在审阅的工作。点击截图可查看完整尺寸。
在侧边栏中打开 Changes。在右侧,你可以看到不同的 worktree 以及各 agent 未提交的代码。选择一个 worktree 即可查看该 agent 改动了什么,文件按风险从高到低评分排列。
在各 agent 的 worktree 之间切换,审阅它们的改动,并在此页面提交代码。风险评分让你能快速看出哪些文件需要关注、可能需要修复。
你也可以在 History 中选择已有的提交,审阅当时记录的内容。如果你已经合并了删除修复,可以在那里找到它;该合并已在本地记录了这次改动。
按风险从高到低审阅改动
Changes 会按从有风险到无风险为文件评分,并说明改动了什么。先看风险最高的文件,了解提交前哪些内容需要审阅、可能需要修复。
在 Risk Spectrum、Risk Bars 和 Overlap 之间切换,以三种可视化视图探索同一批改动。
Risk Spectrum
变更文件沿水平光谱排列,左侧为高风险,右侧为低风险。
Risk Bars
以按风险排序的条形图对比文件。视图从风险很高到无风险排列,便于看出哪些改动需要关注。
Overlap
查看 UI 改动、逻辑改动和风险改动在哪些地方重叠。分组后的文件展示了这些改动部分之间的相互关系。
检查需要关注的变更
风险概览会指出应重点审查的位置。当你想更详细地了解某处具体变更时,打开对应文件。
- 在关系图或变更文件列表中选择一个文件。
- 阅读其路径、变更摘要和风险说明。
- 选择 Split 进行并排对比,或选择 Inline 在单一视图中阅读变更。
- 沿相关函数及其调用方追踪该变更。同时检查相关测试、配置和依赖文件。
对于删除问题的修复,打开 components/Post.tsx 并检查 handleDelete()。确认该变更如何处理所报告的 canDelete 条件,以及用户确认、删除请求和成功响应处理放在一起是否仍然合理。
阅读分析并就疑点提问
Panolayer Agent 的深度分析在 Changes 中始终可用。打开 Panolayer Agent – Deep Analysis 面板,阅读其评估、疑点和来源引用。从某个疑点跳转到相关文件,了解需要关注的内容。
现有分析片段展示了 Twitter 应用中的一处导出变更,其中的疑点与受影响的文件相关联。
使用 Chat 与 Panolayer Agent 继续审查。提出与你正在检查的行为相关的问题,例如:
“这个变更如何修复删除问题?哪些测试覆盖了预期行为?”
利用回答来定位变更,并排查任何不清楚的地方。
在审查的同时阅读验证结果
Changes 可以在受影响的函数上显示验证结果。阅读失败的规则以及仍处于待处理或不可用状态的检查,然后顺着其说明进入代码。
风险概览帮助你确定查看的位置。深度分析提供可供排查的疑点。验证会报告针对代码行为预期的检查结果。请将它们与差异和相关测试结合阅读。
对于删除示例,确认所选失败已被修复,并将新增失败与既有问题分开审查。有关摘要字段和状态,请参阅了解验证结果。
当变更需要运行时检查时,请运行应用。对于此修复,尝试删除一条帖子,并检查确认或取消操作是否符合预期。
Merge the agent’s work when you’re satisfied
When the agent requests a merge, review the verification summary and confirm the target branch. Choose Not now to keep reviewing, or Merge into main to bring the work into the sample’s main branch.
The Merged into main confirmation shows the commit ID. This workflow records the agent’s change in local Git history; you do not need to commit that same change again.
Commit any uncommitted edits
Use this step for your own edits or other uncommitted work in the current workspace. If the agent’s merge already saved the change and you have no further edits, continue to History.
- Check the full changed-file list.
- Review the suggested commit message. Use Edit message if it needs to describe the change more clearly.
- Choose Commit to save the changes to the local branch. Choose Commit & Push if you also want to send the commit to a configured remote.
A Panolayer commit includes every changed file in the workspace. Use Git directly if you need to stage only part of the change. Read any reported check failures before deciding to commit; a commit can still be created when checks fail.
Confirm the result in History
Open History and find the new commit using its message, author, and commit ID. Select it to inspect the recorded change, then return to Working tree to check for remaining uncommitted edits.
Watch: Confirm a Twitter saved-post change in merge confirmation and History
This existing clip follows a saved-post change in the Twitter app. Use the commit ID from your own merge confirmation to find your change.
For the deletion fix, you should be able to find its recorded change and inspect the files that landed. Check that no unexpected uncommitted edits remain.
Push when you’re ready to share the commit
A merge or commit saves work locally. To send an existing local commit to your Git remote, open Git and choose Push.
Pushing requires a configured remote and permission to write to it. If the sample has no remote, the local commit completes this walkthrough. If a push reports an error, read it and resolve the remote or sign-in problem before trying again.
Use your Git host for pull requests and team review.