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: keep browser tabs clickable on macOS with Safari 18.4 and earlier (#14368)

Daniel Han2e973ce33073
diff --git a/studio/frontend/src/features/browser/browser-panel.tsx b/studio/frontend/src/features/browser/browser-panel.tsx
index 6c34db762c5..c13f3c7d1dd 100644
--- a/studio/frontend/src/features/browser/browser-panel.tsx
+++ b/studio/frontend/src/features/browser/browser-panel.tsx
@@ -2387,7 +2387,7 @@ export const BrowserPanel = memo(function BrowserPanel({ active = true }: { acti
}
}}
className={cn(
- "browser-panel @container/browser relative flex h-full min-h-0 flex-col overflow-hidden bg-muted pt-[var(--studio-content-top-inset,0px)]",
+ "relative flex h-full min-h-0 flex-col overflow-hidden bg-muted pt-[var(--studio-content-top-inset,0px)]",
documentShown
? "[--browser-surface:color-mix(in_oklab,var(--muted)_55%,var(--card))]"
: "[--browser-surface:var(--card)]",
@@ -2413,7 +2413,8 @@ export const BrowserPanel = memo(function BrowserPanel({ active = true }: { acti
</AlertDialogContent>
</AlertDialog>
<TabStrip tabs={tabs} activeTabId={activeTabId} active={active} />
- <div className="relative flex min-h-0 flex-1 flex-col overflow-hidden bg-[var(--browser-surface)]">
+ {/* Not on the section: before Safari 18.5 container-type makes a stacking context, sinking the strip under the macOS drag strip. */}
+ <div className="browser-panel-body @container/browser relative flex min-h-0 flex-1 flex-col overflow-hidden bg-[var(--browser-surface)]">
<div
className={cn(
"browser-chrome @container flex shrink-0 items-center gap-2 px-2.5",
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index b02cae397bd..41f777353c2 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -4954,11 +4954,11 @@ html.force-reduced-motion .sidebar-section-drop-line {
}
/* Scales the container query's em with the UI size; children reset to the inherited 1rem. */
-.browser-panel {
+.browser-panel-body {
font-size: calc(1rem * var(--ui-space-scale, 1));
}
-.browser-panel > * {
+.browser-panel-body > * {
font-size: 1rem;
}
diff --git a/studio/frontend/tests/browser-tab-strip-stacking.test.ts b/studio/frontend/tests/browser-tab-strip-stacking.test.ts
new file mode 100644
index 00000000000..47d85aa8cd7
--- /dev/null
+++ b/studio/frontend/tests/browser-tab-strip-stacking.test.ts
@@ -0,0 +1,21 @@
+// 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 { readSrc } from "./helpers/kit.ts";
+
+test("no query container wraps the browser tab strip, so it stays above the macOS titlebar drag strip", () => {
+ // Before Safari 18.5 container-type adds layout containment, a stacking context that traps the strip's z-40 (#14314).
+ const panel = readSrc("features/browser/browser-panel.tsx");
+ const root = panel.indexOf("export const BrowserPanel = memo(");
+ const section = panel.indexOf("<section", root);
+ const strip = panel.indexOf("<TabStrip ", section);
+ assert.ok(root >= 0 && section > root && strip > section);
+ assert.doesNotMatch(panel.slice(section, strip), /@container/);
+ assert.match(panel, /className="browser-chrome relative z-40 flex /);
+ assert.match(
+ panel.slice(strip),
+ /^<TabStrip [^\n]*\n(?:[^\n]*\n){0,3}\s*<div className="browser-panel-body @container\/browser /,
+ );
+});
diff --git a/tests/studio/test_ui_font_scale_contract.py b/tests/studio/test_ui_font_scale_contract.py
index c4f0df50389..b12a55f8f0a 100644
--- a/tests/studio/test_ui_font_scale_contract.py
+++ b/tests/studio/test_ui_font_scale_contract.py
@@ -27,8 +27,8 @@ FONTSIZE_STYLE_ALLOWLIST = {
# Sizes a container query's em breakpoint, not text (--ui-space-scale derives
# from --ui-font-scale); children reset to the 1rem they would inherit.
CSS_FONTSIZE_LAYOUT_RULES = {
- (".browser-panel", "font-size: calc(1rem * var(--ui-space-scale, 1));"),
- (".browser-panel > *", "font-size: 1rem;"),
+ (".browser-panel-body", "font-size: calc(1rem * var(--ui-space-scale, 1));"),
+ (".browser-panel-body > *", "font-size: 1rem;"),
}