feat(UI): Commit 标题栏 Default 副标题隐藏与「…」菜单批量 Discard Changes; - #121
Merged
ThreeFish-AI merged 10 commits intoSep 10, 2026
Conversation
- Active Changelist 下拉与 ⋯ 管理菜单合并为标题栏 \$(checklist) 图标(Refresh 左侧)→ setActiveChangelist QuickPick:各列表带文件计数、活动项预选,分隔线后并入 New/Rename/Delete(默认列表不可改名删除);活动列表名常驻 view.description 副标题; - 文件列表 List ⇄ Tree 段控改为标题栏 \$(list-tree)/\$(list-flat) 互斥图标(context key hyperGit.commit.tree,交互同 Graph/Branches 范式),偏好移交 host workspaceState 按仓库持久化(hyperGit.commit.dmode:<repo>),旧 webview state 偏好一次性重置为默认 flat; - Select All 复选框吸顶于文件列表容器内首行(空态随空列表隐藏),原 .cl-bar 与 files-header 两行整体移除,净省两行纵向空间; - 协议收缩:删 commit/setActive、commit/changelistMenu 消息与 CommitChangelistItem,state 增 mode 字段(host 为事实源整态下发);清理死图标 ICON_ELLIPSIS; - 新增 tests/unit/commit-titlebar.test.ts 清单护栏;CHANGELOG 与两份特性文档同步。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
…/commit-view-toolbar-ui # Conflicts: # CHANGELOG.md
…顶 Select All 行与行区容器降为 presentation; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
…o ThreeFish-AI/commit-view-toolbar-ui
…ew 单向镜像 host,discardChanges 单/多统一路径; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
…tive Changelist… 与 New Changelist… 收入「…」菜单 0_changelist 组; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
…e 上移 navigation@4,Merge… 收入「…」菜单; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
…waysShowHeaderActions); 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
…compare),补图标名白名单护栏与标题栏图标常驻命令入口; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
…实源并同步清理索引死链; 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
This was referenced Sep 10, 2026
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.
概述
承接 #120(Commit 视图头部两行 UI 上移标题栏)的增量演进:Commit 视图 a11y 修复、标题栏布局演进与批量 Discard 能力、Branches 视图标题栏重排与 per-branch Push。
check-types/lint/test:unit(45 文件 426 用例)全绿。变更内容
1. A11y 修复:Commit 文件列表树语义回归可聚焦容器
role="tree"与aria-label="Changed files"保留于#files(tabindex=0键盘焦点容器),读屏聚焦时恢复树语义播报;role="presentation",桥接中间结构层、不破坏 tree 子项语义。2. Commit 视图:Default 副标题隐藏 + Discard Changes + 布局重排
标题栏布局(navigation 组,从左到右):
$(discard)Discard Changes(navigation@0.5,本次新增)$(list-tree)/$(list-flat)List ⇄ Tree 互斥切换(navigation@0.75)$(refresh)Refresh(navigation@1)、$(arrow-up)Push(navigation@5)「…」菜单:
0_changelist组(Set Active Changelist… 切换/管理 QuickPick、New Changelist…,居同步组之前)→1_sync组(Pull / Fetch / Push Dialog / Update Project / Create·Apply Patch)。view.description仅在非默认 changelist 活动时显示列表名,Default 省略(无信息量不常驻);commit/checkedChanged消息单向同步 host 镜像(切仓库置空待重推,失效路径由resolveChange兜底过滤);hyperGit.discardChanges(单文件右键与批量统一路径)——单次 modal 确认,批量时 detail 列示目标文件(超 10 个截断);未跟踪clean删除、已跟踪restore还原各一次批量调用;无勾选时信息提示、不弹确认框。3. Branches 视图:标题栏重排 + 分支右键 Push
标题栏布局(navigation 组,从左到右):
$(refresh)Refresh →$(add)New Branch… →$(arrow-down)Pull →$(clear-all)Prune Deleted Remote Branches(navigation@4,即原 Push 图标位) → 分组切换互斥图标。「…」菜单:Fetch → Update Project… → Merge…(收入折叠,不再占图标位) → New Tag…。
分支右键新增 Push(
hyperGit.pushBranch):右键任一本地分支即可推送该分支——已配置上游时按显式 refspec 推送到追踪分支(本地名/上游名不一致亦正确;上游取自%(upstream:short),非当前分支无HEAD.upstream可用),无上游时选定 remote 并以-u建立追踪(双路径语义同全局 Push);palette 不泄漏(右键 only)。图标常驻提示:视图头部图标默认 hover/聚焦才显示为 VS Code 平台行为,开启
workbench.view.alwaysShowHeaderActions即可常驻(已记入 CHANGELOG)。验证
pnpm run check-types && pnpm run lint && pnpm run test:unit全绿(45 文件 426 用例;commit-titlebar/branches-titlebar双护栏覆盖命令定义、navigation/…菜单/右键菜单槽位与 palette 门控,冒烟列表同步更新);🤖 Generated with Claude Code