From 7927a3b102e062f218ebfa8c4d8e03e0ec7c4f17 Mon Sep 17 00:00:00 2001 From: krustophski Date: Fri, 25 Sep 2026 04:26:36 +0300 Subject: [PATCH] fix(gui): input toolbar overflows panel edge instead of truncating model name Confirmed this reproduces identically in stock upstream Continue from the Marketplace (not introduced by this fork) -- flagging here as a genuine bug this fork fixes on top of upstream, not a regression. The toolbar's flex row (InputToolbar.tsx), the model-select button (ModelSelect.tsx), and the shared ListboxButton base component (ui/Listbox.tsx) all lacked min-w-0. CSS flexbox items default to min-width: auto, which refuses to shrink a flex child below its content's natural width -- so ModelSelect's line-clamp-1 truncation on a long model name (e.g. "qwen3.8-27b (qore)") never actually engaged, and the whole toolbar row grew wider than the panel instead, pushing the "Active file" hint and Send button off the visible edge. Reproduces at any panel width once the model name is long enough. Added min-w-0 down the whole flex chain (outer toolbar row -> left icon group -> ModelSelect's wrapper -> ListboxButton -> the label span) and flex-shrink-0 on the right-side toolbar group (Active file hint + Send button) so that group always stays fully visible and the model name truncates first instead. Co-Authored-By: Claude Sonnet 5 --- gui/src/components/mainInput/InputToolbar.tsx | 12 +++++++++--- gui/src/components/modelSelection/ModelSelect.tsx | 6 +++--- gui/src/components/ui/Listbox.tsx | 10 +++++++++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index 99a940b78..4ce7e339f 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -78,12 +78,18 @@ function InputToolbar(props: InputToolbarProps) { <>
-
+ {/* min-w-0 is load-bearing here: without it, a flex child refuses to + shrink below its content's natural width (CSS default min-width: + auto), so ModelSelect's line-clamp-1 truncation never actually + engages and this whole row overflows the panel's right edge instead + -- reproduces identically in stock upstream Continue, not specific + to this fork. See continue-custom's git log for this file. */} +
{!isInEdit && ( @@ -169,7 +175,7 @@ function InputToolbar(props: InputToolbarProps) {
-
+
- + {modelSelectTitle(selectedModel) || "Select model"} ( ref={ref} {...props} className={cn( - "bg-vsc-input-background text-vsc-foreground border-border m-0 flex flex-1 cursor-pointer flex-row items-center gap-1 border border-solid px-1 py-0.5 text-left transition-colors duration-200", + // min-w-0 overrides the flexbox default (min-width: auto), which + // otherwise stops this button from ever shrinking below its + // label's natural width -- the child 's line-clamp/truncate + // styling can't engage without it, so a long label (e.g. a long + // model name) pushes sibling toolbar items off the panel's edge + // instead of truncating. Reproduces in stock upstream Continue too + // (not specific to this fork's changes) -- see + // gui/src/components/mainInput/InputToolbar.tsx's matching fix. + "bg-vsc-input-background text-vsc-foreground border-border m-0 flex min-w-0 flex-1 cursor-pointer flex-row items-center gap-1 border border-solid px-1 py-0.5 text-left transition-colors duration-200", props.className, )} style={{