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: toggle desktop fullscreen with F11 (#17213)

AAFI MALEKe25b5d17e20f
diff --git a/studio/frontend/src/app/provider.tsx b/studio/frontend/src/app/provider.tsx
index 28bde8a2194..290d86c0c59 100644
--- a/studio/frontend/src/app/provider.tsx
+++ b/studio/frontend/src/app/provider.tsx
@@ -57,6 +57,10 @@ import { type BackendStatus, useTauriBackend } from "@/hooks/use-tauri-backend";
import { useTauriUpdate } from "@/hooks/use-tauri-update";
import { useUiSpaceScale } from "@/hooks/use-ui-space-scale";
import { isTauri } from "@/lib/api-base";
+import {
+ getDesktopFullscreen,
+ subscribeDesktopFullscreen,
+} from "@/lib/desktop-fullscreen";
import { followDesktopUpdateScreen } from "@/lib/desktop-update-activity";
import { installDismissClickStreakGuard } from "@/lib/dismiss-click-streak";
import { useDocumentFlag } from "@/lib/document-flag";
@@ -85,6 +89,7 @@ import {
useMemo,
useRef,
useState,
+ useSyncExternalStore,
} from "react";
import { MODAL_SURFACE, useSurfaceRef } from "@/lib/surface-registry";
import {
@@ -645,13 +650,29 @@ const CUSTOM_CHROME_STYLE = {
"--studio-window-control-inset": "138px",
} as CSSProperties;
+// Fullscreen hides the titlebar (it slides back in from the top edge), so content takes its band.
+const CUSTOM_CHROME_FULLSCREEN_STYLE = {
+ ...CUSTOM_CHROME_STYLE,
+ "--studio-custom-titlebar-height": "0px",
+ "--studio-desktop-titlebar-height": "0px",
+ "--studio-startup-top-inset": "8px",
+ "--studio-content-top-inset": "0px",
+ "--studio-non-chat-content-top-inset": "0px",
+ "--studio-non-chat-scroller-top": "0px",
+ "--studio-chat-scroller-top": "0px",
+ "--studio-hidden-route-top-inset": "0px",
+ "--studio-window-control-inset": "0px",
+} as CSSProperties;
+
// Mirrored onto <html>: overlays portalled into document.body cannot read the wrapper styles.
function DesktopChromeVarsEffect({
usesCustomTitlebar,
usesNativeMacTitlebar,
+ customTitlebarHidden,
}: {
usesCustomTitlebar: boolean;
usesNativeMacTitlebar: boolean;
+ customTitlebarHidden: boolean;
}) {
useEffect(() => {
const el = document.documentElement;
@@ -659,18 +680,22 @@ function DesktopChromeVarsEffect({
value === null
? el.style.removeProperty(name)
: el.style.setProperty(name, value);
- set("--studio-custom-titlebar-height", usesCustomTitlebar ? "34px" : null);
+ const customTop = customTitlebarHidden ? "0px" : "34px";
+ set("--studio-custom-titlebar-height", usesCustomTitlebar ? customTop : null);
set(
"--studio-mac-titlebar-height",
usesNativeMacTitlebar ? NATIVE_MAC_TITLEBAR_HEIGHT_VAR : null,
);
- set("--studio-window-control-inset", usesCustomTitlebar ? "138px" : null);
+ set(
+ "--studio-window-control-inset",
+ usesCustomTitlebar ? (customTitlebarHidden ? "0px" : "138px") : null,
+ );
// The toaster renders outside the wrapper.
- set("--studio-content-top-inset", usesCustomTitlebar ? "34px" : null);
+ set("--studio-content-top-inset", usesCustomTitlebar ? customTop : null);
set(
"--studio-window-chrome-top",
usesCustomTitlebar
- ? "34px"
+ ? customTop
: usesNativeMacTitlebar
? NATIVE_MAC_TITLEBAR_HEIGHT_VAR
: null,
@@ -688,7 +713,7 @@ function DesktopChromeVarsEffect({
set("--studio-window-chrome-top", null);
refreshWindowChromeTop();
};
- }, [usesCustomTitlebar, usesNativeMacTitlebar]);
+ }, [usesCustomTitlebar, usesNativeMacTitlebar, customTitlebarHidden]);
return null;
}
@@ -763,6 +788,12 @@ function TauriWrapper({ children }: { children: ReactNode }) {
const [windowRevealRevision, setWindowRevealRevision] = useState(0);
const usesCustomTitlebar = shouldUseCustomWindowTitlebar();
const usesNativeMacTitlebar = shouldUseNativeMacWindowTitlebar();
+ const windowFullscreen = useSyncExternalStore(
+ subscribeDesktopFullscreen,
+ getDesktopFullscreen,
+ () => false,
+ );
+ const customTitlebarHidden = usesCustomTitlebar && windowFullscreen;
const hidesTitlebarSidebar = HIDDEN_TITLEBAR_SIDEBAR_ROUTES.has(pathname);
useEffect(() => {
@@ -1046,6 +1077,7 @@ function TauriWrapper({ children }: { children: ReactNode }) {
<DesktopChromeVarsEffect
usesCustomTitlebar={usesCustomTitlebar}
usesNativeMacTitlebar={usesNativeMacTitlebar}
+ customTitlebarHidden={customTitlebarHidden}
/>
);
@@ -1095,10 +1127,15 @@ function TauriWrapper({ children }: { children: ReactNode }) {
return (
<div
className="relative h-dvh min-h-0 overflow-hidden bg-background"
- style={CUSTOM_CHROME_STYLE}
+ style={
+ customTitlebarHidden ? CUSTOM_CHROME_FULLSCREEN_STYLE : CUSTOM_CHROME_STYLE
+ }
>
{chromeVars}
- <WindowTitlebar showSidebarSurface={showSidebarSurface} />
+ <WindowTitlebar
+ showSidebarSurface={showSidebarSurface}
+ fullscreen={customTitlebarHidden}
+ />
<div
className={
hidesTitlebarSidebar
diff --git a/studio/frontend/src/components/tauri/window-titlebar.tsx b/studio/frontend/src/components/tauri/window-titlebar.tsx
index 5edb196fd90..df25e4364e6 100644
--- a/studio/frontend/src/components/tauri/window-titlebar.tsx
+++ b/studio/frontend/src/components/tauri/window-titlebar.tsx
@@ -11,6 +11,7 @@ import { useSidebarPin } from "@/hooks/use-sidebar-pin";
import { useSidebarWidth } from "@/hooks/use-sidebar-width";
import { useT } from "@/i18n";
import { isTauri } from "@/lib/api-base";
+import { setDesktopFullscreen } from "@/lib/desktop-fullscreen";
import { cn } from "@/lib/utils";
import { Z_LAYER } from "@/lib/z-layers";
import { LayoutAlignLeftIcon, PanelLeftIcon } from "@hugeicons/core-free-icons";
@@ -295,15 +296,53 @@ export function DesktopTitlebarNavigation({
);
}
+// How long the revealed fullscreen titlebar lingers after the pointer leaves it.
+const FULLSCREEN_TITLEBAR_HIDE_DELAY_MS = 400;
+
export function WindowTitlebar({
showSidebarSurface = false,
+ fullscreen = false,
}: {
showSidebarSurface?: boolean;
+ /** Fullscreen: the bar hides and slides back in over the content from the top edge. */
+ fullscreen?: boolean;
}): ReactElement | null {
const t = useT();
const [enabled] = useState(shouldUseCustomWindowTitlebar);
const [maximized, setMaximized] = useState(false);
const [focused, setFocused] = useState(true);
+ const [revealed, setRevealed] = useState(false);
+ // Entering or leaving fullscreen starts with the bar hidden again.
+ const [revealFullscreen, setRevealFullscreen] = useState(fullscreen);
+ if (revealFullscreen !== fullscreen) {
+ setRevealFullscreen(fullscreen);
+ setRevealed(false);
+ }
+ const titlebarRef = useRef<HTMLElement | null>(null);
+ const hideTimer = useRef<number | null>(null);
+ const cancelHide = useCallback(() => {
+ if (hideTimer.current !== null) {
+ window.clearTimeout(hideTimer.current);
+ hideTimer.current = null;
+ }
+ }, []);
+ const reveal = useCallback(() => {
+ cancelHide();
+ setRevealed(true);
+ }, [cancelHide]);
+ const scheduleHide = useCallback(() => {
+ cancelHide();
+ hideTimer.current = window.setTimeout(() => {
+ hideTimer.current = null;
+ if (titlebarRef.current?.matches(":hover, :focus-within")) return;
+ setRevealed(false);
+ }, FULLSCREEN_TITLEBAR_HIDE_DELAY_MS);
+ }, [cancelHide]);
+ const revealFromEdge = useCallback(() => {
+ setRevealed(true);
+ scheduleHide();
+ }, [scheduleHide]);
+ useEffect(() => cancelHide, [fullscreen, cancelHide]);
const backdropOpen = useSyncExternalStore(
enabled ? subscribeViewportBackdrop : subscribeNever,
enabled ? getViewportBackdropOpen : backdropClosed,
@@ -423,22 +462,23 @@ export function WindowTitlebar({
const handleDragMouseDown = useCallback(
(event: MouseEvent<HTMLDivElement>) => {
- if (event.button !== 0 || event.detail > 1) {
+ // A fullscreen window cannot be moved or maximized from its titlebar.
+ if (fullscreen || event.button !== 0 || event.detail > 1) {
return;
}
runWindowAction((appWindow) => appWindow.startDragging());
},
- [runWindowAction],
+ [fullscreen, runWindowAction],
);
const handleDragDoubleClick = useCallback(
(event: MouseEvent<HTMLDivElement>) => {
- if (event.button !== 0) {
+ if (fullscreen || event.button !== 0) {
return;
}
runWindowAction((appWindow) => appWindow.toggleMaximize());
},
- [runWindowAction],
+ [fullscreen, runWindowAction],
);
// pointerdown: Radix dismisses modals on pointerdown, which fires before mousedown.
@@ -466,7 +506,18 @@ export function WindowTitlebar({
return (
<>
- {showSidebarSurface && (
+ {fullscreen && !revealed && (
+ // Touching the top edge brings the hidden titlebar back, as browsers do in fullscreen.
+ <div
+ aria-hidden="true"
+ data-slot="window-titlebar-reveal-edge"
+ className="modal-pe-live pointer-events-auto fixed inset-x-0 top-0 h-[3px]"
+ style={{ zIndex: Z_LAYER.WINDOW_RESIZE_EDGE }}
+ onPointerEnter={revealFromEdge}
+ onPointerMove={revealFromEdge}
+ />
+ )}
+ {showSidebarSurface && !fullscreen && (
<div
data-slot="window-titlebar-decoration"
// Marks a consumer of --studio-sidebar-live-width, so scoped writes land here, not on <html>.
@@ -499,10 +550,31 @@ export function WindowTitlebar({
</div>
)}
<header
+ ref={titlebarRef}
className={cn(
"modal-pe-live pointer-events-none absolute inset-x-0 top-0 z-[70] h-[var(--studio-custom-titlebar-height)] select-none text-foreground",
showSidebarSurface && "bg-sidebar text-sidebar-foreground",
+ fullscreen &&
+ "pointer-events-auto h-[34px] border-b border-sidebar-edge shadow-sm transition-transform duration-200 ease-out motion-reduce:transition-none",
+ fullscreen && !showSidebarSurface && "bg-background",
+ fullscreen &&
+ !revealed &&
+ "-translate-y-full border-transparent shadow-none",
)}
+ data-fullscreen={fullscreen || undefined}
+ data-revealed={(fullscreen && revealed) || undefined}
+ onPointerEnter={fullscreen ? reveal : undefined}
+ onPointerLeave={fullscreen ? scheduleHide : undefined}
+ // Tabbing into the hidden bar shows it; it hides again once focus leaves.
+ onFocus={fullscreen ? reveal : undefined}
+ onBlur={
+ fullscreen
+ ? (event) => {
+ const next = event.relatedTarget as Node | null;
+ if (!event.currentTarget.contains(next)) scheduleHide();
+ }
+ : undefined
+ }
data-titlebar-live-width-scope=""
data-slot="window-titlebar"
data-wallpaper-sidebar-pinned={showSidebarSurface && pinned || undefined}
@@ -553,12 +625,18 @@ export function WindowTitlebar({
<CaptionGlyph kind="minimize" />
</WindowControlButton>
<WindowControlButton
- label={maximized ? t("desktopShell.restore") : t("desktopShell.maximize")}
+ label={
+ fullscreen || maximized
+ ? t("desktopShell.restore")
+ : t("desktopShell.maximize")
+ }
onClick={() =>
- runWindowAction((appWindow) => appWindow.toggleMaximize())
+ fullscreen
+ ? setDesktopFullscreen(false).catch(() => undefined)
+ : runWindowAction((appWindow) => appWindow.toggleMaximize())
}
>
- <CaptionGlyph kind={maximized ? "restore" : "maximize"} />
+ <CaptionGlyph kind={fullscreen || maximized ? "restore" : "maximize"} />
</WindowControlButton>
<WindowControlButton
label={t("desktopShell.close")}
@@ -570,8 +648,8 @@ export function WindowTitlebar({
</WindowControlButton>
</div>
</header>
- {/* Maximized: no edges to resize, and the corner belongs to Close. */}
- {!maximized && (
+ {/* Maximized or fullscreen: no edges to resize, and the corner belongs to Close. */}
+ {!maximized && !fullscreen && (
<>
<div
aria-hidden="true"
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index 2ce1082e788..ba3254b19ab 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -7127,6 +7127,10 @@ html[data-glass="macos"] body {
html[data-glass="macos"] :is([data-slot="sidebar-inset"], [data-slot="window-titlebar"]) {
background-color: color-mix(in srgb, var(--background) 52%, transparent);
}
+/* In fullscreen the revealed titlebar covers page controls, so it needs an opaque surface. */
+html [data-slot="window-titlebar"][data-fullscreen] {
+ background: var(--sidebar-base);
+}
html[data-glass="macos"] [data-slot="window-titlebar"][data-wallpaper-sidebar-pinned] > [data-wallpaper-chrome-controls]:first-child {
background: color-mix(in srgb, var(--sidebar) min(96%, calc(var(--glass-tint) * var(--glass-opacity, 1))), transparent);
}
diff --git a/studio/frontend/src/lib/desktop-fullscreen.ts b/studio/frontend/src/lib/desktop-fullscreen.ts
new file mode 100644
index 00000000000..0b20a9beba1
--- /dev/null
+++ b/studio/frontend/src/lib/desktop-fullscreen.ts
@@ -0,0 +1,86 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+// Whether the native desktop window is fullscreen; the custom titlebar hides while it is.
+let fullscreen = false;
+const listeners = new Set<() => void>();
+
+function publish(next: boolean): void {
+ if (next === fullscreen) return;
+ fullscreen = next;
+ for (const listener of listeners) listener();
+}
+
+export function getDesktopFullscreen(): boolean {
+ return fullscreen;
+}
+
+export function subscribeDesktopFullscreen(listener: () => void): () => void {
+ listeners.add(listener);
+ return () => {
+ listeners.delete(listener);
+ };
+}
+
+/** Re-read the native state; the window manager can change it without us (e.g. its own shortcut). */
+export async function refreshDesktopFullscreen(): Promise<void> {
+ const { getCurrentWindow } = await import("@tauri-apps/api/window");
+ publish(await getCurrentWindow().isFullscreen());
+}
+
+let changing = false;
+const RESIZE_SETTLE_MS = 250;
+
+/** Enter or leave fullscreen; `next` omitted toggles. A call during a transition is dropped. */
+export async function setDesktopFullscreen(next?: boolean): Promise<void> {
+ // A second request while the native window is transitioning must not race the first.
+ if (changing) return;
+ changing = true;
+ try {
+ const { getCurrentWindow } = await import("@tauri-apps/api/window");
+ const win = getCurrentWindow();
+ const target = next ?? !(await win.isFullscreen());
+ await win.setFullscreen(target);
+ // Some window managers apply it after the call resolves; the resize refresh corrects us then.
+ publish(target);
+ } finally {
+ changing = false;
+ }
+}
+
+/**
+ * Toggle the native desktop window with F11; web pages keep their browser shortcut.
+ * `keyTaken` lets a user's own F11 binding from Settings win.
+ */
+export function watchDesktopFullscreen(
+ target: Window,
+ keyTaken: () => boolean = () => false,
+): void {
+ target.addEventListener("keydown", (event) => {
+ if (
+ event.defaultPrevented ||
+ event.code !== "F11" ||
+ event.repeat ||
+ event.altKey ||
+ event.ctrlKey ||
+ event.metaKey ||
+ event.shiftKey ||
+ keyTaken()
+ )
+ return;
+
+ event.preventDefault();
+ setDesktopFullscreen().catch((error: unknown) =>
+ console.error("Could not toggle fullscreen", error),
+ );
+ });
+ // The resize can land before the window manager reports the new state, so read it once things settle.
+ let settle: ReturnType<typeof setTimeout> | undefined;
+ target.addEventListener("resize", () => {
+ clearTimeout(settle);
+ settle = setTimeout(() => {
+ refreshDesktopFullscreen().catch(() => undefined);
+ }, RESIZE_SETTLE_MS);
+ });
+ refreshDesktopFullscreen().catch(() => undefined);
+}
diff --git a/studio/frontend/src/main.tsx b/studio/frontend/src/main.tsx
index 82eb7354ef9..102d769b4dd 100644
--- a/studio/frontend/src/main.tsx
+++ b/studio/frontend/src/main.tsx
@@ -35,10 +35,15 @@ import {
applyInterfaceScaleBeforeFirstPaint,
useInterfaceScaleStore,
} from "./features/settings/stores/interface-scale-store";
+import {
+ shortcutOwningBinding,
+ useKeyboardShortcutsStore,
+} from "./features/settings/stores/keyboard-shortcuts-store";
import { initializeLocale } from "./i18n";
import { isTauri } from "./lib/api-base";
import { markAppSessionStart } from "./lib/app-session-start";
import { watchClosingDialogFocus } from "./lib/closing-dialog-focus";
+import { watchDesktopFullscreen } from "./lib/desktop-fullscreen";
import { setHubSessionRefresh } from "./lib/hf-endpoint";
import { watchInputModality } from "./lib/input-modality";
import { watchMacStrayKeyText } from "./lib/mac-stray-key-text";
@@ -72,6 +77,14 @@ const root = createRoot(rootElement);
if (isTauri) {
document.documentElement.classList.add("tauri");
+ watchDesktopFullscreen(
+ window,
+ () =>
+ shortcutOwningBinding(
+ useKeyboardShortcutsStore.getState().overrides,
+ "F11",
+ ) !== null,
+ );
}
const uaLower = navigator.userAgent.toLowerCase();
diff --git a/studio/frontend/tests/desktop-fullscreen.test.ts b/studio/frontend/tests/desktop-fullscreen.test.ts
new file mode 100644
index 00000000000..1b921bb5c04
--- /dev/null
+++ b/studio/frontend/tests/desktop-fullscreen.test.ts
@@ -0,0 +1,100 @@
+// 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 { register } from "node:module";
+import test from "node:test";
+import { setTimeout as delay } from "node:timers/promises";
+
+register("./helpers/tauri-window-resolver.mjs", import.meta.url);
+
+test("F11 enters and leaves the desktop window's fullscreen mode", async () => {
+ const control: {
+ fullscreen: boolean;
+ fullscreenChanges: boolean[];
+ fullscreenGate?: Promise<void>;
+ } = {
+ fullscreen: false,
+ fullscreenChanges: [],
+ };
+ Object.assign(globalThis, { __TAURI_WINDOW_STUB__: control });
+ const { getDesktopFullscreen, setDesktopFullscreen, watchDesktopFullscreen } =
+ await import("../src/lib/desktop-fullscreen.ts");
+ const target = new EventTarget();
+ let keyTaken = false;
+ watchDesktopFullscreen(target as unknown as Window, () => keyTaken);
+
+ const press = (code: string, options = {}) => {
+ const event = Object.assign(new Event("keydown", { cancelable: true }), {
+ code,
+ repeat: false,
+ altKey: false,
+ ctrlKey: false,
+ metaKey: false,
+ shiftKey: false,
+ ...options,
+ });
+ target.dispatchEvent(event);
+ return event;
+ };
+ // Wait for the native call rather than assuming the lazy import takes one tick.
+ const waitForChanges = async (expected: number) => {
+ const deadline = Date.now() + 10_000;
+ while (
+ control.fullscreenChanges.length < expected &&
+ Date.now() < deadline
+ ) {
+ await delay(10);
+ }
+ assert.equal(control.fullscreenChanges.length, expected);
+ };
+
+ assert.equal(press("F11").defaultPrevented, true);
+ await waitForChanges(1);
+ assert.deepEqual(control.fullscreenChanges, [true]);
+ // The titlebar reads this to hide itself while fullscreen.
+ assert.equal(getDesktopFullscreen(), true);
+ assert.equal(press("F11", { repeat: true }).defaultPrevented, false);
+ assert.equal(press("F11", { ctrlKey: true }).defaultPrevented, false);
+ assert.equal(press("F10").defaultPrevented, false);
+ assert.deepEqual(control.fullscreenChanges, [true]);
+ press("F11");
+ await waitForChanges(2);
+ assert.deepEqual(control.fullscreenChanges, [true, false]);
+ assert.equal(getDesktopFullscreen(), false);
+
+ let releaseGate: (() => void) | undefined;
+ control.fullscreenGate = new Promise<void>((resolve) => {
+ releaseGate = resolve;
+ });
+ press("F11");
+ press("F11");
+ assert.ok(releaseGate);
+ releaseGate();
+ await waitForChanges(3);
+ assert.deepEqual(control.fullscreenChanges, [true, false, true]);
+
+ // The fullscreen titlebar's restore button leaves fullscreen directly.
+ await setDesktopFullscreen(false);
+ assert.deepEqual(control.fullscreenChanges, [true, false, true, false]);
+ assert.equal(getDesktopFullscreen(), false);
+
+ keyTaken = true;
+ assert.equal(press("F11").defaultPrevented, false);
+ await delay(50);
+ assert.deepEqual(control.fullscreenChanges, [true, false, true, false]);
+});
+
+test("a bare F11 bound in Settings has an owner the watcher can defer to", async () => {
+ const { shortcutOwningBinding, useKeyboardShortcutsStore } =
+ await import("../src/features/settings/stores/keyboard-shortcuts-store.ts");
+ const owner = () =>
+ shortcutOwningBinding(
+ useKeyboardShortcutsStore.getState().overrides,
+ "F11",
+ );
+ assert.equal(owner(), null);
+ useKeyboardShortcutsStore.getState().setBinding("newChat", "primary", "F11");
+ assert.equal(owner(), "newChat");
+ useKeyboardShortcutsStore.getState().resetAll();
+});
diff --git a/studio/frontend/tests/find-in-page.test.ts b/studio/frontend/tests/find-in-page.test.ts
index fed0b9509bf..315ee5b9ea0 100644
--- a/studio/frontend/tests/find-in-page.test.ts
+++ b/studio/frontend/tests/find-in-page.test.ts
@@ -1512,7 +1512,7 @@ test("toasts clear the bar while it is open", () => {
assert.match(rule, TOAST_UNDER_FIND_BAR);
assert.match(
readSrc("app/provider.tsx"),
- /set\("--studio-content-top-inset", usesCustomTitlebar \? "34px" : null\);/,
+ /const customTop = customTitlebarHidden \? "0px" : "34px";[\s\S]*set\("--studio-content-top-inset", usesCustomTitlebar \? customTop : null\);/,
);
});
diff --git a/studio/frontend/tests/helpers/tauri-window-stub.mjs b/studio/frontend/tests/helpers/tauri-window-stub.mjs
index 1194b03f1e9..3c6436fad28 100644
--- a/studio/frontend/tests/helpers/tauri-window-stub.mjs
+++ b/studio/frontend/tests/helpers/tauri-window-stub.mjs
@@ -18,6 +18,12 @@ export const UserAttentionType = { Critical: 1, Informational: 2 };
export function getCurrentWindow() {
return {
+ isFullscreen: async () => control.fullscreen ?? false,
+ setFullscreen: async (fullscreen) => {
+ if (control.fullscreenGate) await control.fullscreenGate;
+ control.fullscreen = fullscreen;
+ control.fullscreenChanges?.push(fullscreen);
+ },
onScaleChanged: async () => () => undefined,
scaleFactor: async () => 1,
requestUserAttention: async (type) => {
diff --git a/studio/frontend/tests/interface-zoom.test.ts b/studio/frontend/tests/interface-zoom.test.ts
index 8b8b76fad61..69423658e8e 100644
--- a/studio/frontend/tests/interface-zoom.test.ts
+++ b/studio/frontend/tests/interface-zoom.test.ts
@@ -228,7 +228,7 @@ test("the zoom popup takes the find bar's corner", () => {
assert.match(provider, /"--studio-content-top-inset": "34px"/);
assert.match(
provider,
- /set\("--studio-content-top-inset", usesCustomTitlebar \? "34px" : null\);/,
+ /const customTop = customTitlebarHidden \? "0px" : "34px";[\s\S]*set\("--studio-content-top-inset", usesCustomTitlebar \? customTop : null\);/,
);
const top =
/top-\[calc\(var\(--studio-content-top-inset,0px\)\+3\.5rem\)\] right-4 z-50 flex h-13/;
diff --git a/studio/frontend/tests/titlebar-modal-layering.test.ts b/studio/frontend/tests/titlebar-modal-layering.test.ts
index 4a272222b2b..695b0b13334 100644
--- a/studio/frontend/tests/titlebar-modal-layering.test.ts
+++ b/studio/frontend/tests/titlebar-modal-layering.test.ts
@@ -11,7 +11,7 @@ import { readSrc } from "./helpers/kit.ts";
const Z_INDEX_PATTERN = /z-\[(\d+)\]|\bz-(\d+)\b/;
const DECORATION_PATTERN =
/data-slot="window-titlebar-decoration"[\s\S]*?className="([^"]+)"/;
-const TITLEBAR_PATTERN = /<header\s+className=\{cn\(\s*"([^"]+)"/;
+const TITLEBAR_PATTERN = /<header\b[^>]*?\bclassName=\{cn\(\s*"([^"]+)"/;
const DIALOG_OVERLAY_PATTERN =
/data-slot="dialog-overlay"[\s\S]*?"([^"]*\bz-50\b[^"]*)"/;
const ALERT_DIALOG_OVERLAY_PATTERN =
diff --git a/studio/frontend/tests/update-screen-titlebar.test.ts b/studio/frontend/tests/update-screen-titlebar.test.ts
index 34a2b8ae18a..2bee746e92a 100644
--- a/studio/frontend/tests/update-screen-titlebar.test.ts
+++ b/studio/frontend/tests/update-screen-titlebar.test.ts
@@ -37,7 +37,7 @@ test("the titlebar drops the sidebar surface while the update screen is shown",
const surface = region(
PROVIDER,
"const showSidebarSurface =",
- "<WindowTitlebar showSidebarSurface={showSidebarSurface} />",
+ "<WindowTitlebar",
);
assert.match(surface, /!updateScreenShown/);
});
diff --git a/studio/src-tauri/capabilities/default.json b/studio/src-tauri/capabilities/default.json
index db716ccc870..83468cd905e 100644
--- a/studio/src-tauri/capabilities/default.json
+++ b/studio/src-tauri/capabilities/default.json
@@ -21,6 +21,7 @@
"core:window:allow-minimize",
"core:window:allow-unminimize",
"core:window:allow-toggle-maximize",
+ "core:window:allow-set-fullscreen",
"core:window:allow-unmaximize",
"core:window:allow-close",
"core:window:allow-set-theme",