fix: expand git history dialog height

Give the history dialog more vertical space
Let the commit list fill the dialog height
This commit is contained in:
Bohdan Triapitsyn
2026-05-06 01:34:58 +03:00
parent 9af3b49e7b
commit a6582bbcff
2 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -2315,7 +2315,7 @@ export const GitView: React.FC = () => {
</div>
<Dialog open={isHistoryDialogOpen} onOpenChange={setIsHistoryDialogOpen}>
<DialogContent className="max-w-5xl max-h-[80vh] flex flex-col overflow-hidden">
<DialogContent className="max-w-5xl h-[90vh] max-h-[90vh] flex flex-col overflow-hidden">
<DialogHeader>
<DialogTitle>{t('gitView.history.title')}</DialogTitle>
<DialogDescription>
@@ -2334,6 +2334,7 @@ export const GitView: React.FC = () => {
loadingCommitHashes={loadingCommitHashes}
onCopyHash={handleCopyCommitHash}
showHeader={false}
contentMaxHeightClassName="h-full max-h-none"
branchDivider={historyBranchDivider}
/>
</div>
@@ -34,6 +34,7 @@ interface HistorySectionProps {
loadingCommitHashes: Set<string>;
onCopyHash: (hash: string) => void;
showHeader?: boolean;
contentMaxHeightClassName?: string;
branchDivider?: {
insertBeforeIndex: number;
branchName: string;
@@ -52,6 +53,7 @@ export const HistorySection: React.FC<HistorySectionProps> = ({
loadingCommitHashes,
onCopyHash,
showHeader = true,
contentMaxHeightClassName = 'max-h-[50vh]',
branchDivider = null,
}) => {
const { t } = useI18n();
@@ -96,7 +98,7 @@ export const HistorySection: React.FC<HistorySectionProps> = ({
);
const content = (
<ScrollableOverlay outerClassName="min-h-0 max-h-[50vh]" className="w-full">
<ScrollableOverlay outerClassName={`min-h-0 ${contentMaxHeightClassName}`} className="h-full w-full">
{log.all.length === 0 ? (
<div className="flex h-full items-center justify-center p-4">
<p className="typography-ui-label text-muted-foreground">
@@ -134,10 +136,10 @@ export const HistorySection: React.FC<HistorySectionProps> = ({
if (!showHeader) {
if (hasSplitHistory) {
return <section>{content}</section>;
return <section className="h-full min-h-0">{content}</section>;
}
return (
<section className="rounded-xl border border-border/60 bg-background/70 overflow-hidden">
<section className="h-full min-h-0 rounded-xl border border-border/60 bg-background/70 overflow-hidden">
{content}
</section>
);