From 0abee5668a82addc89b67778f9cace183473f75f Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Fri, 9 May 2025 14:48:16 +0200 Subject: [PATCH] Fix text overlap with markdown code block in list in agent response (#30377) Seems that `h_full` was causing it to use the height of the overall list item for some reason. Closes #30002 Release Notes: - Agent Panel: Fixed text overlap for code blocks nested in lists in agent response. --- crates/agent/src/active_thread.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs index 6d039c8e68e0c209e6ce3ce07c6efe2ed2d464d4..9182aa0c8a33d7af14253c3d4837ff5a991574a1 100644 --- a/crates/agent/src/active_thread.rs +++ b/crates/agent/src/active_thread.rs @@ -600,14 +600,8 @@ fn render_markdown_code_block( .bg(cx.theme().colors().editor_background) .child(codeblock_header) .when( - metadata.line_count > MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK, - |this| { - if is_expanded { - this.h_full() - } else { - this.max_h_80() - } - }, + metadata.line_count > MAX_UNCOLLAPSED_LINES_IN_CODE_BLOCK && !is_expanded, + |this| this.max_h_80(), ) }