From 74c793b6c692f84beb98a9ac601f6db6ebcda43b Mon Sep 17 00:00:00 2001 From: anonymous Date: Mon, 12 Jan 2026 00:56:36 -0800 Subject: [PATCH] Add branch switch to mobile worktree panel --- .../components/branch-switch-dropdown.tsx | 15 +++++++---- .../worktree-panel/worktree-panel.tsx | 25 ++++++++++++++++++- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/apps/ui/src/components/views/board-view/worktree-panel/components/branch-switch-dropdown.tsx b/apps/ui/src/components/views/board-view/worktree-panel/components/branch-switch-dropdown.tsx index f8395976..c7e7b7ef 100644 --- a/apps/ui/src/components/views/board-view/worktree-panel/components/branch-switch-dropdown.tsx +++ b/apps/ui/src/components/views/board-view/worktree-panel/components/branch-switch-dropdown.tsx @@ -20,6 +20,8 @@ interface BranchSwitchDropdownProps { branchFilter: string; isLoadingBranches: boolean; isSwitching: boolean; + /** When true, renders as a standalone button (not attached to another element) */ + standalone?: boolean; onOpenChange: (open: boolean) => void; onFilterChange: (value: string) => void; onSwitchBranch: (worktree: WorktreeInfo, branchName: string) => void; @@ -33,6 +35,7 @@ export function BranchSwitchDropdown({ branchFilter, isLoadingBranches, isSwitching, + standalone = false, onOpenChange, onFilterChange, onSwitchBranch, @@ -42,16 +45,18 @@ export function BranchSwitchDropdown({ diff --git a/apps/ui/src/components/views/board-view/worktree-panel/worktree-panel.tsx b/apps/ui/src/components/views/board-view/worktree-panel/worktree-panel.tsx index 6b63682c..0d4fb9af 100644 --- a/apps/ui/src/components/views/board-view/worktree-panel/worktree-panel.tsx +++ b/apps/ui/src/components/views/board-view/worktree-panel/worktree-panel.tsx @@ -13,7 +13,12 @@ import { useWorktreeActions, useRunningFeatures, } from './hooks'; -import { WorktreeTab, WorktreeMobileDropdown, WorktreeActionsDropdown } from './components'; +import { + WorktreeTab, + WorktreeMobileDropdown, + WorktreeActionsDropdown, + BranchSwitchDropdown, +} from './components'; export function WorktreePanel({ projectPath, @@ -186,6 +191,24 @@ export function WorktreePanel({ onSelectWorktree={handleSelectWorktree} /> + {/* Branch switch dropdown for the selected worktree */} + {selectedWorktree && ( + + )} + {/* Actions menu for the selected worktree */} {selectedWorktree && (