Repository navigation
Conversation
A container workspace that discovers several repositories rendered one chip per root above the Changes section; with location labels the row does not scale, and same-named checkouts were indistinguishable. The row is now a compact labeled select: the current root stays on screen, the full list is one click away, and options carry disambiguation labels (deeper roots show their relative parent) shared with the More -> Repository submenu. The picker shows the resolved status root — a server fallback renders as a disabled stand-in with its own short label instead of silently selecting the first option. Single-repo workspaces render no row; switching still goes through chooseRepo.
…p the redundant submenu The picker label now uses the section-header face (matching 更改/提交图) and the select mirrors the graph toolbar branch filter. The More-actions Repository submenu is removed: the standalone picker owns repository switching, and branch filtering already lives under the graph toolbar.
…he branch filter Move the multi-repo picker from its own band above Changes to the head of the commit-graph toolbar, ahead of the branch filter - repository first, filter second, one scope row, and one less row of vertical space. The picker rides the foldable graph section, so the dots -> Repository submenu returns as the always-reachable fallback while the graph is folded; its submenu labels now carry the same disambiguation labels as the picker options.
The relocated picker dropped its visible 仓库 caption, which left the first box of the scope row as a bare repository name. Restore the caption at the section-header type and pin it with an assertion.
Menghuan1918
added a commit
that referenced
this pull request
Nov 15, 2026
Keep the contributor label work but place the control above Changes per the product decision: chips at natural width while every root fits, one native select once it does not. A hidden measurement row makes the decision content-driven; the More -> Repository submenu stays as the folded fallback.
Menghuan1918
added a commit
that referenced
this pull request
Nov 15, 2026
Collaborator
|
感谢 @iasiv5!四个提交已 rebase 到当前 按产品决定,维护者提交 验证:全量 303 文件 / 3,518 例通过(rc.2 串行 lane,17 跳过),typecheck / lint / build / consumer types 通过,真实宿主 Chromium 挂载在 0.2.2-rc.2 与 rc.3 各 26 通过 / 6 跳过。 已合入 |
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.
背景:仓库胶囊行的两个实际问题
容器工作区(本身不是 Git 仓库、内含多个独立仓库的目录)会在「更改」上方显示一排仓库胶囊(#1112 引入,基于 #607 的仓库发现)。实际使用中遇到两个问题:
图 1|窄侧边栏(改造前)

图 2|全屏侧边栏(改造前)
knowhow、两个openbmc,位于不同层级)在鼠标悬停前完全无法区分。方案:「仓库 ▾」带标签下拉
图 3|改造后,收起态(提交图工具栏)
<select>:键盘、读屏、触屏与内部滚动都由浏览器原生提供。图 4|改造后,展开态(提交图工具栏)
名 (相对父路径),如knowhow (ob-harness/contexts)与knowhow (ob-harness-ast2700-a0/contexts)同屏可辨;极端冲突才回退完整路径。细节与取舍
repoRoot未命中时的回退逻辑未改动;单仓库工作区不显示此下拉。测试
tests/git-repo-labels.spec.ts(32 例:POSIX / Windows 盘符 / UNC /\\?\扩展路径、同名消歧、顺序与输入不变性);tests/git-repo-switcher.spec.tsx重写为下拉契约(选项标签、拼写折叠、服务端回退禁用临时项、单仓不显示);tests/git-view-worktree.spec.tsx的切仓用例改走下拉。typecheck/lint/ 全量vitest(247 文件、3060 通过)/build/check:consumer-types全部通过。e87b2f58,Linux,Git 2.43):tsc --noEmit通过(默认堆会 OOM,需NODE_OPTIONS=--max-old-space-size=4096);build通过;vitest 全量 3513 用例:3495 通过、17 跳过、1 失败,失败项为tests/git.spec.ts的 checkout--end-of-options用例(Git 2.43 环境问题,与本 PR 无关);headless GUI 冒烟通过:仓库下拉 19 个选项,联动后提交图重查 42 commits 无告警。e87b2f58):ci、ci-windows(Windows lane)、plugin-mount全部通过。