fix(gui): input toolbar overflows panel edge instead of truncating model name
Some checks are pending
Main Branch Build / republish-pr-artifacts (Linux) (push) Waiting to run
Main Branch Build / republish-pr-artifacts (macOS) (push) Waiting to run
PR Checks / track-rerun (push) Waiting to run
PR Checks / prettier-check (push) Waiting to run
PR Checks / core-checks (push) Waiting to run
PR Checks / gui-checks (push) Waiting to run
PR Checks / binary-checks (push) Waiting to run
PR Checks / vscode-checks (push) Waiting to run
PR Checks / get-packages-matrix (push) Waiting to run
PR Checks / packages-checks (push) Blocked by required conditions
PR Checks / vscode-get-test-file-matrix (push) Waiting to run
PR Checks / vscode-package-extension-linux (push) Waiting to run
PR Checks / unknown () (push) Blocked by required conditions
PR Checks / jetbrains-tests (push) Waiting to run
PR Checks / require-all-checks-to-pass (push) Blocked by required conditions
Submit Gradle Dependency Graph For Dependabot / dependency-submission (push) Waiting to run
Some checks are pending
Main Branch Build / republish-pr-artifacts (Linux) (push) Waiting to run
Main Branch Build / republish-pr-artifacts (macOS) (push) Waiting to run
PR Checks / track-rerun (push) Waiting to run
PR Checks / prettier-check (push) Waiting to run
PR Checks / core-checks (push) Waiting to run
PR Checks / gui-checks (push) Waiting to run
PR Checks / binary-checks (push) Waiting to run
PR Checks / vscode-checks (push) Waiting to run
PR Checks / get-packages-matrix (push) Waiting to run
PR Checks / packages-checks (push) Blocked by required conditions
PR Checks / vscode-get-test-file-matrix (push) Waiting to run
PR Checks / vscode-package-extension-linux (push) Waiting to run
PR Checks / unknown () (push) Blocked by required conditions
PR Checks / jetbrains-tests (push) Waiting to run
PR Checks / require-all-checks-to-pass (push) Blocked by required conditions
Submit Gradle Dependency Graph For Dependabot / dependency-submission (push) Waiting to run
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 <noreply@anthropic.com>
This commit is contained in:
parent
1618baf72c
commit
7927a3b102
3 changed files with 21 additions and 7 deletions
|
|
@ -78,12 +78,18 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
<>
|
||||
<div
|
||||
onClick={props.onClick}
|
||||
className={`find-widget-skip bg-vsc-input-background flex select-none flex-row items-center justify-between gap-1 pt-1 ${props.hidden ? "pointer-events-none h-0 cursor-default opacity-0" : "pointer-events-auto mt-2 cursor-text opacity-100"}`}
|
||||
className={`find-widget-skip bg-vsc-input-background flex min-w-0 select-none flex-row items-center justify-between gap-1 pt-1 ${props.hidden ? "pointer-events-none h-0 cursor-default opacity-0" : "pointer-events-auto mt-2 cursor-text opacity-100"}`}
|
||||
style={{
|
||||
fontSize: smallFont,
|
||||
}}
|
||||
>
|
||||
<div className="xs:gap-1.5 flex flex-row items-center gap-1">
|
||||
{/* 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. */}
|
||||
<div className="xs:gap-1.5 flex min-w-0 flex-row items-center gap-1">
|
||||
{!isInEdit && (
|
||||
<ToolTip place="top" content="Select Mode">
|
||||
<HoverItem className="!p-0">
|
||||
|
|
@ -169,7 +175,7 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
</div>
|
||||
|
||||
<div
|
||||
className="text-description flex items-center gap-2 whitespace-nowrap"
|
||||
className="text-description flex flex-shrink-0 items-center gap-2 whitespace-nowrap"
|
||||
style={{
|
||||
fontSize: tinyFont,
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -245,13 +245,13 @@ function ModelSelect() {
|
|||
);
|
||||
}}
|
||||
>
|
||||
<div className="relative flex">
|
||||
<div className="relative flex min-w-0">
|
||||
<ListboxButton
|
||||
data-testid="model-select-button"
|
||||
ref={buttonRef}
|
||||
className="text-description h-[18px] gap-1 border-none"
|
||||
className="text-description h-[18px] min-w-0 gap-1 border-none"
|
||||
>
|
||||
<span className="line-clamp-1 break-all hover:brightness-110">
|
||||
<span className="line-clamp-1 min-w-0 break-all hover:brightness-110">
|
||||
{modelSelectTitle(selectedModel) || "Select model"}
|
||||
</span>
|
||||
<ChevronDownIcon
|
||||
|
|
|
|||
|
|
@ -21,7 +21,15 @@ const ListboxButton = React.forwardRef<HTMLButtonElement, ListboxButtonProps>(
|
|||
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 <span>'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={{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue