Skip to content

refactor(tui): 精简二级页面展示元素 - #1

Merged
CodeHourra merged 4 commits into
mainfrom
cursor/tui-secondary-page-slim-57e6
Aug 22, 2026
Merged

CodeHourra merged 4 commits into
mainfrom
cursor/tui-secondary-page-slim-57e6

Conversation

@CodeHourra

Copy link
Copy Markdown
Owner

背景

TUI 的二级页面堆叠了过多展示元素:每个页都重复一遍功能描述、status 把未变更文件也逐行铺满、projects 详情用完整 ISO 时间戳和未截断的长 remote URL、ls 图例过于啰嗦。本次只做「主线 A:精简二级页展示元素」,不改命令、不动 TUI/CLI 对齐。

改动(A1–A4)

  • A1 去掉冗余描述 subtitle:标题已表意,进入二级页后重复 *Desc 属噪音。移除 save / init / projects(列表) / rules / doctor / trash / add-rm(home) 的描述性 subtitle,并清理 ManifestPathPicker 中随之失效的 screenTitle / homeTitle。i18n 的 *Desc key 仍被主菜单使用,保留不删。
  • A2 status 折叠未变更文件:默认只列出 created / changed / untracked;未变更数量仍保留在顶部 stats,工作区干净时显示「✓ 未变」。(原计划「stats ≤ 2」会与 ScreenStatus 测试断言 变更/新增/缺失 冲突,已取消该条,保留四个计数。)
  • A3 projects 详情瘦身:last save 由完整 ISO 改为 YYYY-MM-DD HH:mm;过长 remote URL 中段省略;三行副标题精简为「受管 N · 时间」+ 可选 remote 行。
  • A4 ls 图例精简:去掉冗长的 [·] implicit folder (no own row) 说明,保留核心符号图例。

验证

  • pnpm lint ✓
  • pnpm typecheck ✓
  • pnpm build ✓
  • pnpm test:与基线一致(100 通过,3 失败)。3 个失败全在 test/integration/init.test.ts,由沙箱环境 git insteadOf 把 github URL 重写成带 access-token 形式导致 remote 比对不上,与本次改动无关,非新增失败。

影响范围

仅触及 src/tui/screens/ 下 9 个文件的展示层,不改任何命令逻辑、数据结构或 CLI 行为。

Open in Web Open in Cursor 

cursoragent and others added 4 commits May 29, 2026 14:23
标题已表意,进入二级页后重复展示 *Desc 描述属噪音。去掉
save/init/rules/doctor/trash/add-rm(home) 的描述性 subtitle,
并清理 ManifestPathPicker 中随之失效的 screenTitle/homeTitle。
i18n 的 *Desc key 仍被主菜单使用,故保留。

Co-authored-by: LiuSir <CodeHourra@users.noreply.github.com>
未变更文件逐行铺满屏幕属噪音。改为只列出 created/changed/untracked,
未变更数量仍保留在顶部 stats 中;工作区干净时显示「✓ 未变」提示。

Co-authored-by: LiuSir <CodeHourra@users.noreply.github.com>
last save 由完整 ISO 改为 YYYY-MM-DD HH:mm 短格式;
过长 remote URL 中段省略;三行副标题精简为「受管 N · 时间」+ 可选 remote。

Co-authored-by: LiuSir <CodeHourra@users.noreply.github.com>
去掉冗长的「implicit folder (no own row)」说明,仅保留核心符号图例。

Co-authored-by: LiuSir <CodeHourra@users.noreply.github.com>
@CodeHourra
CodeHourra marked this pull request as ready for review July 30, 2026 15:48
@cursor

cursor Bot commented Jul 30, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@CodeHourra
CodeHourra merged commit d5f9237 into main Aug 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants