From a5aea734744922416c7a1f21bc2301c7d39b7898 Mon Sep 17 00:00:00 2001
From: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Date: Tue, 7 Apr 2026 21:30:22 -0400
Subject: [PATCH] agent: Fix panel prompt footer layout in full screen (#53349)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
### Summary
Keep the prompt editor’s max-width centering, but move the footer
controls out of the same flexible wrapper as the full-height editor and
add `min_h_0()` shrink guards so the editor no longer overlaps the
footer in zoomed/full-screen mode.
#### Before
#### After
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes #ISSUE
Release Notes:
- N/A or Added/Fixed/Improved ...
---
.../src/conversation_view/thread_view.rs | 59 ++++++++++---------
1 file changed, 32 insertions(+), 27 deletions(-)
diff --git a/crates/agent_ui/src/conversation_view/thread_view.rs b/crates/agent_ui/src/conversation_view/thread_view.rs
index 119942100a2e091f64bf312bbb6ba5fd61572c56..8f9a8a1f8578143a790f876ca497d42e31dce2c0 100644
--- a/crates/agent_ui/src/conversation_view/thread_view.rs
+++ b/crates/agent_ui/src/conversation_view/thread_view.rs
@@ -3165,12 +3165,14 @@ impl ThreadView {
.child(
v_flex()
.flex_1()
+ .min_h_0()
.w_full()
.max_w(max_content_width)
.mx_auto()
.child(
v_flex()
.relative()
+ .min_h_0()
.size_full()
.when(v2_empty_state, |this| this.flex_1())
.pt_1()
@@ -3208,36 +3210,39 @@ impl ThreadView {
),
)
}),
+ ),
+ )
+ .child(
+ h_flex()
+ .w_full()
+ .max_w(max_content_width)
+ .mx_auto()
+ .flex_none()
+ .flex_wrap()
+ .justify_between()
+ .child(
+ h_flex()
+ .gap_0p5()
+ .child(self.render_add_context_button(cx))
+ .child(self.render_follow_toggle(cx))
+ .children(self.render_fast_mode_control(cx))
+ .children(self.render_thinking_control(cx)),
)
.child(
h_flex()
- .flex_none()
- .flex_wrap()
- .justify_between()
- .child(
- h_flex()
- .gap_0p5()
- .child(self.render_add_context_button(cx))
- .child(self.render_follow_toggle(cx))
- .children(self.render_fast_mode_control(cx))
- .children(self.render_thinking_control(cx)),
- )
- .child(
- h_flex()
- .gap_1()
- .children(self.render_token_usage(cx))
- .children(self.profile_selector.clone())
- .map(|this| {
- // Either config_options_view OR (mode_selector + model_selector)
- match self.config_options_view.clone() {
- Some(config_view) => this.child(config_view),
- None => this
- .children(self.mode_selector.clone())
- .children(self.model_selector.clone()),
- }
- })
- .child(self.render_send_button(cx)),
- ),
+ .gap_1()
+ .children(self.render_token_usage(cx))
+ .children(self.profile_selector.clone())
+ .map(|this| {
+ // Either config_options_view OR (mode_selector + model_selector)
+ match self.config_options_view.clone() {
+ Some(config_view) => this.child(config_view),
+ None => this
+ .children(self.mode_selector.clone())
+ .children(self.model_selector.clone()),
+ }
+ })
+ .child(self.render_send_button(cx)),
),
)
.into_any()