Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Model picker: follow the UI font size preference (#7806)

Michael Han1c99d922209a
diff --git a/studio/frontend/src/features/model-picker/components/model-selector.tsx b/studio/frontend/src/features/model-picker/components/model-selector.tsx
index 376d8cde987..23b68f5612b 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-selector.tsx
@@ -186,6 +186,8 @@ function ModelSelectorTrigger({
"rounded-full bg-muted hover:bg-muted/80 has-[[data-eject-hit]:hover]:!bg-muted",
// More left padding than right; the chevron is pulled close to the
// label (below) so the trigger reads balanced around the text.
+ // Height stays pinned: both call sites force the chat header's own
+ // --studio-chat-control-height, which its fixed header cannot grow.
size === "sm" && "h-8 pl-3 pr-1.5 text-xs",
size === "default" && "h-9 pl-4 pr-2 text-sm",
size === "lg" && "h-10 pl-4.5 pr-2.5 text-sm",
@@ -519,9 +521,11 @@ function ModelSelectorContent({
"pt-4 pb-0 pl-4",
// Sized so the left-packed row keeps uniform gaps and the last
// dropdown's right gap matches the pill's left gap (pl-4 vs pr-4).
+ // Widths track the controls they hold, so the tuned single-line
+ // row does not wrap once text and icons grow.
hasExternal
- ? "w-[min(614px,calc(100vw-1rem))] pr-4"
- : "w-[min(506px,calc(100vw-1rem))] pr-2",
+ ? "w-[min(var(--picker-panel-w-external),calc(100vw-1rem))] pr-4"
+ : "w-[min(var(--picker-panel-w),calc(100vw-1rem))] pr-2",
),
className,
)}
@@ -864,13 +868,13 @@ function ExternalModelPicker({
<div className="relative">
<HugeiconsIcon
icon={Search01Icon}
- className="pointer-events-none absolute left-2.5 top-2.5 size-4 text-muted-foreground"
+ className="pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
/>
<Input
value={query}
onChange={(event) => setQuery(event.target.value)}
placeholder="Search models"
- className="h-9 pl-8"
+ className="h-(--picker-control-h) pl-8"
/>
</div>
<div className="-mr-1.5 max-h-72 overflow-y-auto pr-1.5">
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx
index b307976c74d..c7d4212e17b 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx
@@ -3042,7 +3042,7 @@ export function HubModelPicker({
// and stay visible while searching. Fixed width matches the Search Hub button
// so it and the format dropdown line up. Trigger label clips; the menu shows full.
const sortTriggerClassName =
- "w-[110px] shrink-0 justify-between pr-2.5 !border-0 text-xs [&>span]:!text-clip";
+ "h-(--picker-control-h) w-(--picker-control-w) shrink-0 justify-between pr-2.5 !border-0 text-xs [&>span]:!text-clip";
// Tighter menu (less padding, text-xs) matching the trigger. Keep the option's
// right padding so the selected-item checkmark never overlaps the label.
const sortMenuContentClassName =
@@ -3560,7 +3560,7 @@ export function HubModelPicker({
<div className="relative flex-1">
<HugeiconsIcon
icon={Search01Icon}
- className="pointer-events-none absolute left-2.5 top-2.5 size-4 text-muted-foreground"
+ className="pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
/>
<Input
value={query}
@@ -3571,10 +3571,10 @@ export function HubModelPicker({
: "Search Unsloth models"
}
data-model-picker-search-input={true}
- className="field-soft h-9 border-0 pl-8 pr-8"
+ className="field-soft h-(--picker-control-h) border-0 pl-8 pr-8"
/>
{isLoading && (
- <Spinner className="pointer-events-none absolute right-2.5 top-2.5 size-4 text-muted-foreground" />
+ <Spinner className="pointer-events-none absolute right-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" />
)}
</div>
{onBrowseHub ? (
@@ -3584,7 +3584,7 @@ export function HubModelPicker({
type="button"
onClick={onBrowseHub}
aria-label="Search more models on the Hub"
- className="hub-tab-toggle-pill flex h-9 w-[110px] shrink-0 items-center justify-center gap-[5px] rounded-full border-0 text-xs text-foreground transition-colors"
+ className="hub-tab-toggle-pill flex h-(--picker-control-h) w-(--picker-control-w) shrink-0 items-center justify-center gap-[5px] rounded-full border-0 text-xs text-foreground transition-colors"
>
<HugeiconsIcon
icon={DashboardCircleIcon}
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/pill-tabs.tsx b/studio/frontend/src/features/model-picker/components/model-selector/pill-tabs.tsx
index ed2d10ead31..472e661a4da 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/pill-tabs.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-selector/pill-tabs.tsx
@@ -43,7 +43,7 @@ export function PillTabs({
aria-label={ariaLabel}
className={cn(
"hub-menu-trigger hub-tab-toggle relative inline-flex items-center rounded-full",
- compact ? "h-7" : "h-9",
+ compact ? "h-7" : "h-(--picker-control-h)",
// Don't stretch to fill a flex-column parent (the popover) in fit mode,
// and never compress so the last tab keeps its padding.
fit && "w-fit max-w-full shrink-0 self-start",
@@ -86,7 +86,9 @@ export function PillTabs({
className={cn(
"relative z-10 inline-flex items-center justify-center gap-1.5 rounded-full transition-colors",
fit ? "min-w-0 shrink" : "min-w-0 flex-1",
- compact ? "h-7 px-2.5 text-ui-11" : "h-9 px-3 text-ui-12p5",
+ compact
+ ? "h-7 px-2.5 text-ui-11"
+ : "h-(--picker-control-h) px-3 text-ui-12p5",
value === tab.value
? "text-foreground"
: "text-muted-foreground hover:text-foreground",
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index fa64c5c6ee3..cc6ffa6be5c 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -305,6 +305,20 @@
18px), so icons read slightly smaller than enlarged text. */
--ui-icon-size: min(calc(1rem * var(--ui-font-scale, 1)), calc(0.5rem + 0.5rem * var(--ui-font-scale, 1)));
--icon-size: var(--ui-icon-size);
+ /* Mirrors the size-3.5 rule applied inside popovers (see the icon block
+ below), so widths that reserve room for those icons track them. */
+ --ui-icon-size-sm: min(calc(0.875rem * var(--ui-font-scale, 1)), calc(0.4375rem + 0.4375rem * var(--ui-font-scale, 1)));
+ /* Model picker header controls. Padding and gaps come from the pinned
+ --spacing, the icons and label both scale, so reserve each separately.
+ The trigger is 2.25rem of padding and gaps, two icons, then the label.
+ All match the h-9 / w-[110px] / 506px they replace at the 16px default. */
+ --picker-control-h: calc(1.125rem + 1.125rem * var(--ui-font-scale, 1));
+ --picker-control-w: calc(2.25rem + 2 * var(--ui-icon-size-sm) + 2.875rem * var(--ui-font-scale, 1));
+ /* Panel: pl-4, two gaps and pr-2, the pills' padding, their two icons and
+ label, then the two dropdowns. */
+ --picker-panel-w: calc(6.25rem + 2 * var(--ui-icon-size-sm) + 9.875rem * var(--ui-font-scale, 1) + 2 * var(--picker-control-w));
+ /* Provider row adds one more control; split like the rest. */
+ --picker-panel-w-external: calc(var(--picker-panel-w) + 4rem + 2.75rem * var(--ui-font-scale, 1));
/* Inset of a centered .size-icon glyph within a 2rem (size-8) action
button — i.e. (32px − icon-size) / 2. Use as a negative margin on a
chat-message action bar so the leftmost icon's visual edge aligns