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>
This commit is contained in:
7418andClaude Opus 4.6 committed 2026-02-13 14:33:06 +08:00
1 parent 27d19adba3
commit d199cbec6c
2 files changed
+11 -11

No files matched your search

+7 -7
View File
@@ -133,9 +133,9 @@ export function RightPanel({ width }: RightPanelProps) {
</div>
{/* Body */}
<div className="flex-1 overflow-auto p-4 space-y-4">
<div className="flex flex-1 flex-col overflow-hidden p-4 space-y-4">
{/* Name - editable */}
<div>
<div className="shrink-0">
<label className="text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70 mb-1.5 block">Name</label>
{isEditingName ? (
<div className="flex items-center gap-1.5">
@@ -167,12 +167,12 @@ export function RightPanel({ width }: RightPanelProps) {
</div>
{/* Divider */}
<div className="h-px bg-border/50" />
<div className="h-px bg-border/50 shrink-0" />
{/* Files — always show FileTree */}
<div className="flex flex-col min-h-0">
<span className="text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70 mb-1.5 block">Files</span>
<div className="overflow-hidden">
{/* Files — always show FileTree, fill remaining space */}
<div className="flex flex-1 flex-col min-h-0 overflow-hidden">
<span className="text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70 mb-1.5 block shrink-0">Files</span>
<div className="flex-1 overflow-hidden">
<FileTree
workingDirectory={workingDirectory}
onFileSelect={handleFileSelect}
+4 -4
View File
@@ -150,9 +150,9 @@ export function FileTree({ workingDirectory, onFileSelect, onFileAdd }: FileTree
);
return (
<div className="flex flex-col">
<div className="flex flex-col h-full min-h-0">
{/* Header */}
<div className="flex items-center gap-2 p-2 border-b border-border/30">
<div className="flex items-center gap-2 p-2 border-b border-border/30 shrink-0">
<p className="min-w-0 flex-1 truncate text-[11px] text-muted-foreground" title={workingDirectory}>
{workingDirectory || 'No directory selected'}
</p>
@@ -169,7 +169,7 @@ export function FileTree({ workingDirectory, onFileSelect, onFileAdd }: FileTree
</div>
{/* Search */}
<div className="relative p-2 border-b border-border/30">
<div className="relative p-2 border-b border-border/30 shrink-0">
<HugeiconsIcon icon={Search01Icon} className="absolute left-4 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground" />
<Input
placeholder="Filter files..."
@@ -180,7 +180,7 @@ export function FileTree({ workingDirectory, onFileSelect, onFileAdd }: FileTree
</div>
{/* Tree */}
<div className="max-h-[400px] overflow-auto">
<div className="flex-1 overflow-auto">
{loading && tree.length === 0 ? (
<div className="flex items-center justify-center py-8">
<HugeiconsIcon icon={RefreshIcon} className="h-4 w-4 animate-spin text-muted-foreground" />