feat(UI): Commit 视图头部两行 UI 上移标题栏——Active Changelist 选择器与 List/Tree 切换; - #120
Merged
Merged
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>
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.
变更内容
延续 v0.0.17「Graph 视图工具栏上移 VS Code 标题栏」的范式,将 Commit 视图(WebviewView)内两行行内 UI 上移至视图标题栏 Refresh 按钮左侧,净省两行纵向空间,并消除 Commit 与 Graph/Branches 视图在切换控件交互上的不一致:
.cl-bar行的下拉 +⋯管理菜单)→ 标题栏$(checklist)图标按钮(navigation@0.5),点击弹出 QuickPick:各 changelist 带文件计数、当前活动项picked预选,分隔线后并入 New / Rename / Delete Changelist… 管理操作(默认列表不可改名/删除)。changelist 为动态数据,静态 submenu 不可行,故采用hyperGit.selectRepository($(repo))的 QuickPick 范式承载。$(list-tree)/$(list-flat)互斥图标(navigation@0.75,context keyhyperGit.commit.tree驱动显隐翻转),完全镜像 Graph 视窗hyperGit.log.detailTree/detailFlat与 Branches 分组切换的交互。scroll-margin-top补偿防遮挡)。view.description副标题(标题「Commit」同行右侧,镜像 Graph 的仓库路径副标题),保证一眼可见当前提交目标。实现要点
CommitWebviewProvider镜像log-webview范式——构造注入workspaceState,按仓库持久化hyperGit.commit.dmode:<repo>(无记忆回退 flat),激活期loadRepoScopedPrefs()同步 context key(标题栏按钮先于视图解析渲染),onDidChangeRepository保证多根切库时按钮态与记忆正确重载;切换经setDetailMode→ 整态pushState下发(Commit 的 pushState 全同步幂等,无需 Graph 的定向消息)。commit/setActive/commit/changelistMenu消息与CommitChangelistItem接口及 state 三字段,CommitViewState增mode字段;清理全仓零引用的ICON_ELLIPSIS。executeCommand转发既有命令(与原 webview⋯菜单逐字一致),视图刷新经registry.onDidChange → refreshAll自然驱动。测试与验证
tests/unit/commit-titlebar.test.ts清单护栏(锁 context key 拼写、互斥 when 子句、槽位排序与 palette 限定);集成命令注册清单补commit.detailTree/detailFlat。pnpm run check-types/lint/test:unit(44 文件 423 用例)/test:integration(单仓 8 + 多根 4)全绿。commit-view-consolidation.md、file-list-group-by-directory.md。🤖 Generated with Claude Code