Show folder name and git branch for nested worktree Spaces rows #1485
lakshyads05
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
Root Spaces rows show both identity and branch:
Nested / linked worktree children only show one line, and that line is the branch, not the checkout folder:
That breaks when the worktree folder and the checked-out branch diverge (rename,
git switch, shared folder naming). The folder is what you open on disk; the branch is what git is on. Both matter in a multi-worktree sidebar.Current behavior (0.7.3)
For indented worktree children, Herdr:
grouped_child_display_label(unless the space has a custom name)suppress_git_details: true, which drops the built-inbranch/git_statustokens from[ui.sidebar.spaces].rowsSo even with the default layout:
children never get the two-line folder + branch treatment that parents get. Renaming the space only swaps which single string is shown; it does not restore both.
Desired behavior
For linked worktree children, show both:
git_status)Example when they differ:
When they match, today's single-line density is fine (or show once and omit the duplicate).
Why
Bare-repo / sibling worktree layouts often use folder names that look like branches, but the checkout can move. Collapsing child rows to branch-only hides the path you actually attached the space to.
Possible approaches
Any of these would unblock the use case:
suppress_git_detailsfor indented children (or gate it behind config, defaulting to current behavior)workspaceinstead of substituting the branch ingrouped_child_display_labelpath/checkoutfor the relative checkout path, and document a child-friendlyrowslayoutHappy to adjust to whatever fits the sidebar token model best.
Environment
All reactions