Skip to content

Sessions: Show repo name with worktree basename in workspace folder label#299448

Merged
sandy081 merged 1 commit intomainfrom
copilot/evil-koi
Mar 5, 2026
Merged

Sessions: Show repo name with worktree basename in workspace folder label#299448
sandy081 merged 1 commit intomainfrom
copilot/evil-koi

Conversation

@sandy081
Copy link
Copy Markdown
Member

@sandy081 sandy081 commented Mar 5, 2026

When adding a folder to workspace for a worktree in the Sessions window, show the repository name with the worktree basename in brackets (e.g. vscode (copilot-evil-koi)) instead of just showing worktree in brackets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 5, 2026 11:05
@sandy081 sandy081 added this to the 1.111.0 milestone Mar 5, 2026
@sandy081 sandy081 self-assigned this Mar 5, 2026
@sandy081 sandy081 enabled auto-merge (squash) March 5, 2026 11:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the workspace folder label for worktree-based sessions in the Agent Sessions window. Instead of showing a generic (worktree) suffix after the repository name, it now shows the worktree's basename (e.g., vscode (copilot-evil-koi) instead of vscode (worktree)), making it easier to distinguish between different worktrees of the same repository.

Changes:

  • Updated the name computation in getActiveSessionFolderData to use basename(session.worktree) instead of the hardcoded string "worktree" in the parenthetical suffix.
  • Added a fallback when session.repository is undefined: the name is now explicitly set to basename(session.worktree) instead of undefined.

@sandy081 sandy081 merged commit 79fbc6b into main Mar 5, 2026
24 checks passed
@sandy081 sandy081 deleted the copilot/evil-koi branch March 5, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants