From ee99bb65fc41ce172bce3e52e02190e50bc103d3 Mon Sep 17 00:00:00 2001 From: Chris Scott Date: Sat, 27 Dec 2025 18:19:57 -0500 Subject: [PATCH] Reorder branch switcher dropdown: view changes and add branch at top, scrollable branch list below --- .../src/components/repo/BranchSwitcher.tsx | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/frontend/src/components/repo/BranchSwitcher.tsx b/frontend/src/components/repo/BranchSwitcher.tsx index f4c0a8a5..ebfbd178 100644 --- a/frontend/src/components/repo/BranchSwitcher.tsx +++ b/frontend/src/components/repo/BranchSwitcher.tsx @@ -83,7 +83,7 @@ export function BranchSwitcher({ repoId, currentBranch, isWorktree, repoUrl, rep {!iconOnly && {activeBranch}} - + {isWorktree ? ( <> @@ -110,31 +110,6 @@ export function BranchSwitcher({ repoId, currentBranch, isWorktree, repoUrl, rep ) : ( <> - {branchesLoading && !branches ? ( - - Loading branches... - - ) : branches?.all && branches.all.length > 0 ? ( - branches.all.map((branch: string) => ( - switchBranchMutation.mutate(branch)} - disabled={switchBranchMutation.isPending} - className="text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer" - > -
- - {branch} - {branch === activeBranch && } -
-
- )) - ) : ( - - No branches available - - )} - setGitChangesOpen(true)} className="text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer" @@ -163,6 +138,33 @@ export function BranchSwitcher({ repoId, currentBranch, isWorktree, repoUrl, rep )} + +
+ {branchesLoading && !branches ? ( + + Loading branches... + + ) : branches?.all && branches.all.length > 0 ? ( + branches.all.map((branch: string) => ( + switchBranchMutation.mutate(branch)} + disabled={switchBranchMutation.isPending} + className="text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer" + > +
+ + {branch} + {branch === activeBranch && } +
+
+ )) + ) : ( + + No branches available + + )} +
)}