Skip to content

Commit d199cbe

Browse files
7418claude
andcommitted
fix: file tree height cut off at half panel — fill remaining space
Remove hardcoded max-h-[400px] on tree content area. Convert the right panel body and Files section to flex column layout so the file tree expands to fill all available vertical space. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 27d19ad commit d199cbe

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/components/layout/RightPanel.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ export function RightPanel({ width }: RightPanelProps) {
133133
</div>
134134

135135
{/* Body */}
136-
<div className="flex-1 overflow-auto p-4 space-y-4">
136+
<div className="flex flex-1 flex-col overflow-hidden p-4 space-y-4">
137137
{/* Name - editable */}
138-
<div>
138+
<div className="shrink-0">
139139
<label className="text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70 mb-1.5 block">Name</label>
140140
{isEditingName ? (
141141
<div className="flex items-center gap-1.5">
@@ -167,12 +167,12 @@ export function RightPanel({ width }: RightPanelProps) {
167167
</div>
168168

169169
{/* Divider */}
170-
<div className="h-px bg-border/50" />
170+
<div className="h-px bg-border/50 shrink-0" />
171171

172-
{/* Files — always show FileTree */}
173-
<div className="flex flex-col min-h-0">
174-
<span className="text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70 mb-1.5 block">Files</span>
175-
<div className="overflow-hidden">
172+
{/* Files — always show FileTree, fill remaining space */}
173+
<div className="flex flex-1 flex-col min-h-0 overflow-hidden">
174+
<span className="text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70 mb-1.5 block shrink-0">Files</span>
175+
<div className="flex-1 overflow-hidden">
176176
<FileTree
177177
workingDirectory={workingDirectory}
178178
onFileSelect={handleFileSelect}

src/components/project/FileTree.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ export function FileTree({ workingDirectory, onFileSelect, onFileAdd }: FileTree
150150
);
151151

152152
return (
153-
<div className="flex flex-col">
153+
<div className="flex flex-col h-full min-h-0">
154154
{/* Header */}
155-
<div className="flex items-center gap-2 p-2 border-b border-border/30">
155+
<div className="flex items-center gap-2 p-2 border-b border-border/30 shrink-0">
156156
<p className="min-w-0 flex-1 truncate text-[11px] text-muted-foreground" title={workingDirectory}>
157157
{workingDirectory || 'No directory selected'}
158158
</p>
@@ -169,7 +169,7 @@ export function FileTree({ workingDirectory, onFileSelect, onFileAdd }: FileTree
169169
</div>
170170

171171
{/* Search */}
172-
<div className="relative p-2 border-b border-border/30">
172+
<div className="relative p-2 border-b border-border/30 shrink-0">
173173
<HugeiconsIcon icon={Search01Icon} className="absolute left-4 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground" />
174174
<Input
175175
placeholder="Filter files..."
@@ -180,7 +180,7 @@ export function FileTree({ workingDirectory, onFileSelect, onFileAdd }: FileTree
180180
</div>
181181

182182
{/* Tree */}
183-
<div className="max-h-[400px] overflow-auto">
183+
<div className="flex-1 overflow-auto">
184184
{loading && tree.length === 0 ? (
185185
<div className="flex items-center justify-center py-8">
186186
<HugeiconsIcon icon={RefreshIcon} className="h-4 w-4 animate-spin text-muted-foreground" />

0 commit comments

Comments
 (0)