From 4317359bcf12dfbdab45a5385e2a2c399d3f6767 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Mon, 30 Mar 2026 08:09:58 -0300 Subject: [PATCH] agent_ui: Fix auto-scroll in subagent cards (#52719) Due to the async nature of markdown parsing, sometimes subagent cards would not scroll fully to the bottom of the content because the `scroll_to_bottom` function was being called just while the agent was running... and sometimes, it'd finish running before the markdown had fully finished parsing. The solution is to remove the `is_running` conditional. Release Notes: - Agent: Improved auto-scroll of subagent content in preview cards, ensuring the content is always visible until the end. --- crates/agent_ui/src/conversation_view/thread_view.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/agent_ui/src/conversation_view/thread_view.rs b/crates/agent_ui/src/conversation_view/thread_view.rs index 77b2b1f82c21cfbe424d047f80b1a554f15e10db..c14636be8c94caf6c588c9e1c8c939a69049b7a5 100644 --- a/crates/agent_ui/src/conversation_view/thread_view.rs +++ b/crates/agent_ui/src/conversation_view/thread_view.rs @@ -7759,7 +7759,6 @@ impl ThreadView { this.when(is_expanded, |this| { this.child(self.render_subagent_expanded_content( thread_view, - is_running, tool_call, window, cx, @@ -7782,7 +7781,6 @@ impl ThreadView { fn render_subagent_expanded_content( &self, thread_view: &Entity, - is_running: bool, tool_call: &ToolCall, window: &Window, cx: &Context, @@ -7834,9 +7832,8 @@ impl ThreadView { .entry(session_id.clone()) .or_default() .clone(); - if is_running { - scroll_handle.scroll_to_bottom(); - } + + scroll_handle.scroll_to_bottom(); let rendered_entries: Vec = entries .get(entry_range)