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.

Studio: hide the Model hub list under an open model page (#17021)

Daniel Han1679bb42a750
diff --git a/studio/frontend/src/features/hub/catalog/models-catalog.tsx b/studio/frontend/src/features/hub/catalog/models-catalog.tsx
index 3d7cb6586a3..ed70b71f280 100644
--- a/studio/frontend/src/features/hub/catalog/models-catalog.tsx
+++ b/studio/frontend/src/features/hub/catalog/models-catalog.tsx
@@ -412,7 +412,7 @@ export const ModelsCatalog = memo(function ModelsCatalog({
tabIndex={discoverActive ? undefined : -1}
className={cn(
scrollPaneClassName,
- discoverActive ? "visible" : "pointer-events-none invisible",
+ !discoverActive && "pointer-events-none invisible",
)}
>
{discoverActive ? (
@@ -460,7 +460,7 @@ export const ModelsCatalog = memo(function ModelsCatalog({
tabIndex={downloadedActive ? undefined : -1}
className={cn(
scrollPaneClassName,
- downloadedActive ? "visible" : "pointer-events-none invisible",
+ !downloadedActive && "pointer-events-none invisible",
)}
>
{downloadedActive ? (
diff --git a/studio/frontend/src/features/hub/hub-page.tsx b/studio/frontend/src/features/hub/hub-page.tsx
index 2e3e01cbf81..a1c071e98ed 100644
--- a/studio/frontend/src/features/hub/hub-page.tsx
+++ b/studio/frontend/src/features/hub/hub-page.tsx
@@ -2181,8 +2181,9 @@ export function ModelsPage() {
: HUB_SPLIT_CUSTOM_WIDTH_CLASS,
)
: "flex-1",
- // Opaque overlay: remove the catalog from the tab order.
catalogCovered && "pointer-events-none",
+ // A background image clears the overlay's fill, so hide what it covers.
+ detailOpen && (splitMode ? "max-lg:invisible" : "invisible"),
)}
style={splitMode ? splitWidth.style : undefined}
aria-hidden={catalogCovered || undefined}
diff --git a/studio/frontend/tests/hub-detail-hides-covered-catalog.test.ts b/studio/frontend/tests/hub-detail-hides-covered-catalog.test.ts
new file mode 100644
index 00000000000..4b93b547ac1
--- /dev/null
+++ b/studio/frontend/tests/hub-detail-hides-covered-catalog.test.ts
@@ -0,0 +1,27 @@
+// 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 test from "node:test";
+
+import { readSrcAsync } from "./helpers/kit.ts";
+
+// #17004: a background image makes .hub-canvas transparent, so the model page showed the
+// catalog through it.
+test("an open model page hides the catalog it covers", async () => {
+ const css = await readSrcAsync("index.css");
+ assert.match(css, /\[data-wallpaper-ready\][^{]*\.hub-page \.hub-canvas[^{]*\{ background: transparent; \}/);
+
+ const page = await readSrcAsync("features/hub/hub-page.tsx");
+ assert.match(page, /className="hub-canvas absolute inset-0 z-20/);
+ assert.match(page, /hub-canvas z-20 [^"]*max-lg:absolute max-lg:inset-0/);
+ assert.match(
+ page,
+ /detailOpen && \(splitMode \? "max-lg:invisible" : "invisible"\)/,
+ );
+ // An explicit `visible` on a descendant would repaint it through the hidden pane.
+ const catalog = await readSrcAsync("features/hub/catalog/models-catalog.tsx");
+ assert.doesNotMatch(catalog, /\bvisible\b(?![-:])"/);
+ assert.match(catalog, /!discoverActive && "pointer-events-none invisible"/);
+ assert.match(catalog, /!downloadedActive && "pointer-events-none invisible"/);
+});