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: match the loaded models card to the update banners (#8292)

Michael Han871e4ab3e9bc
diff --git a/studio/frontend/src/features/loaded-models/loaded-models-indicator.tsx b/studio/frontend/src/features/loaded-models/loaded-models-indicator.tsx
index 888d6d430bb..fa7a67dc544 100644
--- a/studio/frontend/src/features/loaded-models/loaded-models-indicator.tsx
+++ b/studio/frontend/src/features/loaded-models/loaded-models-indicator.tsx
@@ -281,7 +281,7 @@ export function LoadedModelsIndicator({
onClick={() => {
if (!justDragged()) setCollapsed(false);
}}
- className="menu-soft-surface pointer-events-auto flex h-9 cursor-grab touch-none items-center gap-1.5 rounded-full pl-2.5 pr-3 font-heading text-muted-foreground transition-colors hover:text-foreground active:cursor-grabbing"
+ className="menu-soft-surface menu-soft-edgeless pointer-events-auto flex h-9 cursor-grab touch-none items-center gap-1.5 rounded-full pl-2.5 pr-3 font-heading text-muted-foreground transition-colors hover:text-foreground active:cursor-grabbing"
>
<HugeiconsIcon
icon={SparkleIcon}
@@ -298,8 +298,8 @@ export function LoadedModelsIndicator({
</TooltipContent>
</Tooltip>
) : (
- <div className="menu-soft-surface pointer-events-auto flex min-h-0 w-[268px] max-w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-[20px] p-1.5 font-heading">
- <div className="flex items-center gap-1.5 px-1.5 pb-1 pt-0.5">
+ <div className="menu-soft-surface menu-soft-edgeless pointer-events-auto flex min-h-0 w-[268px] max-w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-[20px] p-1.5 font-heading">
+ <div className="flex items-center gap-1.5 px-1.5 pb-2.5 pt-0.5">
<HugeiconsIcon
icon={SparkleIcon}
strokeWidth={1.75}
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index ef7ec1ea82e..1f7a6b254b7 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -1581,6 +1581,13 @@ html[data-chat-font] .aui-root {
--menu-soft-spread: -8px;
}
+ /* Same surface without the inset edge ring: the update banners' look.
+ Reuses the vars above, so both themes stay in step. */
+ .menu-soft-surface.menu-soft-edgeless {
+ box-shadow: 0 var(--menu-soft-offset-y) var(--menu-soft-blur)
+ var(--menu-soft-spread) var(--menu-soft-shadow);
+ }
+
/* Model selector: drop the inset edge ring, keep the soft drop shadow.
Pin --radius to the light value so the corners match in both themes. */
.unsloth-model-selector-menu.menu-soft-surface {
diff --git a/studio/frontend/tests/loaded-models-surface.test.ts b/studio/frontend/tests/loaded-models-surface.test.ts
new file mode 100644
index 00000000000..0ea3a7cc6cc
--- /dev/null
+++ b/studio/frontend/tests/loaded-models-surface.test.ts
@@ -0,0 +1,100 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+// The card wore menu-soft-surface's inset edge ring, which the update banners
+// do not. Read from the source: the node suite has no DOM to compute styles in.
+
+import assert from "node:assert/strict";
+import { readFileSync } from "node:fs";
+import test from "node:test";
+
+const CSS = readFileSync(new URL("../src/index.css", import.meta.url), "utf8");
+const INDICATOR = readFileSync(
+ new URL(
+ "../src/features/loaded-models/loaded-models-indicator.tsx",
+ import.meta.url,
+ ),
+ "utf8",
+);
+const BANNER = readFileSync(
+ new URL("../src/components/llama-update-banner.tsx", import.meta.url),
+ "utf8",
+);
+
+function surface(source: string, anchor: string): string {
+ const at = source.indexOf(anchor);
+ assert.notEqual(at, -1, `${anchor} not found`);
+ return source.slice(at, source.indexOf('"', at));
+}
+
+/** The CSS rule opened by `selector`, up to its closing brace. */
+function rule(selector: string): string {
+ const at = CSS.indexOf(selector);
+ assert.notEqual(at, -1, `${selector} not found`);
+ return CSS.slice(at, CSS.indexOf("}", at));
+}
+
+test("both card states drop the edge ring", () => {
+ const pill = surface(INDICATOR, "menu-soft-surface menu-soft-edgeless");
+ assert.match(pill, /menu-soft-edgeless/);
+ // Two: the collapsed pill and the expanded card.
+ assert.equal(
+ INDICATOR.split("menu-soft-edgeless").length - 1,
+ 2,
+ "the pill and the card are one surface, so both or neither",
+ );
+ assert.doesNotMatch(
+ INDICATOR,
+ /"menu-soft-surface pointer-events-auto/,
+ "a bare menu-soft-surface still carries the ring",
+ );
+});
+
+// The modifier keeps the drop shadow. Dropping both would flatten the card
+// into the page.
+test("the modifier removes only the inset, not the shadow", () => {
+ const modifier = rule(".menu-soft-surface.menu-soft-edgeless");
+ assert.doesNotMatch(modifier, /inset/);
+ assert.match(modifier, /var\(--menu-soft-offset-y\)/);
+ assert.match(modifier, /var\(--menu-soft-blur\)/);
+ assert.match(modifier, /var\(--menu-soft-spread\)/);
+ assert.match(modifier, /var\(--menu-soft-shadow\)/);
+});
+
+// Written against the vars rather than literals, so the dark override at
+// .dark .menu-soft-surface still reaches it.
+test("the modifier hardcodes neither theme", () => {
+ const modifier = rule(".menu-soft-surface.menu-soft-edgeless");
+ assert.doesNotMatch(modifier, /rgba|#[0-9a-f]{3}/i);
+});
+
+// The point of the change: the card and the banners are the same surface.
+// menu-soft-surface's vars already carry the banner's geometry, so once the
+// inset is gone the two agree. If the banner is restyled, this fails.
+test("the shared vars still match the update banner's shadow", () => {
+ assert.match(BANNER, /shadow-\[0_2px_8px_-2px_rgba\(0,0,0,0\.16\)\]/);
+ assert.match(BANNER, /dark:shadow-\[0_8px_28px_-6px_rgba\(0,0,0,0\.28\)\]/);
+ const light = rule(".menu-soft-surface,");
+ assert.match(light, /--menu-soft-shadow: rgba\(0, 0, 0, 0\.16\)/);
+ assert.match(light, /--menu-soft-offset-y: 2px/);
+ assert.match(light, /--menu-soft-blur: 8px/);
+ assert.match(light, /--menu-soft-spread: -2px/);
+ const dark = rule(".dark .menu-soft-surface,");
+ assert.match(dark, /--menu-soft-shadow: rgba\(0, 0, 0, 0\.28\)/);
+ assert.match(dark, /--menu-soft-offset-y: 8px/);
+ assert.match(dark, /--menu-soft-blur: 28px/);
+ assert.match(dark, /--menu-soft-spread: -6px/);
+});
+
+// The banner paints bg-white/dark:bg-card, the card bg-popover. Same colour in
+// every theme, so the surfaces match; this pins that they stay equal.
+test("popover and card resolve to the same colour in every theme", () => {
+ const popover = [...CSS.matchAll(/^\t*--popover:\s*([^;]+);/gm)].map((m) =>
+ m[1].trim(),
+ );
+ const card = [...CSS.matchAll(/^\t*--card:\s*([^;]+);/gm)].map((m) =>
+ m[1].trim(),
+ );
+ assert.ok(popover.length > 0);
+ assert.deepEqual(popover, card);
+});