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.

Hide the sidebar footer fade only in glass themes (#16572)

Lee Jackson73a283f06890
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsx
index e18e3bab9d2..3e1a8e51182 100644
--- a/studio/frontend/src/components/app-sidebar.tsx
+++ b/studio/frontend/src/components/app-sidebar.tsx
@@ -6634,6 +6634,7 @@ export function AppSidebar() {
travel in this band and a full-width gradient washed it out. */}
<div
ref={attachFade}
+ data-slot="sidebar-footer-fade"
aria-hidden="true"
className={cn(
// from-[8px] holds the fade opaque across the hard clip, matching the list's pb-2.
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index 107ea82b9a2..c59d83b890a 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -2874,7 +2874,7 @@ html[data-chat-font] .aui-root {
box-shadow: none !important;
}
/* Account button hover/open matches the account menu. */
- .dark .app-user-trigger:is(:hover, [data-state="open"], [aria-expanded="true"]) {
+ .dark:not([data-glass][data-chat-wallpaper-workspace-ready], [data-glass="macos"]) .app-user-trigger:is(:hover, [data-state="open"], [aria-expanded="true"]) {
background-color: color-mix(in srgb, var(--card), white 6.5%) !important;
}
/* More menu and its sub-menus use the sidebar colour. */
@@ -6200,6 +6200,24 @@ html[data-glass][data-chat-wallpaper-workspace-ready] [data-slot="sidebar-inner"
html[data-glass="macos"] [data-slot="sidebar-inner"] :is(.bg-sidebar, .sidebar-sticky-label) {
background-color: transparent;
}
+html[data-glass][data-chat-wallpaper-workspace-ready] [data-slot="sidebar-inner"] [data-slot="sidebar-footer-fade"],
+html[data-glass="macos"] [data-slot="sidebar-inner"] [data-slot="sidebar-footer-fade"] {
+ display: none;
+}
+/* The footer fade paints the opaque sidebar colour, so on glass the list masks its own bottom edge. */
+html[data-glass][data-chat-wallpaper-workspace-ready] [data-slot="sidebar-inner"]:has([data-slot="sidebar-footer-fade"][data-visible="true"]) .sidebar-scroll-fade,
+html[data-glass="macos"] [data-slot="sidebar-inner"]:has([data-slot="sidebar-footer-fade"][data-visible="true"]) .sidebar-scroll-fade {
+ -webkit-mask-image: linear-gradient(to bottom, var(--sidebar-fade-top, #000) 0, #000 14px, #000 calc(100% - 40px), transparent calc(100% - 8px)),
+ linear-gradient(var(--sidebar-rail-side, to left), #000 var(--sidebar-rail, 0px), transparent 0);
+ mask-image: linear-gradient(to bottom, var(--sidebar-fade-top, #000) 0, #000 14px, #000 calc(100% - 40px), transparent calc(100% - 8px)),
+ linear-gradient(var(--sidebar-rail-side, to left), #000 var(--sidebar-rail, 0px), transparent 0);
+}
+.sidebar-scroll-fade.is-scrolled {
+ --sidebar-fade-top: transparent;
+}
+[dir="rtl"] .sidebar-scroll-fade {
+ --sidebar-rail-side: to right;
+}
html[data-glass] :is([data-wallpaper-workspace], [data-chat-content-root]):has(> .chat-wallpaper[data-ready]) .unsloth-composer-surface,
html[data-glass] .wallpaper-preview-composer,
html[data-glass="macos"] .unsloth-composer-surface {
diff --git a/studio/frontend/tests/glass-sidebar-footer.test.ts b/studio/frontend/tests/glass-sidebar-footer.test.ts
new file mode 100644
index 00000000000..b459267f824
--- /dev/null
+++ b/studio/frontend/tests/glass-sidebar-footer.test.ts
@@ -0,0 +1,40 @@
+// 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 { readFileSync } from "node:fs";
+import test from "node:test";
+
+const css = readFileSync(new URL("../src/index.css", import.meta.url), "utf8").replace(/\/\*[\s\S]*?\*\//g, "");
+const rules = [...css.matchAll(/([^{}]+)\{([^{}]*)\}/g)].map((m) => ({ selector: m[1].trim(), body: m[2] }));
+const GLASS_SIDEBAR = [
+ 'html[data-glass][data-chat-wallpaper-workspace-ready] [data-slot="sidebar-inner"]',
+ 'html[data-glass="macos"] [data-slot="sidebar-inner"]',
+];
+
+test("the sidebar footer fade paints nothing over a glass sidebar", () => {
+ const sidebar = readFileSync(new URL("../src/components/app-sidebar.tsx", import.meta.url), "utf8");
+ const [, slot, classes] = /ref=\{attachFade\}\s*data-slot="([^"]+)"[\s\S]*?className=\{cn\(\s*(?:\/\/[^\n]*\n\s*)*"([^"]+)"/.exec(sidebar) ?? [];
+ assert.match(classes ?? "", /from-\[var\(--sidebar-surface\)\]/);
+ const fade = `[data-slot="${slot}"]`;
+ for (const scope of GLASS_SIDEBAR) {
+ const hidden = rules.find((r) => r.selector.split(",").some((s) => s.trim() === `${scope} ${fade}`));
+ assert.ok(hidden && /display:\s*none/.test(hidden.body), scope);
+ const masked = rules.find((r) =>
+ r.selector.split(",").some((s) => s.trim().startsWith(`${scope}:has(${fade}[data-visible="true"])`) && s.includes(".sidebar-scroll-fade")),
+ );
+ assert.ok(masked && /(^|[^-])mask-image:[^;]*transparent calc\(100% - 8px\)/.test(masked.body), scope);
+ }
+ // Glass over an opaque sidebar (no image on that route) keeps the fade.
+ for (const rule of rules.filter((r) => r.selector.includes(fade) && /display:\s*none/.test(r.body))) {
+ for (const s of rule.selector.split(",")) assert.ok(GLASS_SIDEBAR.some((scope) => s.trim().startsWith(scope)), s);
+ }
+});
+
+test("the account button hover keeps the glass tint", () => {
+ const opaque = rules.filter((r) => r.selector.includes(".app-user-trigger") && /background(-color)?:/.test(r.body) && /var\(--card\)/.test(r.body));
+ assert.ok(opaque.length > 0);
+ for (const rule of opaque) {
+ assert.match(rule.selector, /:not\(\[data-glass\]\[data-chat-wallpaper-workspace-ready\], \[data-glass="macos"\]\)/);
+ }
+});