diff --git a/apps/frontend/src/renderer/components/terminal/WorktreeSelector.tsx b/apps/frontend/src/renderer/components/terminal/WorktreeSelector.tsx index 1394133a..5a94d9e6 100644 --- a/apps/frontend/src/renderer/components/terminal/WorktreeSelector.tsx +++ b/apps/frontend/src/renderer/components/terminal/WorktreeSelector.tsx @@ -20,6 +20,7 @@ import { AlertDialogTitle, } from '../ui/alert-dialog'; import { cn } from '../../lib/utils'; +import { ScrollArea } from '../ui/scroll-area'; import { useProjectStore } from '../../stores/project-store'; interface WorktreeSelectorProps { @@ -169,90 +170,91 @@ export function WorktreeSelector({ {t('terminal:worktree.createNew')} - {/* Separator and existing worktrees */} - {isLoading ? ( - <> - + {/* Fixed separator between "Create New" and scrollable content */} + + + {/* Scrollable content */} + + {isLoading ? (
- - ) : ( - <> - {/* Terminal Worktrees Section */} - {worktrees.length > 0 && ( - <> - -
- {t('terminal:worktree.existing')} -
- {worktrees.map((wt) => ( - { - e.stopPropagation(); - setIsOpen(false); - onSelectWorktree(wt); - }} - className="text-xs group" - > - -
- {wt.name} - {wt.branchName && ( - - {wt.branchName} - - )} -
- -
- ))} - - )} + +
+ {wt.name} + {wt.branchName && ( + + {wt.branchName} + + )} +
+ + + ))} + + )} - {/* Task Worktrees Section */} - {taskWorktrees.length > 0 && ( - <> - -
- {t('terminal:worktree.taskWorktrees')} -
- {taskWorktrees.map((wt) => ( - { - e.stopPropagation(); - setIsOpen(false); - selectTaskWorktree(wt); - }} - className="text-xs group" - > - -
- {wt.specName} - {wt.branch && ( - - {wt.branch} - - )} -
-
- ))} - - )} - - )} + {/* Task Worktrees Section */} + {taskWorktrees.length > 0 && ( + <> + +
+ {t('terminal:worktree.taskWorktrees')} +
+ {taskWorktrees.map((wt) => ( + { + e.stopPropagation(); + setIsOpen(false); + selectTaskWorktree(wt); + }} + className="text-xs group" + > + +
+ {wt.specName} + {wt.branch && ( + + {wt.branch} + + )} +
+
+ ))} + + )} + + )} +