From 2e12a4093ee7967838e1c94696d8b0471b343cff Mon Sep 17 00:00:00 2001
From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com>
Date: Wed, 2 Sep 2026 00:20:22 +0000
Subject: [PATCH] fix(mobile): show branch label in repo quick switch sheet so
worktrees are distinguishable
---
.../navigation/RepoQuickSwitchSheet.test.tsx | 47 +++++++++++++++++++
.../navigation/RepoQuickSwitchSheet.tsx | 20 ++++++--
2 files changed, 64 insertions(+), 3 deletions(-)
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(
+