From 9e3e5bc0ac6ac420eb007134b633d9c270ece346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 26 Aug 2026 17:40:51 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(ui):=20wrap=20long=20notice-?= =?UTF-8?q?plate=20text=20instead=20of=20overflowing=20the=20box?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit notice_plate's max_w(480) only bounds the div; a bare text child of a flex row measures min-content as the whole line, so GPUI never gave it a Definite width to wrap against. Same shape as overlays.rs's notice bar: wrap the text in a flex_1 child so it inherits the container's resolved width. --- crates/app/src/ui/stance.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/app/src/ui/stance.rs b/crates/app/src/ui/stance.rs index d4cd187..f509be9 100644 --- a/crates/app/src/ui/stance.rs +++ b/crates/app/src/ui/stance.rs @@ -639,7 +639,15 @@ fn notice_plate(message: SharedString, bench_h: f32) -> impl IntoElement { gpui::FontWeight::MEDIUM, )) .text_color(rgb(INK1())) - .child(message) + // `div()` is a flex row by default, and a bare text child measures + // its min-content as the *whole line* (`TextLayout::layout` only + // wraps against a `Definite` available width, which a flex item's + // content-sizing pass never supplies). `w_full`/`max_w` on the + // plate itself only bounds the *container* -- the text still never + // sees a definite width to wrap against unless it is a `flex_1` + // child, which is handed the container's resolved width. Same fix + // as `overlays.rs`'s notice bar (`div().flex_1().min_w(...)`). + .child(div().flex_1().child(message)) } /// Thin strip at the bottom of the centre column: project identity, last