From 41c007f9eeea4ada65d2d6b412b09c3eb7bf5379 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Thu, 19 Feb 2026 13:49:31 -0800 Subject: [PATCH] Fix subagent card buttons getting clipped by long titles (#49648) When a subagent title is long, the header buttons (expand/collapse, maximize, stop) were pushed out of view because the title area grew unconstrained. ## Fix - Add `min_w_0()` and `overflow_hidden()` to the title container so it can shrink below its content width - Add `truncate()` to the title label so it shows an ellipsis when clipped - Add `flex_shrink_0()` to the buttons container so it never gets squeezed out - Add a tooltip on the title area showing the full text on hover Release Notes: - N/A --- .../agent_ui/src/acp/thread_view/active_thread.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/agent_ui/src/acp/thread_view/active_thread.rs b/crates/agent_ui/src/acp/thread_view/active_thread.rs index 7dd0101f624f92f698b92df0a6842acd2fe48f4b..2630d3ffd6c41891c0b56501fb36a027f141aa91 100644 --- a/crates/agent_ui/src/acp/thread_view/active_thread.rs +++ b/crates/agent_ui/src/acp/thread_view/active_thread.rs @@ -6104,9 +6104,16 @@ impl AcpThreadView { .bg(self.tool_card_header_bg(cx)) .child( h_flex() + .id(format!("subagent-title-{}-{}", entry_ix, context_ix)) + .min_w_0() + .overflow_hidden() .gap_1p5() .child(icon) - .child(Label::new(title.to_string()).size(LabelSize::Small)) + .child( + Label::new(title.to_string()) + .size(LabelSize::Small) + .truncate(), + ) .when(files_changed > 0, |this| { this.child( h_flex() @@ -6126,11 +6133,13 @@ impl AcpThreadView { diff_stats.lines_removed as usize, )), ) - }), + }) + .tooltip(Tooltip::text(title.to_string())), ) .when_some(session_id, |this, session_id| { this.child( h_flex() + .flex_shrink_0() .when(has_expandable_content, |this| { this.child( IconButton::new(