feat(vcs): group the Worktrees panel by repository and merge linked roots (#2063)

Closes #1984

Worktrees are grouped under their repository; a linked worktree opened as its own root joins its repository's group instead of a separate list. The current marker compares against the roots actually opened, so a project opened from a linked worktree no longer marks the main worktree as current. A root's listing error is still shown when its repository isn't listed by another root.

Co-authored-by: panda-student <[email protected]>
Цей коміт міститься в:
SunZhiQiang authored and GitHub committed 2026-11-08 05:51:25 +08:00
1 джерело 704001fd8a
коміт 45a1132ece
8 files changed
+312 -86

No files matched your search

+22 -9
Переглянути файл
@@ -322,17 +322,30 @@
.manageRowSelected:hover {
background: var(--bg-list-selected);
}
/* A fixed slot, so the names line up whether or not a row is marked. */
.worktreeMark {
display: flex;
flex: none;
width: 14px;
margin-right: -4px;
/* Worktrees dialog: the tree needs a height of its own inside the auto-sized body. */
.worktreeListDialog {
height: 340px;
min-height: 0;
}
/* The branch keeps its width; the path is what gets cut short. */
.worktreeName {
/* Worktrees tree rows: the worktree name keeps its width, the path is what gets cut short. */
.worktreeIcon {
flex: none;
max-width: 40%;
margin-right: 2px;
color: var(--fg-muted);
}
.worktreeLabel {
flex: none;
max-width: 45%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.worktreeDetail {
min-width: 0;
margin-left: 4px;
overflow: hidden;
text-overflow: ellipsis;
color: var(--fg-muted);
}
.comparisonDialog > [data-dialog-body] {