What
SessionGroup titles a group with baseName(path || projectPath) (frontend/src/components/sidebar/SessionGroup.tsx:64).
A worktree's directory is <worktrees-root>/<projectID>/<name> (internal/project/worktree.go:187), and name is anything git check-ref-format --branch accepts — slashes included. So a worktree created as feat/x lives at .../<projectID>/feat/x and its header reads x.
Two worktrees named feat/x and fix/x therefore draw two identical headers, and the divider stops identifying which checkout it labels.
Expected
The header names the worktree the way it was created: the path relative to the project's worktree root (feat/x), not its last segment.
Notes
The frontend never learns the worktree root — SessionGroup is handed only the checkout path — so the label needs a real source rather than more string slicing. ListCheckouts already returns the worktree with its name; the fix is deciding what reaches the group, not inventing a new field.
The root group (empty path, titled from the project directory) is correct as it stands.
Surfaced while adding group reordering (#187), which does not touch the label.
What
SessionGrouptitles a group withbaseName(path || projectPath)(frontend/src/components/sidebar/SessionGroup.tsx:64).A worktree's directory is
<worktrees-root>/<projectID>/<name>(internal/project/worktree.go:187), andnameis anythinggit check-ref-format --branchaccepts — slashes included. So a worktree created asfeat/xlives at.../<projectID>/feat/xand its header readsx.Two worktrees named
feat/xandfix/xtherefore draw two identical headers, and the divider stops identifying which checkout it labels.Expected
The header names the worktree the way it was created: the path relative to the project's worktree root (
feat/x), not its last segment.Notes
The frontend never learns the worktree root —
SessionGroupis handed only the checkout path — so the label needs a real source rather than more string slicing.ListCheckoutsalready returns the worktree with its name; the fix is deciding what reaches the group, not inventing a new field.The root group (empty path, titled from the project directory) is correct as it stands.
Surfaced while adding group reordering (#187), which does not touch the label.