From 44c38bfb97b44285ebf747bf473a3be8c20a79ad Mon Sep 17 00:00:00 2001 From: Paddy <89168564+patrickballard@users.noreply.github.com> Date: Sun, 25 Oct 2026 15:01:00 +0000 Subject: [PATCH] perf(desktop-gpui): lay out the sidebar's scroll body as a block The sidebar's scroll region was a flex column around its single padded child, so every tab rebuild sized that child with an extra layout pass over the whole tab. As a block it lays out the same, and it matches the source's `flex-1 min-h-0` classes, which never made it a flex container. --- apps/desktop-gpui/src/editor_sidebar.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/desktop-gpui/src/editor_sidebar.rs b/apps/desktop-gpui/src/editor_sidebar.rs index aa0b851af61..161fb0ec998 100644 --- a/apps/desktop-gpui/src/editor_sidebar.rs +++ b/apps/desktop-gpui/src/editor_sidebar.rs @@ -2574,10 +2574,11 @@ impl EditorWindow { SidebarTab::Captions => self.render_captions_tab(cx), }; + // Block, not a flex column: its one child lays out the same, without + // the extra layout pass a flex column spends sizing it on every rebuild. div() .id("sidebar-scroll") - .flex() - .flex_col() + .block() .flex_1() .min_h_0() .overflow_x_hidden()