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.

Fix the three Studio contract reds on main (#8072)

Daniel Hanbb21c0ac8677
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 b54ac4acf1d..08734e70ad6 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
@@ -583,7 +583,7 @@ function MlxAdvancedSettings({
</Select>
</div>
{outcome ? (
- <p className="text-[11px] leading-snug text-muted-foreground">
+ <p className="text-ui-11 leading-snug text-muted-foreground">
{outcome}
</p>
) : null}
@@ -595,7 +595,7 @@ function MlxAdvancedSettings({
readOnly={!servedByMlx}
/>
{templateOutcome ? (
- <p className="text-[11px] leading-snug text-muted-foreground">
+ <p className="text-ui-11 leading-snug text-muted-foreground">
{templateOutcome}
</p>
) : null}
diff --git a/tests/studio/test_chat_autoload_failure_gate.py b/tests/studio/test_chat_autoload_failure_gate.py
index ebfb2cf07de..2729341b1aa 100644
--- a/tests/studio/test_chat_autoload_failure_gate.py
+++ b/tests/studio/test_chat_autoload_failure_gate.py
@@ -111,6 +111,27 @@ let STORE: any = makeStore();
// but they are the same landmine as syncModelCapabilities was, waiting for the
// first scenario that turns a GPU option on. Stubbed so the harness is complete
// rather than complete-by-luck.
+// Imported by chat-adapter.ts from ../lib/mlx-runtime-state. Mirrors the real
+// one rather than returning {}: a non-MLX response retires the verdict but
+// leaves mlxKvBits absent, and a scenario that saw an empty object would keep
+// a stale width alive and pass for the wrong reason.
+function mlxRuntimeStateFrom(resp: any) {
+ if (resp?.is_mlx !== true) {
+ return {
+ loadedMlxKvBitsRequested: null,
+ mlxKvQuantReason: null,
+ chatTemplateOverrideReason: null,
+ mlxKvQuantNote: null,
+ };
+ }
+ return {
+ mlxKvBits: resp.mlx_kv_bits_requested ?? null,
+ loadedMlxKvBitsRequested: resp.mlx_kv_bits_requested ?? null,
+ mlxKvQuantReason: resp.mlx_kv_quant_reason ?? null,
+ chatTemplateOverrideReason: resp.chat_template_override_reason ?? null,
+ mlxKvQuantNote: resp.mlx_kv_quant_note ?? null,
+ };
+}
async function prepareHfTokenForUse(token: any) {
return { proceed: true, token };
}
diff --git a/tests/studio/test_desktop_reliability_frontend_contract.py b/tests/studio/test_desktop_reliability_frontend_contract.py
index 7af1426eaf3..848f37304cc 100644
--- a/tests/studio/test_desktop_reliability_frontend_contract.py
+++ b/tests/studio/test_desktop_reliability_frontend_contract.py
@@ -3,6 +3,7 @@
"""Static contracts for focused packaged-desktop reliability behavior."""
+import re
from pathlib import Path
@@ -413,7 +414,12 @@ def test_desktop_titlebar_separates_navigation_from_sidebar_brand():
sidebar = APP_SIDEBAR.read_text(encoding = "utf-8")
header = sidebar.split("<SidebarHeader", 1)[1].split("</SidebarHeader>", 1)[0]
- assert 'import { ArrowLeft, ArrowRight } from "lucide-react";' in titlebar
+ # The names, not the whole import list: #8025 added Minus/Square/X to the
+ # same line for the window controls and this went red on every open PR.
+ lucide = re.search(r"import \{([^}]*)\} from \"lucide-react\";", titlebar)
+ assert lucide is not None, "titlebar no longer imports from lucide-react"
+ icons = {name.strip() for name in lucide.group(1).split(",")}
+ assert {"ArrowLeft", "ArrowRight"} <= icons, icons
assert "<ArrowLeft" in titlebar
assert "<ArrowRight" in titlebar
assert "window.history.back()" in titlebar