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: even out the gap around the More flyout's rule (#7899)
Michael Han933d7f03b413
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsxindex 84998629cdf..3dcdd253066 100644--- a/studio/frontend/src/components/app-sidebar.tsx+++ b/studio/frontend/src/components/app-sidebar.tsx@@ -2066,8 +2066,10 @@ export function AppSidebar() {);})}{/* Way out of the flyout: jump straight to the control that- decides what lives here vs. on the sidebar itself. */}- <DropdownMenuSeparator className="mx-1! my-1.5! h-0! border-t border-border/70 bg-transparent! dark:border-white/15" />+ decides what lives here vs. on the sidebar itself.+ my-1 matches the menu's own p-1, so the gap either side+ of the rule equals the one under the last row. */}+ <DropdownMenuSeparator className="mx-1! my-1! h-0! border-t border-border/70 bg-transparent! dark:border-white/15" /><DropdownMenuItemonSelect={() =>useSettingsDialogStorediff --git a/studio/frontend/tests/more-menu-separator-gap.test.ts b/studio/frontend/tests/more-menu-separator-gap.test.tsnew file mode 100644index 00000000000..39a2db9533f--- /dev/null+++ b/studio/frontend/tests/more-menu-separator-gap.test.ts@@ -0,0 +1,32 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import assert from "node:assert/strict";+import { readFile } from "node:fs/promises";+import test from "node:test";++// The More flyout ends with a rule and the Customize sidebar row. The rule's+// vertical margin has to equal the menu's own padding, or the gap above that+// last row reads as bigger than the one below it.+const TAILWIND_UNIT = 4;++function spacing(classes: string, prefix: string): number {+ const m = new RegExp(`(?:^| )${prefix}-([0-9.]+)!?(?: |$)`).exec(classes);+ assert.ok(m, `no ${prefix}-* in "${classes}"`);+ return Number(m[1]) * TAILWIND_UNIT;+}++test("the More flyout's rule sits as far from its rows as the menu's own edge", async () => {+ const source = await readFile(+ new URL("../src/components/app-sidebar.tsx", import.meta.url),+ "utf8",+ );++ const menu =+ /onPointerLeave=\{closeMoreSoon\}\s*\n\s*className="([^"]*)"/.exec(source);+ assert.ok(menu, "could not find the More flyout's DropdownMenuContent");+ const rule = /<DropdownMenuSeparator className="(mx-1![^"]*)"/.exec(source);+ assert.ok(rule, "could not find the More flyout's separator");++ assert.equal(spacing(rule[1], "my"), spacing(menu[1], "p"));+});