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: fix macOS titlebar drag and collapsed layout (#7555)
Wasim Yousef Said4c2df3e6f805
diff --git a/studio/frontend/src/app/provider.tsx b/studio/frontend/src/app/provider.tsxindex 8abb1df63ed..1cc3d1ee57f 100644--- a/studio/frontend/src/app/provider.tsx+++ b/studio/frontend/src/app/provider.tsx@@ -255,7 +255,7 @@ const MAC_NATIVE_CHROME_STYLE = {"--studio-non-chat-content-top-inset": "34px","--studio-hidden-route-top-inset": "34px","--studio-chat-header-height": "44px",- "--studio-chat-header-padding-top": "8px",+ "--studio-chat-header-padding-top": "7px","--studio-chat-control-height": "33px","--studio-chat-header-right-inset": "0px",} as CSSProperties;diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsxindex 8aa4db99f41..d263a6a7392 100644--- a/studio/frontend/src/components/app-sidebar.tsx+++ b/studio/frontend/src/components/app-sidebar.tsx@@ -1183,7 +1183,11 @@ export function AppSidebar() {<Sidebarcollapsible="icon"variant="sidebar"- className="font-heading group-data-[collapsible=icon]:[&_[data-sidebar=sidebar]]:bg-white dark:group-data-[collapsible=icon]:[&_[data-sidebar=sidebar]]:bg-background"+ className={cn(+ "font-heading group-data-[collapsible=icon]:[&_[data-sidebar=sidebar]]:bg-white dark:group-data-[collapsible=icon]:[&_[data-sidebar=sidebar]]:bg-background",+ usesNativeMacTitlebar &&+ "group-data-[collapsible=icon]:[&_[data-sidebar=sidebar]]:border-r-0",+ )}><SidebarHeaderclassName={cn(@@ -1205,6 +1209,7 @@ export function AppSidebar() {/>)}<div+ data-tauri-drag-region={usesNativeMacTitlebar || undefined}className={cn("relative z-10 flex items-center gap-[8.5px] group-data-[collapsible=icon]:hidden",showCompactMacBrand &&diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsxindex 8ae6c6fb159..eb046031bce 100644--- a/studio/frontend/src/features/chat/chat-page.tsx+++ b/studio/frontend/src/features/chat/chat-page.tsx@@ -781,6 +781,7 @@ function GeneralCompareHeader({// Controlled so the body-portaled popover can't linger over another tab off-route.const active = useChatActive();const [selectorOpen, setSelectorOpen] = useState(false);+const { pinned } = useSidebar();return (<div@@ -3192,7 +3193,7 @@ export function ChatPage({// Provides `active` to ChatRuntimeProvider (drops the message views/composers// while off-route, keeping the runtime alive) and to the compare chrome.<ChatActiveContext.Provider value={active}>- <div className="flex min-h-0 min-w-0 flex-1 basis-0 bg-background overflow-hidden">+ <div className="flex min-h-0 min-w-0 flex-1 basis-0 overflow-hidden bg-background">{/* Portaled surfaces render to document.body, escaping the parent's hiddenwrapper, so gate them on `active` to keep them off other tabs. */}{active && <GuidedTour {...tour.tourProps} />}diff --git a/tests/studio/test_desktop_reliability_frontend_contract.py b/tests/studio/test_desktop_reliability_frontend_contract.pyindex a576e3fe421..4848a825359 100644--- a/tests/studio/test_desktop_reliability_frontend_contract.py+++ b/tests/studio/test_desktop_reliability_frontend_contract.py@@ -28,6 +28,7 @@ APP_PROVIDER = FRONTEND / "app/provider.tsx"CLIPBOARD_FILES = FRONTEND / "features/chat/utils/clipboard-files.ts"TAURI_CAPABILITIES = REPO / "studio/src-tauri/capabilities/default.json"+CHAT_PAGE = FRONTEND / "features/chat/chat-page.tsx"def test_file_actions_route_through_native_commands_only_in_tauri():@@ -216,6 +217,34 @@ def test_expanded_titlebar_button_and_corner_match_sidebar_edge():)+def test_visible_mac_sidebar_header_is_a_drag_region():+ source = APP_SIDEBAR.read_text(encoding = "utf-8")+ header = source.split("<SidebarHeader", 1)[1].split("</SidebarHeader>", 1)[0]+ drag_region = "data-tauri-drag-region={usesNativeMacTitlebar || undefined}"++ assert drag_region in header+ assert header.index(drag_region) < header.index('"relative z-10 flex items-center')+++def test_mac_chat_header_controls_share_the_titlebar_row():+ source = CHAT_PAGE.read_text(encoding = "utf-8")+ provider = APP_PROVIDER.read_text(encoding = "utf-8")++ assert "shouldUseNativeMacWindowTitlebar" not in source+ assert "[--studio-content-top-inset:var(--studio-mac-titlebar-height" not in source+ assert source.count("var(--studio-mac-traffic-light-inset") == 2+ assert '"--studio-chat-header-padding-top": "7px"' in provider+ assert "pt-[var(--studio-content-top-inset,0px)] md:flex-row" in source+ assert "absolute top-[var(--studio-content-top-inset,0px)]" in source+++def test_collapsed_mac_sidebar_hides_divider():+ source = APP_SIDEBAR.read_text(encoding = "utf-8")++ assert "group-data-[collapsible=icon]:[&_[data-sidebar=sidebar]]:border-r-0" in source+ assert "top-[var(--studio-mac-titlebar-height,34px)]" not in source++def test_chat_sidebar_row_actions_visible_on_coarse_pointers():"""unslothai/unsloth#7276: Recents chat kebab must be tappable on iPad."""sidebar_source = APP_SIDEBAR.read_text(encoding = "utf-8")