From 9c24785b110e7e376c1b477d106789f5d1d8a056 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Tue, 14 Oct 2025 15:22:29 -0500 Subject: [PATCH] Fix Git Management Dialog overflow with proper scrolling The Git Management Dialog was experiencing overflow issues when additional fields were added to the various tabs. The modal needed proper scroll behavior to handle dynamic content. Changes: - Added flex layout to DialogContent with proper overflow handling - Made DialogHeader and TabsList shrink-0 to prevent them from scrolling - Added overflow-y-auto and flex-1 to each TabsContent for independent scrolling - Removed fixed-height ScrollArea from BranchManager in favor of natural flow - Content now scrolls properly within the modal without overflowing The modal now maintains a max height of 90vh with proper scrolling for overflow content in any tab (Branches, Changes, or Compare). --- src/components/git/BranchManager.tsx | 96 +++++++++++----------- src/components/git/GitManagementDialog.tsx | 14 ++-- 2 files changed, 54 insertions(+), 56 deletions(-) diff --git a/src/components/git/BranchManager.tsx b/src/components/git/BranchManager.tsx index 303ff5d1..5fb91820 100644 --- a/src/components/git/BranchManager.tsx +++ b/src/components/git/BranchManager.tsx @@ -335,59 +335,57 @@ export function BranchManager({ projectId, currentBranch, onBranchChange }: Bran ) : ( - -
- {/* Local Branches */} - {localBranches.length > 0 && ( -
-
- Local Branches -
-
- {localBranches.map((branch) => ( - - ))} -
+
+ {/* Local Branches */} + {localBranches.length > 0 && ( +
+
+ Local Branches
- )} +
+ {localBranches.map((branch) => ( + + ))} +
+
+ )} - {/* Remote Branches */} - {remoteBranches.length > 0 && ( -
-
- Remote Branches -
-
- {remoteBranches.map((branch) => ( - - ))} -
+ {/* Remote Branches */} + {remoteBranches.length > 0 && ( +
+
+ Remote Branches
- )} +
+ {remoteBranches.map((branch) => ( + + ))} +
+
+ )} - {/* Empty state */} - {localBranches.length === 0 && remoteBranches.length === 0 && ( -
- -

No branches found

-
- )} -
- + {/* Empty state */} + {localBranches.length === 0 && remoteBranches.length === 0 && ( +
+ +

No branches found

+
+ )} +
)}
); diff --git a/src/components/git/GitManagementDialog.tsx b/src/components/git/GitManagementDialog.tsx index d29d6d48..4c26875d 100644 --- a/src/components/git/GitManagementDialog.tsx +++ b/src/components/git/GitManagementDialog.tsx @@ -45,16 +45,16 @@ export function GitManagementDialog({ <> {children && {children}} - - + + Git Management - -
+ +
{/* Branches Tab */} - + {/* Changes Tab */} - + {/* Compare Tab */} - +