From 5e14d46567f87a5dc82f140c347a3859c7864906 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Mon, 23 Feb 2026 18:45:29 +0100 Subject: [PATCH] agent: Allow expanding subagent from full header (#49911) Makes it a bigger click target for the expanded preview. Release Notes: - N/A --- .../agent_ui/src/acp/thread_view/active_thread.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 3ef684eb941a7cae9c9ac62cc18800fc2b062cf8..5ca4770a7dfc9df3c654f64855623227432b55c2 100644 --- a/crates/agent_ui/src/acp/thread_view/active_thread.rs +++ b/crates/agent_ui/src/acp/thread_view/active_thread.rs @@ -6155,6 +6155,7 @@ impl AcpThreadView { .overflow_hidden() .child( h_flex() + .id(format!("subagent-header-click-{}", entry_ix)) .group(&card_header_id) .p_1() .pl_1p5() @@ -6162,6 +6163,19 @@ impl AcpThreadView { .gap_1() .justify_between() .bg(self.tool_card_header_bg(cx)) + .when(has_expandable_content, |this| { + this.cursor_pointer().on_click(cx.listener({ + let tool_call_id = tool_call.id.clone(); + move |this, _, _, cx| { + if this.expanded_tool_calls.contains(&tool_call_id) { + this.expanded_tool_calls.remove(&tool_call_id); + } else { + this.expanded_tool_calls.insert(tool_call_id.clone()); + } + cx.notify(); + } + })) + }) .child( h_flex() .id(format!("subagent-title-{}", entry_ix))