BlueGit

ict rusty-teams

fix(activity): rows keep their height when the panel opens

- Before the first layout the list width was 0, so every headline counted as one line and grew to two lines a frame later
- The sidebar width stands in until the list is measured

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-11-11 · 2 weeks ago

Hash
49bd26c8b910243c10a5c4a020036acbfff96bfd
Parent
4378439a
1 file changed +8 −1
crates/app/src/views/activity_panel.rs +8 −1
@@ -9,6 +9,7 @@ use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};
9 9 use gpui_kit::prelude::FluentBuilder as _;
10 10 use gpui_kit::*;
11 11 use store::Sidebar;
12 use app_ui_kit::layout::SIDEBAR_WIDTH;
12 13
13 14 use super::avatar::person_avatar;
14 15 use super::scroll_edge::{scroll_offset, with_top_edge};
@@ -819,7 +820,13 @@ impl Render for ActivityPanel {
819 820 .read(cx)
820 821 .feed()
821 822 .sections(self.filter, today, offset);
822 let text_width = f32::from(self.scroll.bounds().size.width) - ROW_CHROME_WIDTH;
823 let measured_width = f32::from(self.scroll.bounds().size.width);
824 let list_width = if measured_width > 1. {
825 measured_width
826 } else {
827 SIDEBAR_WIDTH
828 };
829 let text_width = list_width - ROW_CHROME_WIDTH;
823 830 let mut slots: Vec<Slot> = Vec::new();
824 831 let proposals: Vec<PendingProposal> = agent_api::pending_proposals(cx)
825 832 .into_iter()
@@ -9,6 +9,7 @@ use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};
9use gpui_kit::prelude::FluentBuilder as _;
9use gpui_kit::prelude::FluentBuilder as _;
10use gpui_kit::*;
10use gpui_kit::*;
11use store::Sidebar;
11use store::Sidebar;
12use app_ui_kit::layout::SIDEBAR_WIDTH;
12
13
13use super::avatar::person_avatar;
14use super::avatar::person_avatar;
14use super::scroll_edge::{scroll_offset, with_top_edge};
15use super::scroll_edge::{scroll_offset, with_top_edge};
@@ -819,7 +820,13 @@ impl Render for ActivityPanel {
819 .read(cx)
820 .read(cx)
820 .feed()
821 .feed()
821 .sections(self.filter, today, offset);
822 .sections(self.filter, today, offset);
822 let text_width = f32::from(self.scroll.bounds().size.width) - ROW_CHROME_WIDTH;
823 let measured_width = f32::from(self.scroll.bounds().size.width);
824 let list_width = if measured_width > 1. {
825 measured_width
826 } else {
827 SIDEBAR_WIDTH
828 };
829 let text_width = list_width - ROW_CHROME_WIDTH;
823 let mut slots: Vec<Slot> = Vec::new();
830 let mut slots: Vec<Slot> = Vec::new();
824 let proposals: Vec<PendingProposal> = agent_api::pending_proposals(cx)
831 let proposals: Vec<PendingProposal> = agent_api::pending_proposals(cx)
825 .into_iter()
832 .into_iter()