Updated handleCreateBranch to check git status matrix directly instead
of relying on potentially stale gitStatus hook data. This ensures accurate
detection of uncommitted changes at the time of branch creation.
The branch will now properly auto-switch when there are no uncommitted
changes, and stay on the current branch only when changes exist.
Modified BranchManager to automatically switch to newly created branch
if there are no uncommitted changes. If there are uncommitted changes,
the branch is created but the user stays on the current branch with a
helpful message to commit changes first.
Changes:
- Added useGitStatus hook to check for uncommitted changes
- Updated handleCreateBranch to auto-checkout new branch when safe
- Added conditional toast messages based on uncommitted changes state
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).