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.

Studio: pinned Run settings footer, model picker on the radius scale (#15104)

Michael Hanb143b37d5014
diff --git a/studio/frontend/scripts/check-bundle-budget.ts b/studio/frontend/scripts/check-bundle-budget.ts
index a310131adeb..00570bec886 100644
--- a/studio/frontend/scripts/check-bundle-budget.ts
+++ b/studio/frontend/scripts/check-bundle-budget.ts
@@ -420,8 +420,10 @@ export const BUDGET = {
// stream frame reader, live store slice, reply footer line and timing tooltip rows in the eager chat
// chunk, +8,585 B raw / +2,268 B transfer over main (6,932,829 -> 6,941,414 B raw, 2,088,586 ->
// 2,090,854 B transfer against 1492952a09, Node 22, 99 chunks). Raised by that on top of #15084 and #15025.
- transferBytes: 2_091_068,
- rawBytes: 6_942_035,
+ // The pinned Run settings footer adds 25 B raw / 49 B transfer to the eager model picker (6,932,829 -> 6,932,854 B
+ // raw, 2,088,616 -> 2,088,665 B transfer against 2c2e04474b, Node 26, unchanged at 99 chunks). Raised by that.
+ transferBytes: 2_091_117,
+ rawBytes: 6_942_060,
};
// The chunk count is reported but not budgeted. Splitting a page out of the entry raises it while lowering the
diff --git a/studio/frontend/src/features/model-picker/components/model-config-page.tsx b/studio/frontend/src/features/model-picker/components/model-config-page.tsx
index 6e73837fe93..917da93f507 100644
--- a/studio/frontend/src/features/model-picker/components/model-config-page.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-config-page.tsx
@@ -78,6 +78,7 @@ import {
resolveSpeculativeType,
} from "@/lib/speculative-modes";
import { toast } from "@/lib/toast";
+import { cn } from "@/lib/utils";
import {
type ReactNode,
type Ref,
@@ -256,10 +257,6 @@ const SELECT_TRIGGER_CLASS = `panel-select-trigger grid h-8! min-w-0 grid-cols-[
// .panel-field carries the surface and the value's alignment; the field adds its size.
const NUMBER_INPUT_CLASS = `panel-field h-8 ${INPUT_WIDTH_CLASS}`;
const TEXT_INPUT_CLASS = `panel-field h-8 ${INPUT_WIDTH_CLASS} min-w-0`;
-// Matches the Preset section's Save/Delete pair rather than the Button's own `sm` metrics.
-// Width is the label plus this padding, so a pill is never wider than what it says.
-const FOOTER_BUTTON_CLASS =
- "h-9 w-auto px-4 rounded-full text-ui-13 font-medium tracking-nav";
// Mirrors the backend's Auto default once GPU-only placement is impossible.
const AUTO_OFFLOAD_CONTEXT_LENGTH = 8192;
@@ -3661,18 +3658,16 @@ export function ModelConfigPage({
normalizePerModelConfig(storedSpeculativeAuto(runtimeConfig, targetIsMlx)),
storedRecord.config,
);
- // Never mounted on demand: the click that saves would move Load.
+ // Always mounted: a status appearing on save would move Load.
const saveStatus = savedRemember
? remember
? matchesStored
? "Saved for this model"
: "Unsaved changes"
: "Saved settings will be forgotten"
- : remember
- ? "Not saved yet"
- : atDefault
- ? "Using default settings"
- : "Not remembered for this model";
+ : !remember && atDefault
+ ? "Using default settings"
+ : "";
const persistenceOnly = isActiveModel && atBaseline && rememberChanged;
const primaryActionLabel = persistenceOnly
? remember
@@ -3931,14 +3926,13 @@ export function ModelConfigPage({
}}
>
{variant === "page" && showHeader && (
- // -ml-1.5 cancels the icon's inset in its 28px circle, so the chevron starts on
- // the same left edge as the rows below.
+ // -ml-2.75: the button's 6px inset plus the glyph's ~5px, so the stroke aligns with the rows.
<div className="flex items-center gap-2.5 pb-5">
{onBack && (
<button
type="button"
onClick={onBack}
- className="nav-icon-btn -ml-1.5 shrink-0 text-nav-icon-idle hover:bg-panel-surface-hover hover:text-black dark:hover:text-white"
+ className="nav-icon-btn -ml-2.75 shrink-0 text-nav-icon-idle hover:bg-panel-surface-hover hover:text-black dark:hover:text-white"
aria-label="Back to model list"
>
<HugeiconsIcon
@@ -4154,8 +4148,17 @@ export function ModelConfigPage({
{/* Stacked in both variants: a row that wraps on demand reflows when the same click that
commits a draft mounts Save settings, moving Load out from under the cursor. */}
- <div className="mt-5 flex flex-col gap-3.5 border-t border-border pt-5">
- <div className="flex min-w-0 flex-col gap-1">
+ <div
+ className={cn(
+ "mt-5",
+ // Sticky offsets start inside the scroller's 18px padding: -bottom-4.5 reaches the panel edge,
+ // and the negative margins cover that padding with the panel's fill.
+ variant === "page" &&
+ "sticky -bottom-4.5 z-10 -mb-4.5 -ml-7 -mr-[calc(var(--spacing)*5+min(var(--overlay-scrollbar-gutter,0px),var(--spacing)*2))] bg-popover pb-4.5 pl-7 pr-[calc(var(--spacing)*5+min(var(--overlay-scrollbar-gutter,0px),var(--spacing)*2))] dark:bg-sidebar",
+ )}
+ >
+ {/* pt-3.25: Remember's cap top 18px under the rule, as under the buttons. */}
+ <div className="flex flex-col gap-3.5 border-t border-border pt-3.25">
<div className="flex min-w-0 items-center gap-2">
<Checkbox
id={rememberId}
@@ -4174,15 +4177,15 @@ export function ModelConfigPage({
>
Remember for this model
</label>
- </div>
- <p
- id={saveStatusId}
- aria-live="polite"
- data-state={saveStatus === "Unsaved changes" ? "dirty" : undefined}
- className="truncate pl-6 text-ui-11 leading-snug text-muted-foreground data-[state=dirty]:text-amber-600 dark:data-[state=dirty]:text-amber-400"
- >
- {saveStatus}
- </p>
+ {/* On this row so a status change never moves the buttons. */}
+ <p
+ id={saveStatusId}
+ aria-live="polite"
+ data-state={saveStatus === "Unsaved changes" ? "dirty" : undefined}
+ className="ml-auto min-w-0 truncate text-ui-11 leading-snug text-muted-foreground data-[state=dirty]:text-amber-600 dark:data-[state=dirty]:text-amber-400"
+ >
+ {saveStatus}
+ </p>
</div>
<div className="flex flex-wrap items-center gap-2">
{/* Primary action first, like the Preset row's Save/Delete. */}
@@ -4190,7 +4193,6 @@ export function ModelConfigPage({
variant="dark"
type="button"
size="sm"
- className={FOOTER_BUTTON_CLASS}
disabled={
sharedVariantUnresolved ||
((config.engine ?? "auto") !== "auto" && !engineReady) ||
@@ -4214,7 +4216,6 @@ export function ModelConfigPage({
type="button"
variant="outline"
size="sm"
- className={FOOTER_BUTTON_CLASS}
// Same gates as Load: an unclassified model or an in-flight budget PUT would persist
// settings the load path strips or has already captured. Forget stores nothing, so
// broken saved arguments must not lock it.
@@ -4236,7 +4237,7 @@ export function ModelConfigPage({
type="button"
variant="outline"
size="sm"
- className={`${FOOTER_BUTTON_CLASS} text-muted-foreground`}
+ className="text-muted-foreground"
disabled={atDefault}
onClick={() => {
handleSharedConfigEdit();
@@ -4257,7 +4258,7 @@ export function ModelConfigPage({
</Button>
{target.isGguf && (
<SharedRunConfigControls
- className={FOOTER_BUTTON_CLASS}
+ className="text-muted-foreground"
target={target}
config={config}
ready={!extraArgsHydrating}
@@ -4272,6 +4273,7 @@ export function ModelConfigPage({
)}
</div>
</div>
+ </div>
<ChatTemplateEditorDialog
open={templateOpen}
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 9ab2b6950dc..79f58e0c9cd 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-selector.tsx
@@ -652,12 +652,14 @@ function ModelSelectorContent({
className={cn(
"unsloth-model-selector-menu menu-soft-surface ring-0 max-w-[calc(100vw-1rem)] min-w-0 gap-0",
visibleConfigTarget
- ? // The surface stays the surface: it clips to its own radius and never scrolls. Making
- // the rounded box the scroller put the scrollbar inside it, running the full height
- // and straight through the top and bottom right corners, which squared them off on
- // any machine set to show scrollbars always. The padding moves in with the scroller so
- // the bar sits beside the content instead of on the edge.
- "max-h-[var(--radix-popover-content-available-height)] w-[min(468px,calc(100vw-1rem))] overflow-hidden p-0"
+ ? // Clips, never scrolls: as the scroller, the always-on scrollbar squared off its corners.
+ // !px-0: the list view's snapped inline padding would hold the scrollbar 8px off the edge.
+ cn(
+ "max-h-[var(--radix-popover-content-available-height)] overflow-hidden p-0 !px-0",
+ hasExternal
+ ? "w-[min(var(--picker-panel-w-external),calc(100vw-1rem))]"
+ : "w-[min(var(--picker-panel-w),calc(100vw-1rem))]",
+ )
: cn(
"pt-4 pb-0 pl-4",
// Sized so the left-packed row keeps uniform gaps and the last dropdown's right gap matches
@@ -679,7 +681,8 @@ function ModelSelectorContent({
disableHoverableContent={true}
>
{visibleConfigTarget ? (
- <div className="min-h-0 w-full overflow-y-auto px-4 pt-4 pb-4 [scrollbar-gutter:stable]">
+ // 28px sides like the list's text; the right is 20px plus the bar, an overlay strip capped at 8px.
+ <div className="min-h-0 w-full overflow-y-auto pt-4.5 pr-[calc(var(--spacing)*5+min(var(--overlay-scrollbar-gutter,0px),var(--spacing)*2))] pb-4.5 pl-7 [scrollbar-gutter:stable]">
<ModelConfigPage
key={modelConfigInstanceKey(
visibleConfigTarget.configId ?? visibleConfigTarget.id,
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 edc4626b389..c7203134491 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
@@ -9007,7 +9007,7 @@ export function HubModelPicker({
<button
type="button"
onClick={() => (ejectsAll ? onEjectAll?.() : onEject())}
- className="pointer-events-auto inline-flex items-center justify-center gap-2 rounded-md bg-popover px-3 py-2 text-ui-13 font-medium text-destructive shadow-[0_2px_8px_-2px_rgba(0,0,0,0.16)] transition-colors hover:bg-[color-mix(in_srgb,var(--foreground)_8%,var(--popover))] dark:bg-sidebar-accent dark:shadow-none dark:hover:bg-[color-mix(in_srgb,var(--foreground)_8%,var(--sidebar-accent))]"
+ className="pointer-events-auto inline-flex items-center justify-center gap-2 rounded-full bg-popover px-3 py-2 text-ui-13 font-medium text-destructive shadow-[0_2px_8px_-2px_rgba(0,0,0,0.16)] transition-colors hover:bg-[color-mix(in_srgb,var(--foreground)_8%,var(--popover))] dark:bg-sidebar-accent dark:shadow-none dark:hover:bg-[color-mix(in_srgb,var(--foreground)_8%,var(--sidebar-accent))]"
title={ejectsAll ? "Eject all models" : "Eject model"}
>
<HugeiconsIcon icon={RemoveCircleIcon} className="size-3.5" />
diff --git a/studio/frontend/src/features/model-picker/sharing/config-controls.tsx b/studio/frontend/src/features/model-picker/sharing/config-controls.tsx
index ecc9fa6e8e6..ef6fd4cd555 100644
--- a/studio/frontend/src/features/model-picker/sharing/config-controls.tsx
+++ b/studio/frontend/src/features/model-picker/sharing/config-controls.tsx
@@ -4,6 +4,8 @@
import { LazyImportBoundary } from "@/components/lazy-import-boundary";
import { Button } from "@/components/ui/button";
import { toast } from "@/lib/toast";
+import { Share01Icon } from "@hugeicons/core-free-icons";
+import { HugeiconsIcon } from "@hugeicons/react";
import { type ComponentProps, Suspense, lazy, useLayoutEffect } from "react";
import type { ModelPickTarget } from "../components/model-selector/types";
import {
@@ -97,12 +99,18 @@ export function SharedRunConfigControls({
const fallback = (
<Button
type="button"
- size="sm"
+ size="icon-sm"
variant="outline"
className={props.className}
+ aria-label="Share"
+ title="Share"
disabled
>
- Share
+ <HugeiconsIcon
+ icon={Share01Icon}
+ strokeWidth={1.75}
+ className="size-[calc(1rem*var(--ui-space-scale,1))]"
+ />
</Button>
);
return (
diff --git a/studio/frontend/src/features/model-picker/sharing/config-ui.tsx b/studio/frontend/src/features/model-picker/sharing/config-ui.tsx
index cfe1d13c3ae..3ae12480c3d 100644
--- a/studio/frontend/src/features/model-picker/sharing/config-ui.tsx
+++ b/studio/frontend/src/features/model-picker/sharing/config-ui.tsx
@@ -3,6 +3,7 @@
import { Button } from "@/components/ui/button";
import { ChevronDownStandardIcon } from "@/lib/chevron-icons";
+import { Share01Icon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { useEffect, useState, useSyncExternalStore } from "react";
import type { ModelPickTarget } from "../components/model-selector/types";
@@ -58,13 +59,19 @@ export function SharedRunConfigActions({
<>
<Button
type="button"
- size="sm"
+ size="icon-sm"
variant="outline"
className={className}
+ aria-label="Share"
+ title="Share"
disabled={!ready || disabled}
onClick={() => setSharing(true)}
>
- Share
+ <HugeiconsIcon
+ icon={Share01Icon}
+ strokeWidth={1.75}
+ className="size-[calc(1rem*var(--ui-space-scale,1))]"
+ />
</Button>
{sharing && (
<ShareRunConfigDialog
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index 7688d77539f..c1f02f6cd3c 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -3132,29 +3132,6 @@ html[data-chat-font] .aui-root {
--radius-xl: 20px;
}
- /* The model picker keeps the corners it was designed with: the scale it had before the fixed
- tiers (derived from a 1.25rem base) and its 1.25rem surface. */
- .unsloth-model-selector-menu {
- --radius: 1.1rem;
- --radius-sm: calc(1.25rem - 4px);
- --radius-md: calc(1.25rem - 2px);
- --radius-lg: 1.25rem;
- --radius-xl: calc(1.25rem + 4px);
- --radius-2xl: calc(1.25rem + 8px);
- --radius-3xl: calc(1.25rem + 12px);
- --radius-4xl: calc(1.25rem + 16px);
- }
- .unsloth-model-selector-menu[data-slot] {
- border-radius: 1.25rem !important;
- }
- /* Its outline buttons keep their border. */
- html:not(.dark) .unsloth-model-selector-menu .btn-fill {
- border-color: var(--border);
- background-color: var(--background);
- }
- html:not(.dark) .unsloth-model-selector-menu .btn-fill:hover {
- background-color: color-mix(in oklab, var(--accent) 50%, transparent);
- }
html.dark .unsloth-model-selector-menu .btn-fill {
background-color: rgb(255 255 255 / calc(0.06 * var(--contrast-wash-gain, 1)));
}
diff --git a/studio/frontend/tests/model-config-popover-scroller.test.ts b/studio/frontend/tests/model-config-popover-scroller.test.ts
index 50a4db395f5..5423d75d92f 100644
--- a/studio/frontend/tests/model-config-popover-scroller.test.ts
+++ b/studio/frontend/tests/model-config-popover-scroller.test.ts
@@ -28,7 +28,7 @@ test("the popover surface clips and caps, so it never scrolls itself", () => {
test("the config page gets its own scroller inside that surface", () => {
assert.ok(
SELECTOR.includes(
- '<div className="min-h-0 w-full overflow-y-auto px-4 pt-4 pb-4 [scrollbar-gutter:stable]">',
+ '<div className="min-h-0 w-full overflow-y-auto pt-4.5 pr-[calc(var(--spacing)*5+min(var(--overlay-scrollbar-gutter,0px),var(--spacing)*2))] pb-4.5 pl-7 [scrollbar-gutter:stable]">',
),
"the inner box scrolls, carries the padding the surface gave up, and reserves its scrollbar gutter: on an auto gutter the custom scrollbar re-laid out the whole page twice a frame while a slider was dragged",
);
diff --git a/studio/frontend/tests/run-settings-save-state.test.ts b/studio/frontend/tests/run-settings-save-state.test.ts
index ea4f865a003..6f6781d74a6 100644
--- a/studio/frontend/tests/run-settings-save-state.test.ts
+++ b/studio/frontend/tests/run-settings-save-state.test.ts
@@ -30,12 +30,13 @@ test("the save status covers every Remember state and is always rendered", () =>
"Saved for this model",
"Unsaved changes",
"Saved settings will be forgotten",
- "Not saved yet",
"Using default settings",
- "Not remembered for this model",
]) {
assert.ok(CONFIG_PAGE.includes(`"${label}"`), `missing status: ${label}`);
}
+ for (const label of ["Not saved yet", "Not remembered for this model"]) {
+ assert.ok(!CONFIG_PAGE.includes(`"${label}"`), `redundant status: ${label}`);
+ }
// Mounted on demand it would push Load down under the cursor on the click that saves.
assert.match(CONFIG_PAGE, /\{saveStatus\}/);
assert.doesNotMatch(CONFIG_PAGE, /saveStatus &&/);