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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: fix the browser use bar's text size and button order (#16905)
Michael Hanf85c190501fc
diff --git a/studio/frontend/src/features/browser/agent/agent-bar.tsx b/studio/frontend/src/features/browser/agent/agent-bar.tsxindex f32c756ae4e..c77ee0dcd07 100644--- a/studio/frontend/src/features/browser/agent/agent-bar.tsx+++ b/studio/frontend/src/features/browser/agent/agent-bar.tsx@@ -32,28 +32,28 @@ export function AgentBar({ activeTabId }: { activeTabId: string | null }) {>{question ? null : <Spinner className="size-3.5 text-muted-foreground" />}<div className="min-w-0 flex-[1_1_12rem]">- <p className="truncate font-medium text-foreground">+ <p className="truncate font-medium leading-tight text-foreground">{question ? t(`browser.agent.ask.${question.ask}`, { host: question.host, name: question.name }) : doing}</p>{question && script ? (<ScriptPreview key={question.id} code={question.detail} onRead={() => setReadId(question.id)} />) : question?.detail ? (- <p className="truncate text-muted-foreground" title={question.detail}>+ <p className="truncate text-ui-11 leading-tight text-muted-foreground" title={question.detail}>{question.detail}</p>) : null}</div><div className="ml-auto flex flex-wrap items-center justify-end gap-2">+ {/* Stop ends the run, so it stands apart from the answers, which run least to most permissive. */}+ <Button type="button" size="xs" variant="outline" onClick={() => stopBrowserAgent(chat)}>+ {t("browser.agent.stop")}+ </Button>{question ? (<>+ <span aria-hidden={true} className="h-4 w-px bg-border" /><Button type="button" size="xs" variant="ghost" onClick={() => answerQuestion(question.id, false)}>{t("browser.agent.deny")}</Button>- {question.always ? (- <Button type="button" size="xs" variant="outline" onClick={() => answerQuestion(question.id, true, true)}>- {t("browser.agentSettings.alwaysAllow")}- </Button>- ) : null}<Buttontype="button"size="xs"@@ -62,11 +62,13 @@ export function AgentBar({ activeTabId }: { activeTabId: string | null }) {>{t("browser.agent.allow")}</Button>+ {question.always ? (+ <Button type="button" size="xs" variant="outline" onClick={() => answerQuestion(question.id, true, true)}>+ {t("browser.agentSettings.alwaysAllow")}+ </Button>+ ) : null}</>) : null}- <Button type="button" size="xs" variant="outline" onClick={() => stopBrowserAgent(chat)}>- {t("browser.agent.stop")}- </Button></div></div>);diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.cssindex e38a00c38a4..088f0b28830 100644--- a/studio/frontend/src/index.css+++ b/studio/frontend/src/index.css@@ -4920,8 +4920,11 @@ html.force-reduced-motion .sidebar-section-drop-line {font-size: calc(1rem * var(--ui-space-scale, 1));}-.browser-panel-body > * {- font-size: 1rem;+/* Layered, or it outranks a child's own text-* utility (the agent bar rendered at 16px). */+@layer base {+ .browser-panel-body > * {+ font-size: 1rem;+ }}/* Keep a usable address field when the fixed navigation and action buttons no longer fit. */diff --git a/studio/frontend/tests/browser-agent-bar-layout.test.ts b/studio/frontend/tests/browser-agent-bar-layout.test.tsnew file mode 100644index 00000000000..074bb3ab51a--- /dev/null+++ b/studio/frontend/tests/browser-agent-bar-layout.test.ts@@ -0,0 +1,37 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++// Read from source: the node suite has no DOM.++import assert from "node:assert/strict";+import test from "node:test";++import { readSrc } from "./helpers/kit.ts";++const BAR = readSrc("features/browser/agent/agent-bar.tsx");+const CSS = readSrc("index.css");++test("the panel body's 1rem reset is layered, so the agent bar's text-ui-12 applies", () => {+ const at = CSS.indexOf(".browser-panel-body > * {");+ assert.notEqual(at, -1);+ const before = CSS.slice(0, at);+ const opened = before.lastIndexOf("@layer base {");+ assert.notEqual(opened, -1);+ // No rule closes the layer between its opening and the reset.+ assert.doesNotMatch(before.slice(opened), /\n}/);+ assert.match(BAR, /className="flex shrink-0 [^"]*\btext-ui-12\b/);+});++test("the agent bar reads Stop, then Deny, Allow, Always allow", () => {+ const order = [+ "browser.agent.stop",+ "browser.agent.deny",+ "browser.agent.allow",+ "browser.agentSettings.alwaysAllow",+ ].map((key) => BAR.indexOf(`t("${key}")`));+ assert.ok(order.every((at) => at > 0));+ assert.deepEqual(+ [...order].sort((a, b) => a - b),+ order,+ );+});