diff --git a/frontend/src/components/navigation/RepoQuickSwitchSheet.test.tsx b/frontend/src/components/navigation/RepoQuickSwitchSheet.test.tsx
index 168ae372..5b81c7b5 100644
--- a/frontend/src/components/navigation/RepoQuickSwitchSheet.test.tsx
+++ b/frontend/src/components/navigation/RepoQuickSwitchSheet.test.tsx
@@ -110,6 +110,53 @@ describe('RepoQuickSwitchSheet', () => {
})
})
+ it('distinguishes worktrees of the same repo by branch', async () => {
+ vi.mocked(listRepos).mockResolvedValue([
+ {
+ id: 1,
+ repoUrl: 'https://github.com/test/repo1.git',
+ localPath: '/path/to/repo1',
+ sourcePath: null,
+ currentBranch: 'main',
+ isLocal: false,
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ },
+ {
+ id: 2,
+ repoUrl: 'https://github.com/test/repo1.git',
+ localPath: '/path/to/repo1/.worktrees/feature-a',
+ sourcePath: null,
+ currentBranch: 'feature-a',
+ isWorktree: true,
+ isLocal: false,
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ },
+ {
+ id: 3,
+ repoUrl: 'https://github.com/test/repo1.git',
+ localPath: '/path/to/repo1/.worktrees/feature-b',
+ sourcePath: null,
+ currentBranch: 'feature-b',
+ isWorktree: true,
+ isLocal: false,
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ },
+ ])
+ const handleClose = vi.fn()
+ render(
+