feat(views): 调整面板视图默认布局(显隐与顺序)#101
Merged
ThreeFish-AI merged 1 commit intoJul 20, 2026
Merged
Conversation
- Stash / Shelf 由 collapsed 改为 visibility:hidden(hideByDefault,默认不显示、视图菜单可勾选恢复) - Commit / Worktrees 由 visible 改为 collapsed(显示但默认折叠) - Branches / Graph 保持 visible;容器内声明顺序重排为 Commit·Branches·Graph·Worktrees - 纯 package.json contributes.views 声明式改动,initialSize 不变,src/ 零改动、零破坏 - 新增 tests/unit/views-layout.test.ts 声明式护栏锁定顺序与各视图 visibility - CHANGELOG 记 Changed、issue.md 新增 #16 并给 #12 补指针、README 计数 372→375 🤖 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 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.
变更内容(What)
调整 Hyper Git 底部 Panel 容器内视图的默认布局(纯
package.jsoncontributes.views声明式改动):collapsed→visibility:"hidden"visible→collapsedvisibleinitialSize权重与changesBadge(when:false)不变。变更缘由(Why)
聚焦高频视图:次要的 Stash / Shelf 默认隐藏以减少干扰(需要时可自行开启),Commit / Worktrees 默认折叠以节省纵向空间,并按使用习惯将顺序理顺为 Commit → Branches → Graph → Worktrees。
实现要点(Implementation)
viewsExtensionPoint.ts的viewDescriptorschema 确认visibility枚举为['visible','hidden','collapsed'],hidden映射hideByDefault(不入容器但可经视图菜单勾选恢复)——正是「默认隐藏可恢复」所需,区别于when:false(恒不渲染)。src/零改动;命令、协议、菜单、viewsWelcome、两处.focus均按 id 匹配、与顺序无关,零破坏。tests/unit/views-layout.test.ts声明式护栏,锁定 6 视图顺序 + 各自visibility+changesBadge的when:false。[Unreleased]记Changed;docs/.agents/issue.md新增 ci+chore(Release): v0.0.1-rc.3 发布 + GitHub Release 自动附带可本地安装的 .vsix #16 并给 feat(Inline-Commit): editor 行内提交 CodeLens(#13) #12 补单一事实源指针;README / zh-CN README 测试计数 372 → 375。验证
check-types/lint/ 生产构建 /test:unit(375 passed)全绿。平台说明
visibility/ 顺序仅影响全新安装或干净 profile 的初始态;老用户升级后需命令面板「View: Reset View Locations」或右键容器「Reset Location」才采用新默认(VS Code 会持久化用户布局)。