From 8e1349c670132aa32a87b605bc1c296cee66c85f Mon Sep 17 00:00:00 2001 From: Rand Lee Date: Fri, 30 Jan 2026 12:07:12 -0800 Subject: [PATCH] fix: terminal pane layout - ensure proper height propagation The terminal pane was rendering with 0 height because of missing height constraints in the flex layout chain. Changes: - render_content: use size_full() instead of w_full() to provide height - All pane wrappers: add h_full() to stretch vertically in flex row - Terminal pane container: use size_full() instead of flex_1() - Remove overflow_hidden() from outer container (was collapsing height) - Add proper wrapper around terminal_pane with flex_1/min_h_0/overflow_hidden The issue was that using flex_1() with overflow_hidden() on the terminal pane container caused height to collapse to 0. Using size_full() and moving overflow_hidden() to an inner wrapper resolves this. Co-Authored-By: Claude Opus 4.5 --- src/ui/workspace.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ui/workspace.rs b/src/ui/workspace.rs index 685dbfa..2e4003c 100644 --- a/src/ui/workspace.rs +++ b/src/ui/workspace.rs @@ -574,7 +574,7 @@ impl WorkspaceView { div() .flex() .flex_1() - .w_full() + .size_full() .relative() .child( div() @@ -606,6 +606,7 @@ impl WorkspaceView { d.child( div() .flex_basis(relative(visible_ratios[0])) + .h_full() .child(self.render_pane(PaneType::FileBrowser, cx)), ) }) @@ -618,6 +619,7 @@ impl WorkspaceView { d.child( div() .flex_basis(relative(visible_ratios[1])) + .h_full() .child(self.render_pane(PaneType::Terminal, cx)), ) }) @@ -630,6 +632,7 @@ impl WorkspaceView { d.child( div() .flex_basis(relative(visible_ratios[2])) + .h_full() .child(self.render_pane(PaneType::DocumentViewer, cx)), ) }) @@ -655,13 +658,12 @@ impl WorkspaceView { // Terminal pane renders the actual TerminalPane component if pane_type == PaneType::Terminal { return div() - .flex_1() + .size_full() .flex() .flex_col() .m_2() .bg(theme.colors().panel_background) .rounded_md() - .overflow_hidden() .child( div() .flex() @@ -680,7 +682,14 @@ impl WorkspaceView { ) .child(self.render_hide_button(pane_type, cx)), ) - .child(self.terminal_pane.clone()); + .child( + div() + .flex_1() + .size_full() + .min_h_0() + .overflow_hidden() + .child(self.terminal_pane.clone()), + ); } // Document viewer renders placeholder