fix(pi): align session tree indentation - #3459
Conversation
Signed-off-by: Lijialuo <lijialuo@xd.com>
|
| Filename | Overview |
|---|---|
| apps/desktop/src/renderer/features/cc-agent/SessionBranchTreeDialog.tsx | 新缩进递归会把分叉分支的首个后续单子节点再次右移,未完全实现描述中的链式对齐。 |
| apps/mobile/src/session/PiSessionTreeSheet.tsx | 与 Desktop 复制了相同的深度计算,因此存在相同的分叉后链式过度缩进。 |
Prompt To Fix All With AI
### Issue 1
apps/desktop/src/renderer/features/cc-agent/SessionBranchTreeDialog.tsx:152-153
**分叉后链条重复缩进**
当真实分叉的任一分支节点继续拥有单个子节点时,`justBranched` 已描述当前节点是分叉后的第一代,但这里又将其子节点的深度加一,导致后续整条单子节点链额外右移一级;Mobile 中的相同计算也会产生同样的对齐错误。
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "fix(pi): align session tree indentation" | Re-trigger Greptile
|
@JeromeLee-ljl 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/renderer/features/cc-agent/SessionBranchTreeDialog.tsx),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
|
这个 PR 改了 Desktop / Mobile 的 Pi 会话树缩进展示,需要维护者确认后再继续落地。 请维护者直接在本 PR 上 Approve;如果要改,请 Request Changes。讨论 issue:#3465 |
|
命中 UI 路径但 description 未附界面效果证据。建议补充改动后效果:截图/录屏,或改动后界面的 HTML 页面(```html 代码块、.html 附件或在线预览链接),便于确认界面符合 DESIGN.md。 |
1f5c2a5 to
23e3a39
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f5c2a5450
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@JeromeLee-ljl 👋 这个 PR 还有 1 条 review conversation 没 resolve(apps/desktop/src/renderer/features/cc-agent/SessionBranchTreeDialog.tsx),auto-review 因此暂时跳过、没法继续审查 / 合并。 如果你已经按评论改完或回应了,请到对应 thread 上点 Resolve conversation;全部 resolve 后,下一轮 auto-review 会自动重新审查这个 PR。 |
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
这次改了什么
摘要
调整 Pi 会话树的缩进规则,避免连续的单子节点链随着每一层消息不断向右缩进。现在只有真实分叉会增加缩进,分叉后的第一代保留必要的视觉分组,后续单子节点链保持同一层级。
变更类型
fix缺陷修复范围
UI 变化
docs/design-rules/DESIGN.md:保持界面信息克制,仅调整树形层级的可读性,不新增视觉装饰apps/mobile/docs/mobile-design-guide.md:遵循移动端“只做减法”和现有 token 间距体系;未修改颜色、字号、圆角或触控尺寸怎么验证的
自动验证
实现口径
缩进规则与 Pi v0.83.0 原生
tree-selector保持一致:justBranched只影响这一代,后续单子节点不会继续递增缩进;参考:
https://github.com/earendil-works/pi/blob/v0.83.0/packages/coding-agent/src/modes/interactive/components/tree-selector.ts
UI 效果证据
以下截图来自 Global Desktop 开发版的 Pi 任务分支界面,使用同一组任务树进行对比:
修改前:普通单链节点按消息深度逐层向右缩进。
修改后:只有真实分叉增加缩进;分叉后的单子节点链保持同一层级,不再持续向右移动。
手工验证
未执行的验证
风险
风险分类
影响与回滚
23e3a399b即可恢复原缩进逻辑。提交前检查