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
Keep a generating chat's spinner clear of the kebab on hover (#7751)
Daniel Hand24d276ee97c
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsxindex 3db318d5d15..1267c462098 100644--- a/studio/frontend/src/components/app-sidebar.tsx+++ b/studio/frontend/src/components/app-sidebar.tsx@@ -956,9 +956,19 @@ export function AppSidebar() {? // Pinned rows show an extra unpin button on hover, so reserve more room// (pr-8 when the menu is open keeps the unpin button clear of the title)."group-hover/recent-item:pr-16 group-has-[.sidebar-row-action[data-state=open]]/recent-item:pr-8 [@media(pointer:coarse)]:pr-16"- : // Hover room for the kebab only; title keeps one more character.- // Touch rows clear the full always-visible kebab hit area (pr-10).- "group-hover/recent-item:pr-6 group-has-[.sidebar-row-action[data-state=open]]/recent-item:pr-6 [@media(pointer:coarse)]:pr-10",+ : isGenerating+ ? // A spinner glyph cannot truncate, so clear the kebab's 30px inset (pr-1.5 + size-6).+ "group-hover/recent-item:pr-8 group-has-[.sidebar-row-action[data-state=open]]/recent-item:pr-8 [@media(pointer:coarse)]:pr-10"+ : // Hover room for the kebab only; title keeps one more character.+ // Touch rows clear the full always-visible kebab hit area (pr-10).+ "group-hover/recent-item:pr-6 group-has-[.sidebar-row-action[data-state=open]]/recent-item:pr-6 [@media(pointer:coarse)]:pr-10",+ // A focused kebab is revealed without hover, so a spinner row reserves the same room.+ isGenerating &&+ (variant === "project"+ ? "group-has-[.sidebar-row-action:focus-visible]/project-chat-item:pr-14"+ : isPinned+ ? "group-has-[.sidebar-row-action:focus-visible]/recent-item:pr-16"+ : "group-has-[.sidebar-row-action:focus-visible]/recent-item:pr-8"),);const isRenamingThis =diff --git a/studio/frontend/tests/sidebar-spinner-column.test.ts b/studio/frontend/tests/sidebar-spinner-column.test.tsindex 18c5b35be36..57945f7d23d 100644--- a/studio/frontend/tests/sidebar-spinner-column.test.ts+++ b/studio/frontend/tests/sidebar-spinner-column.test.ts@@ -54,3 +54,40 @@ test("nav and Recents spinners land on one trailing column", async () => {assert.equal(nav, chat, `nav spinner sits ${nav}px in, chat spinner ${chat}px`);assert.equal(nav, 16);});++// The kebab overlays the row's right edge, so a spinner row must pad past it.+test("a generating Recents row clears the kebab on hover", async () => {+ const [source, css] = await Promise.all([+ readFile(new URL("../src/components/app-sidebar.tsx", import.meta.url), "utf8"),+ readFile(new URL("../src/index.css", import.meta.url), "utf8"),+ ]);++ const kebabInset =+ inset(grab(css, /\.sidebar-row-action \{\s*@apply ([^;]*);/, "row action"), "pr") ++ inset(grab(css, /\.sidebar-row-action-glyph \{\s*@apply ([^;]*);/, "action glyph"), "size");+ assert.equal(kebabInset, 30);++ const generating = grab(+ source,+ // Anchor on the ternary so only the branch under test can match.+ /isGenerating\s*\?[\s\S]{0,300}?"(group-hover\/recent-item:pr-[^"]*)"/,+ "the isGenerating padding branch",+ );+ // hover, menu-open and coarse-pointer all reveal the kebab, so all must clear it+ const pads = [...generating.matchAll(/:pr-([0-9.]+)(?: |$)/g)].map(+ (m) => Number(m[1]) * TAILWIND_UNIT,+ );+ assert.ok(pads.length >= 3, `expected hover, open and coarse paddings, got ${pads.length}`);+ for (const pad of pads) {+ assert.ok(pad >= kebabInset, `${pad}px padding, needs ${kebabInset}px to clear the kebab`);+ }++ // focus-visible reveals the kebab without hover, so every spinner row reserves room there too.+ const focusPads = [...source.matchAll(/:focus-visible\]\/[a-z-]+:pr-([0-9.]+)/g)].map(+ (m) => Number(m[1]) * TAILWIND_UNIT,+ );+ assert.equal(focusPads.length, 3, `expected 3 focus paddings, got ${focusPads.length}`);+ for (const pad of focusPads) {+ assert.ok(pad >= kebabInset, `${pad}px focus padding, needs ${kebabInset}px`);+ }+});