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
fix studio responsiveness across desktop and mobile web (#8016)
Maheswar Kumar6095b1fb6352
diff --git a/studio/backend/tests/test_remote_access_settings.py b/studio/backend/tests/test_remote_access_settings.pyindex 48f8cf30bbe..9808261054d 100644--- a/studio/backend/tests/test_remote_access_settings.py+++ b/studio/backend/tests/test_remote_access_settings.py@@ -457,9 +457,7 @@ def test_stop_does_not_wait_forever_on_a_start_that_never_claims_ownership(monkemonkeypatch.setattr(cloudflare_tunnel, "get_studio_tunnel_control_token", lambda: (1, 0))monkeypatch.setattr(cloudflare_tunnel, "capture_studio_tunnel_start_admission", lambda: (1, 0))stopped = threading.Event()- monkeypatch.setattr(- cloudflare_tunnel, "stop_studio_tunnel", lambda **_kw: stopped.set()- )+ monkeypatch.setattr(cloudflare_tunnel, "stop_studio_tunnel", lambda **_kw: stopped.set())try:remote_access.stop_remote_access(_state())assert stopped.wait(5), "stop worker never reached stop_studio_tunnel"@@ -492,7 +490,8 @@ def test_streaming_is_not_advertised_while_a_quick_tunnel_carries_the_traffic(moassert remote_access.remote_access_status(_state())["streaming_supported"] is Truemonkeypatch.setattr(- cloudflare_tunnel, "get_studio_tunnel_status",+ cloudflare_tunnel,+ "get_studio_tunnel_status",lambda: _status("https://live.trycloudflare.com"),)assert remote_access.remote_access_status(_state())["streaming_supported"] is Falsediff --git a/studio/backend/tests/test_secure_tunnel_gate.py b/studio/backend/tests/test_secure_tunnel_gate.pyindex f57327d9794..2852fc3f2dd 100644--- a/studio/backend/tests/test_secure_tunnel_gate.py+++ b/studio/backend/tests/test_secure_tunnel_gate.py@@ -326,11 +326,13 @@ def test_cors_preflight_cache_window_is_short():max_age = 60,)response = middleware.preflight_response(- Headers({- "origin": "https://browser-client.example",- "access-control-request-method": "POST",- "access-control-request-headers": "authorization",- })+ Headers(+ {+ "origin": "https://browser-client.example",+ "access-control-request-method": "POST",+ "access-control-request-headers": "authorization",+ }+ ))assert response.status_code == 200assert int(response.headers["access-control-max-age"]) <= 60diff --git a/studio/frontend/src/app/provider.tsx b/studio/frontend/src/app/provider.tsxindex d414abe4796..72bd056675e 100644--- a/studio/frontend/src/app/provider.tsx+++ b/studio/frontend/src/app/provider.tsx@@ -352,10 +352,17 @@ function DesktopChromeVarsEffect({set("--studio-custom-titlebar-height", usesCustomTitlebar ? "34px" : null);set("--studio-mac-titlebar-height", usesNativeMacTitlebar ? "34px" : null);set("--studio-window-control-inset", usesCustomTitlebar ? "112px" : null);+ // How far body-portaled surfaces (dialogs, alert dialogs) must stay clear of the+ // top: either titlebar paints over them, and neither inherits the wrapper's style.+ set(+ "--studio-window-chrome-top",+ usesCustomTitlebar || usesNativeMacTitlebar ? "34px" : null,+ );return () => {set("--studio-custom-titlebar-height", null);set("--studio-mac-titlebar-height", null);set("--studio-window-control-inset", null);+ set("--studio-window-chrome-top", null);};}, [usesCustomTitlebar, usesNativeMacTitlebar]);return null;diff --git a/studio/frontend/src/components/assistant-ui/attachment.tsx b/studio/frontend/src/components/assistant-ui/attachment.tsxindex b26840cc029..5cfe0d8f24e 100644--- a/studio/frontend/src/components/assistant-ui/attachment.tsx+++ b/studio/frontend/src/components/assistant-ui/attachment.tsx@@ -108,7 +108,7 @@ const AttachmentPreviewDialog: FC<PropsWithChildren> = ({ children }) => {no dialog panel, and the close button sits in the screen corner. */}<DialogContentoverlayClassName="bg-black/70"- className="aui-attachment-preview-dialog-content top-0 left-0 grid h-dvh w-screen max-w-none translate-x-0 translate-y-0 place-items-center rounded-none border-0 bg-transparent p-0 shadow-none ring-0 sm:max-w-none [&>button]:fixed [&>button]:top-4 [&>button]:right-4 [&>button]:z-20 [&>button]:size-9 [&>button]:rounded-full [&>button]:bg-transparent [&>button]:text-white [&>button]:opacity-100 [&>button]:ring-0! [&>button]:hover:bg-white/25 [&>button]:hover:text-white [&_svg]:text-white"+ className="aui-attachment-preview-dialog-content top-0 left-0 grid h-dvh w-screen max-h-none max-w-none translate-x-0 translate-y-0 place-items-center overflow-hidden rounded-none border-0 bg-transparent p-0 shadow-none ring-0 sm:max-w-none [&>button]:fixed [&>button]:top-4 [&>button]:right-4 [&>button]:z-20 [&>button]:size-9 [&>button]:rounded-full [&>button]:bg-transparent [&>button]:text-white [&>button]:opacity-100 [&>button]:ring-0! [&>button]:hover:bg-white/25 [&>button]:hover:text-white [&_svg]:text-white"><DialogTitle className="aui-sr-only sr-only">Image Attachment Previewdiff --git a/studio/frontend/src/components/assistant-ui/image.tsx b/studio/frontend/src/components/assistant-ui/image.tsxindex b24c6dd91c6..5bb9a6c2a0c 100644--- a/studio/frontend/src/components/assistant-ui/image.tsx+++ b/studio/frontend/src/components/assistant-ui/image.tsx@@ -308,7 +308,7 @@ function ImageZoom({ src, alt = "Image preview", children }: ImageZoomProps) {data-slot="image-zoom-content"src={src}alt={alt}- className="aui-image-zoom-content fade-in zoom-in-95 max-h-[90vh] max-w-[90vw] animate-in cursor-zoom-out object-contain duration-200"+ className="aui-image-zoom-content fade-in zoom-in-95 max-h-[90dvh] max-w-[90vw] animate-in cursor-zoom-out object-contain duration-200"/></button>,document.body,diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsxindex 616dca30236..17f0869ec35 100644--- a/studio/frontend/src/components/assistant-ui/thread.tsx+++ b/studio/frontend/src/components/assistant-ui/thread.tsx@@ -1889,7 +1889,7 @@ const ThreadWelcome: FC<{return (<div className="aui-thread-welcome-root mx-auto my-auto flex w-full max-w-(--thread-max-width) grow flex-col">- <div className="aui-thread-welcome-center flex w-full grow flex-col items-center justify-start pt-[27.5vh]">+ <div className="aui-thread-welcome-center flex w-full grow flex-col items-center justify-start pt-[27.5dvh]"><div className="aui-thread-welcome-message flex w-full flex-col justify-center gap-9 px-4">{/* Center the greeting (sloth + title) over the composer. */}<div className="flex flex-row items-center justify-center gap-[15px]">@@ -4515,7 +4515,7 @@ const PromptQueueStack: FC<{ queueThreadIds: string[] }> = ({return (<div- className="relative z-0 mx-7 mb-[-8px] max-h-[28vh] overflow-y-auto rounded-t-[18px] rounded-b-none border border-border/45 bg-background/90 px-5 py-2 text-muted-foreground shadow-none backdrop-blur-md dark:bg-card/85"+ className="relative z-0 mx-7 mb-[-8px] max-h-[28dvh] overflow-y-auto rounded-t-[18px] rounded-b-none border border-border/45 bg-background/90 px-5 py-2 text-muted-foreground shadow-none backdrop-blur-md dark:bg-card/85"aria-label={`Prompt queue, ${current} of ${total}`}><div className="divide-y divide-border/25">@@ -4931,7 +4931,7 @@ const DiffusionCanvas: FC = () => {block {canvas.block + 1} - {stepLabel}</span></div>- <pre className="max-h-[60vh] overflow-auto whitespace-pre-wrap px-3 py-2 font-mono text-ui-12p5 leading-relaxed text-foreground/90">+ <pre className="max-h-[60dvh] overflow-auto whitespace-pre-wrap px-3 py-2 font-mono text-ui-12p5 leading-relaxed text-foreground/90">{canvas.text}</pre></div>@@ -5024,7 +5024,7 @@ const AssistantMessage: FC = () => {<textarearef={textareaRef}defaultValue={extractTaggedText(messageContent)}- className="w-full p-3 rounded-xl bg-muted border border-border text-foreground focus:ring-1 focus:ring-ring outline-none overflow-y-auto resize-none font-mono text-sm max-h-[70vh]"+ className="w-full p-3 rounded-xl bg-muted border border-border text-foreground focus:ring-1 focus:ring-ring outline-none overflow-y-auto resize-none font-mono text-sm max-h-[70dvh]"autoFocusonInput={adjustHeight}onKeyDown={(e) => {diff --git a/studio/frontend/src/components/assistant-ui/tool-ui-image-generation.tsx b/studio/frontend/src/components/assistant-ui/tool-ui-image-generation.tsxindex 5f11cb85a8f..af988cbe7fb 100644--- a/studio/frontend/src/components/assistant-ui/tool-ui-image-generation.tsx+++ b/studio/frontend/src/components/assistant-ui/tool-ui-image-generation.tsx@@ -341,7 +341,7 @@ const ImageGenerationToolUIImpl: ToolCallMessagePartComponent = ({"block rounded-2xl object-contain",imageDimensions? "size-full"- : "h-auto max-h-[min(70vh,620px)] max-w-full",+ : "h-auto max-h-[min(70dvh,620px)] max-w-full",)}/></button>diff --git a/studio/frontend/src/components/tauri/window-titlebar.tsx b/studio/frontend/src/components/tauri/window-titlebar.tsxindex 7febf8187fb..09ca4ede71c 100644--- a/studio/frontend/src/components/tauri/window-titlebar.tsx+++ b/studio/frontend/src/components/tauri/window-titlebar.tsx@@ -12,6 +12,7 @@ import type { Window as TauriWindow } from "@tauri-apps/api/window";import { ArrowLeft, ArrowRight, Minus, Square, X } from "lucide-react";import {type MouseEvent,+ type PointerEvent,type ReactElement,type ReactNode,useCallback,@@ -320,9 +321,11 @@ export function WindowTitlebar({[runWindowAction],);- const handleResizeMouseDown = useCallback(+ // pointerdown, not mousedown: Radix dismisses modals on pointerdown, which fires first,+ // so a mousedown handler starts the resize but the dialog closes underneath it.+ const handleResizePointerDown = useCallback((direction: WindowResizeDirection) =>- (event: MouseEvent<HTMLDivElement>) => {+ (event: PointerEvent<HTMLDivElement>) => {if (event.button !== 0) {return;}@@ -441,43 +444,43 @@ export function WindowTitlebar({</header><divaria-hidden="true"- className="fixed inset-x-2 top-0 z-[70] h-1 cursor-n-resize"- onMouseDown={handleResizeMouseDown("North")}+ className="pointer-events-auto fixed inset-x-2 top-0 z-[70] h-1 cursor-n-resize"+ onPointerDown={handleResizePointerDown("North")}/><divaria-hidden="true"- className="fixed inset-x-2 bottom-0 z-[70] h-1 cursor-s-resize"- onMouseDown={handleResizeMouseDown("South")}+ className="pointer-events-auto fixed inset-x-2 bottom-0 z-[70] h-1 cursor-s-resize"+ onPointerDown={handleResizePointerDown("South")}/><divaria-hidden="true"- className="fixed inset-y-2 left-0 z-[70] w-1 cursor-w-resize"- onMouseDown={handleResizeMouseDown("West")}+ className="pointer-events-auto fixed inset-y-2 left-0 z-[70] w-1 cursor-w-resize"+ onPointerDown={handleResizePointerDown("West")}/><divaria-hidden="true"- className="fixed inset-y-2 right-0 z-[70] w-1 cursor-e-resize"- onMouseDown={handleResizeMouseDown("East")}+ className="pointer-events-auto fixed inset-y-2 right-0 z-[70] w-1 cursor-e-resize"+ onPointerDown={handleResizePointerDown("East")}/><divaria-hidden="true"- className="fixed left-0 top-0 z-[70] size-3 cursor-nw-resize"- onMouseDown={handleResizeMouseDown("NorthWest")}+ className="pointer-events-auto fixed left-0 top-0 z-[70] size-3 cursor-nw-resize"+ onPointerDown={handleResizePointerDown("NorthWest")}/><divaria-hidden="true"- className="fixed right-0 top-0 z-[70] size-3 cursor-ne-resize"- onMouseDown={handleResizeMouseDown("NorthEast")}+ className="pointer-events-auto fixed right-0 top-0 z-[70] size-3 cursor-ne-resize"+ onPointerDown={handleResizePointerDown("NorthEast")}/><divaria-hidden="true"- className="fixed bottom-0 left-0 z-[70] size-3 cursor-sw-resize"- onMouseDown={handleResizeMouseDown("SouthWest")}+ className="pointer-events-auto fixed bottom-0 left-0 z-[70] size-3 cursor-sw-resize"+ onPointerDown={handleResizePointerDown("SouthWest")}/><divaria-hidden="true"- className="fixed bottom-0 right-0 z-[70] size-3 cursor-se-resize"- onMouseDown={handleResizeMouseDown("SouthEast")}+ className="pointer-events-auto fixed bottom-0 right-0 z-[70] size-3 cursor-se-resize"+ onPointerDown={handleResizePointerDown("SouthEast")}/></>);diff --git a/studio/frontend/src/components/ui/alert-dialog.tsx b/studio/frontend/src/components/ui/alert-dialog.tsxindex d9d1f1ece8a..1b78659a603 100644--- a/studio/frontend/src/components/ui/alert-dialog.tsx+++ b/studio/frontend/src/components/ui/alert-dialog.tsx@@ -61,7 +61,11 @@ function AlertDialogContent({data-slot="alert-dialog-content"data-size={size}className={cn(- "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/5 gap-6 rounded-4xl p-6 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none",+ // Same short-viewport guard as DialogContent: scroll rather than clip the actions off screen.+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/5 max-h-[calc(100dvh-var(--studio-window-chrome-top,0px)-2rem)] gap-6 overflow-y-auto rounded-4xl p-6 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md group/alert-dialog-content fixed top-[calc(50%+var(--studio-window-chrome-top,0px)/2)] left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none",+ // Confirms stay centered cards on phones rather than going full screen, but take the+ // width available instead of a fixed 20rem. Important: the data-[size] rules outrank a plain max-w.+ "max-sm:max-w-[calc(100%-2rem)]!",className,)}{...props}diff --git a/studio/frontend/src/components/ui/command.tsx b/studio/frontend/src/components/ui/command.tsxindex 27e0d3d0784..47031d1a629 100644--- a/studio/frontend/src/components/ui/command.tsx+++ b/studio/frontend/src/components/ui/command.tsx@@ -58,7 +58,7 @@ function CommandDialog({</DialogHeader><DialogContentclassName={cn(- "rounded-4xl! top-1/3 translate-y-0 overflow-hidden p-0",+ "rounded-4xl! max-sm:rounded-none! top-1/3 translate-y-0 overflow-hidden p-0",className,)}overlayClassName={overlayClassName}diff --git a/studio/frontend/src/components/ui/dialog.tsx b/studio/frontend/src/components/ui/dialog.tsxindex 6dea1880d9e..018b92f1073 100644--- a/studio/frontend/src/components/ui/dialog.tsx+++ b/studio/frontend/src/components/ui/dialog.tsx@@ -89,8 +89,19 @@ function DialogContent({<DialogPrimitive.Contentdata-slot="dialog-content"className={cn(- "bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/5 grid max-w-[calc(100%-2rem)] gap-6 rounded-4xl px-7 pt-8 pb-7 text-sm ring-1 duration-100 sm:max-w-md top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2",- position === "fixed" ? "fixed" : "absolute",+ // max-h + scroll keeps tall dialogs reachable on short viewports; a call site+ // managing its own height overrides both (twMerge drops the base classes).+ "bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/5 grid max-h-[calc(100dvh-var(--studio-window-chrome-top,0px)-2rem)] max-w-[calc(100%-2rem)] gap-6 overflow-y-auto rounded-4xl px-7 pt-8 pb-7 text-sm ring-1 duration-100 sm:max-w-md top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2",+ // Viewport-fixed dialogs center below the desktop titlebar, which paints over them at+ // z-70, and fill the screen at phone width instead of floating on a sliver of backdrop.+ // Both are viewport-sized, so neither applies to a dialog portaled into a container.+ position === "fixed"+ // translate-none, not translate-x-0: a zero translate is still not `none`, so it+ // keeps making this a containing block and the close button below stops being fixed.+ // The phone branch starts below the chrome too, since a desktop window can reach+ // this breakpoint in CSS px under Windows text scaling. On web the var is 0px.+ ? "fixed top-[calc(50%+var(--studio-window-chrome-top,0px)/2)] max-sm:top-[var(--studio-window-chrome-top,0px)] max-sm:left-0 max-sm:h-[calc(100dvh-var(--studio-window-chrome-top,0px))] max-sm:w-dvw max-sm:max-h-none max-sm:max-w-none max-sm:translate-none max-sm:rounded-none max-sm:ring-0"+ : "absolute",className,)}{...props}@@ -100,7 +111,16 @@ function DialogContent({<DialogPrimitive.Close data-slot="dialog-close" asChild><Buttonvariant="ghost"- className="absolute top-5 right-5"+ // fixed on phones so the close stays put while a full-screen dialog scrolls; a+ // container-portaled dialog is not full screen, so it keeps the absolute corner.+ // Once fixed it is viewport-relative, so it needs the same chrome offset the+ // dialog above takes: at top-5 alone it lands under the z-70 desktop titlebar,+ // and its top-right corner sits on the window's own close button. 0px on web.+ className={cn(+ "absolute top-5 right-5 z-10",+ position === "fixed" &&+ "max-sm:fixed max-sm:top-[calc(1.25rem+var(--studio-window-chrome-top,0px))]",+ )}size="icon-sm"><HugeiconsIcon icon={Cancel01Icon} strokeWidth={2} />diff --git a/studio/frontend/src/components/ui/sheet.tsx b/studio/frontend/src/components/ui/sheet.tsxindex 679ced90935..258eb21fe9d 100644--- a/studio/frontend/src/components/ui/sheet.tsx+++ b/studio/frontend/src/components/ui/sheet.tsx@@ -94,7 +94,7 @@ function SheetContent({data-slot="sheet-content"data-side={side}className={cn(- "bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 z-50 flex flex-col bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",+ "bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 z-50 flex flex-col bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-[side=bottom]:max-h-[85dvh] data-[side=top]:max-h-[85dvh] data-[side=bottom]:overflow-y-auto data-[side=top]:overflow-y-auto",position === "fixed" ? "fixed" : "absolute",className,)}diff --git a/studio/frontend/src/features/chat/artifacts/artifact-surface.tsx b/studio/frontend/src/features/chat/artifacts/artifact-surface.tsxindex 4e28e7f4576..d9f7fca62ea 100644--- a/studio/frontend/src/features/chat/artifacts/artifact-surface.tsx+++ b/studio/frontend/src/features/chat/artifacts/artifact-surface.tsx@@ -196,7 +196,7 @@ export function ArtifactSurface({"relative flex min-h-0 flex-col bg-background",variant === "panel"? "artifact-panel-shell mx-2 mt-[90px] mb-8 h-[calc(100%_-_122px)] overflow-visible rounded-[28px] border-t border-border/70 bg-card/95"- : "h-[min(92vh,900px)] w-[min(96vw,1200px)] overflow-hidden rounded-2xl border border-border shadow-xl",+ : "h-[min(92dvh,900px)] w-[min(96vw,1200px)] overflow-hidden rounded-2xl border border-border shadow-xl",)}aria-label={`${artifact.title} canvas`}>diff --git a/studio/frontend/src/features/chat/chat-settings-sheet.tsx b/studio/frontend/src/features/chat/chat-settings-sheet.tsxindex e6c45f4ae3c..7817734fff5 100644--- a/studio/frontend/src/features/chat/chat-settings-sheet.tsx+++ b/studio/frontend/src/features/chat/chat-settings-sheet.tsx@@ -1505,7 +1505,7 @@ export function ChatSettingsPanel({onChange={(event) => setSystemPromptDraft(event.target.value)}placeholder="You are a helpful assistant..."fieldSizing="fixed"- className="min-h-[20rem] max-h-[48vh] overflow-y-auto border-0 text-sm leading-6 corner-squircle focus-visible:ring-0"+ className="min-h-[20rem] max-h-[48dvh] overflow-y-auto border-0 text-sm leading-6 corner-squircle focus-visible:ring-0"rows={14}/></div>diff --git a/studio/frontend/src/features/chat/components/chat-search-dialog.tsx b/studio/frontend/src/features/chat/components/chat-search-dialog.tsxindex 7bf1b4b2aaf..12466e7638c 100644--- a/studio/frontend/src/features/chat/components/chat-search-dialog.tsx+++ b/studio/frontend/src/features/chat/components/chat-search-dialog.tsx@@ -83,7 +83,7 @@ export function ChatSearchDialog() {<CommandDialogopen={isOpen}onOpenChange={setOpen}- className="chat-search-surface rounded-3xl! top-1/2 -translate-y-1/2 w-[635px] max-w-[calc(100%-2rem)] gap-0 p-0 ring-0 sm:max-w-[635px]"+ className="chat-search-surface rounded-3xl! max-sm:rounded-none! top-1/2 -translate-y-1/2 w-[635px] max-w-[calc(100%-2rem)] gap-0 p-0 ring-0 sm:max-w-[635px]"overlayClassName="bg-transparent supports-backdrop-filter:backdrop-blur-none"><Command className="rounded-3xl p-0" shouldFilter={false}>diff --git a/studio/frontend/src/features/chat/prompt-storage/prompt-storage-dialog.tsx b/studio/frontend/src/features/chat/prompt-storage/prompt-storage-dialog.tsxindex 72956055534..078acec59ae 100644--- a/studio/frontend/src/features/chat/prompt-storage/prompt-storage-dialog.tsx+++ b/studio/frontend/src/features/chat/prompt-storage/prompt-storage-dialog.tsx@@ -1523,7 +1523,7 @@ function PromptCard({<BookmarkIcon className="size-3.5 shrink-0 fill-primary text-primary" />) : null}<span className="font-semibold text-sm flex-1 truncate tracking-tight">{entry.name}</span>- <div className="flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity">+ <div className="flex items-center gap-0.5 opacity-0 group-hover:opacity-100 pointer-coarse:opacity-100 transition-opacity"><buttontype="button"onClick={() => onUse(entry.text)}@@ -1733,7 +1733,7 @@ function PromptListCard({<span className="shrink-0 rounded-full bg-muted px-2 py-0.5 text-ui-11 font-medium text-muted-foreground">{entry.items.length}</span>- <div className="flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity">+ <div className="flex items-center gap-0.5 opacity-0 group-hover:opacity-100 pointer-coarse:opacity-100 transition-opacity">{onRunList && (<buttontype="button"@@ -2036,7 +2036,7 @@ export function PromptStorageDialog({return (<><Dialog open={open} onOpenChange={onOpenChange}>- <DialogContent showCloseButton={false} className="sm:max-w-[min(1100px,88vw)] max-h-[94vh] flex flex-col gap-0 p-0 overflow-hidden">+ <DialogContent showCloseButton={false} className="sm:max-w-[min(1100px,88vw)] max-h-[94dvh] flex flex-col gap-0 p-0 overflow-hidden">{/* */}<DialogHeader className="px-6 pt-5 pb-4 shrink-0 border-b border-border/50"><div className="flex items-center gap-3">diff --git a/studio/frontend/src/features/data-recipes/pages/edit-recipe-page.tsx b/studio/frontend/src/features/data-recipes/pages/edit-recipe-page.tsxindex ae87f92a531..e5a6d3844c5 100644--- a/studio/frontend/src/features/data-recipes/pages/edit-recipe-page.tsx+++ b/studio/frontend/src/features/data-recipes/pages/edit-recipe-page.tsx@@ -29,7 +29,7 @@ function RecipeLoadState({}): ReactElement {return (<div className="min-h-[calc(100dvh-var(--studio-titlebar-height,0px))] bg-background">- <main className="mx-auto flex min-h-[70vh] w-full max-w-4xl items-center justify-center px-6 py-8">+ <main className="mx-auto flex min-h-[70dvh] w-full max-w-4xl items-center justify-center px-6 py-8"><div className="w-full rounded-2xl border bg-card p-8 text-center"><h1 className="text-lg font-semibold">{title}</h1><p className="mt-2 text-sm text-muted-foreground">{description}</p>diff --git a/studio/frontend/src/features/export/components/export-run-panel.tsx b/studio/frontend/src/features/export/components/export-run-panel.tsxindex 9d938a5ee35..4aba1c624f1 100644--- a/studio/frontend/src/features/export/components/export-run-panel.tsx+++ b/studio/frontend/src/features/export/components/export-run-panel.tsx@@ -318,7 +318,7 @@ export function ExportRunPanel(props: ExportRunPanelProps) {{destination === "hub" && (<div className="flex flex-col gap-4 px-0.5">- <div className="grid grid-cols-2 gap-3">+ <div className="grid grid-cols-1 gap-3 sm:grid-cols-2"><div className="flex flex-col gap-1.5"><label className="text-xs font-medium text-muted-foreground">Username / Orgdiff --git a/studio/frontend/src/features/export/components/method-picker.tsx b/studio/frontend/src/features/export/components/method-picker.tsxindex 0ab72b0b4a8..30a4d7e0698 100644--- a/studio/frontend/src/features/export/components/method-picker.tsx+++ b/studio/frontend/src/features/export/components/method-picker.tsx@@ -51,7 +51,7 @@ export function MethodPicker({ value, onChange, disabledMethods = [], disabledRe</TooltipContent></Tooltip></span>- <div className="grid grid-cols-3 gap-3">+ <div className="grid grid-cols-1 gap-3 sm:grid-cols-3">{EXPORT_METHODS.map((m) => {const selected = value === m.value;const isDisabled = disabledMethods.includes(m.value);diff --git a/studio/frontend/src/features/hub/catalog/model-inspector.tsx b/studio/frontend/src/features/hub/catalog/model-inspector.tsxindex 6798ebe212d..30fb9b99ab1 100644--- a/studio/frontend/src/features/hub/catalog/model-inspector.tsx+++ b/studio/frontend/src/features/hub/catalog/model-inspector.tsx@@ -510,7 +510,7 @@ export const ModelInspector = memo(function ModelInspector({if (!model) {return (- <div className="flex min-h-[60vh] flex-col items-center justify-center gap-3 py-16 text-center">+ <div className="flex min-h-[60dvh] flex-col items-center justify-center gap-3 py-16 text-center"><div className="inline-flex size-12 items-center justify-center rounded-[14px] bg-muted text-muted-foreground"><HugeiconsIcon icon={CubeIcon} strokeWidth={1.5} className="size-5" /></div>diff --git a/studio/frontend/src/features/hub/catalog/sampling-settings-dialog.tsx b/studio/frontend/src/features/hub/catalog/sampling-settings-dialog.tsxindex 3c512a55127..ef8db765c0d 100644--- a/studio/frontend/src/features/hub/catalog/sampling-settings-dialog.tsx+++ b/studio/frontend/src/features/hub/catalog/sampling-settings-dialog.tsx@@ -225,7 +225,7 @@ export function SamplingSettingsButton({ className }: { className?: string }) {</Tooltip><Dialog open={open} onOpenChange={setOpen}><DialogContent- className="flex max-h-[85vh] flex-col gap-5 sm:max-w-[580px]"+ className="flex max-h-[85dvh] flex-col gap-5 sm:max-w-[580px]"onClick={(e) => e.stopPropagation()}><DialogHeader>diff --git a/studio/frontend/src/features/hub/download-manager/download-manager-panel.tsx b/studio/frontend/src/features/hub/download-manager/download-manager-panel.tsxindex d68aaa5ab39..c22afa84d72 100644--- a/studio/frontend/src/features/hub/download-manager/download-manager-panel.tsx+++ b/studio/frontend/src/features/hub/download-manager/download-manager-panel.tsx@@ -249,7 +249,7 @@ export function DownloadManagerPanel({/></button></div>- <ul className="max-h-[60vh] divide-y divide-foreground/[0.06] overflow-y-auto [scrollbar-width:thin]">+ <ul className="max-h-[60dvh] divide-y divide-foreground/[0.06] overflow-y-auto [scrollbar-width:thin]">{jobKeys.map((jobKey) => (<DownloadRow key={jobKey} jobKey={jobKey} />))}diff --git a/studio/frontend/src/features/images/diffusion-train-dialog.tsx b/studio/frontend/src/features/images/diffusion-train-dialog.tsxindex 81e98db4fb8..d7982b67261 100644--- a/studio/frontend/src/features/images/diffusion-train-dialog.tsx+++ b/studio/frontend/src/features/images/diffusion-train-dialog.tsx@@ -246,7 +246,7 @@ export function DiffusionTrainDialog({return (<Dialog open={open} onOpenChange={onOpenChange}>- <DialogContent className="flex max-h-[85vh] max-w-lg flex-col">+ <DialogContent className="flex max-h-[85dvh] max-w-lg flex-col"><DialogHeader><DialogTitle>Train an SDXL LoRA</DialogTitle><DialogDescription>@@ -422,7 +422,7 @@ export function DiffusionTrainDialog({/></div></div>- <div className="grid grid-cols-2 gap-3">+ <div className="grid grid-cols-1 gap-3 sm:grid-cols-2"><div className="grid gap-1.5"><Label className="text-xs">Learning rate</Label><Inputdiff --git a/studio/frontend/src/features/images/images-page.tsx b/studio/frontend/src/features/images/images-page.tsxindex 445548d2438..c3f3bae6d91 100644--- a/studio/frontend/src/features/images/images-page.tsx+++ b/studio/frontend/src/features/images/images-page.tsx@@ -2543,15 +2543,20 @@ export function ImagesPage({ active = true }: { active?: boolean }) {/* Settings column + preview canvas: both on the page background, split by a rule. Each pane pads its own content.Full width, so the canvas grows with the window; the settings column stays fixed.pl-8 puts its content 40px in, level with the model selector label above and- with pr-8 on the other side of the column. */- <div className="flex min-h-0 w-full min-w-0 flex-1 overflow-hidden pl-2 pr-5 pt-9 sm:pr-8">- <div className="relative flex w-[408px] shrink-0 flex-col overflow-hidden border-r border-border/60 pl-8">+ with pr-8 on the other side of the column.+ overflow-x-hidden because an unset overflow-x computes to auto beside overflow-y-auto,+ which would let a wide row pan the page sideways on a phone. */+ <div className="flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden pl-2 pr-5 pt-9 sm:pr-8 md:flex-row md:overflow-hidden">+ <div className="relative flex w-full shrink-0 flex-col border-b border-border/60 pl-8 md:w-[408px] md:overflow-hidden md:border-r md:border-b-0">{/* pl-0.5 keeps focus rings off the scroll container's edge. */}<divref={attachSettingsScroll}onScroll={onSettingsScroll}className={cn(- "hover-scrollbar panel-scroll-fade flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto pb-20 pl-0.5 pr-8",+ // pb-20 at every width: the floating Generate button below is absolutely+ // positioned over this rail and stands 72px tall (h-11 + pb-7), so a smaller+ // phone padding puts it on top of the last control.+ "hover-scrollbar panel-scroll-fade flex min-h-0 flex-1 flex-col gap-4 pb-20 pl-0.5 pr-8 md:overflow-y-auto",settingsFadeClass,)}>@@ -3105,7 +3110,7 @@ export function ImagesPage({ active = true }: { active?: boolean }) {</div></div>- <div className="relative flex min-w-0 flex-1 flex-col overflow-hidden pl-2">+ <div className="relative flex min-h-[60dvh] min-w-0 flex-1 flex-col overflow-hidden pl-2 md:min-h-0">{/* With the pane's pl-2, the 40px gutter the settings column has off the page edge. */}<div className="hover-scrollbar relative flex flex-1 items-center justify-center overflow-auto p-6 pl-8">{selected && selectedSrc ? (diff --git a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx b/studio/frontend/src/features/images/train/diffusion-train-panel.tsxindex bf3965de109..7c699da1b6c 100644--- a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx+++ b/studio/frontend/src/features/images/train/diffusion-train-panel.tsx@@ -1111,19 +1111,24 @@ export function DiffusionTrainPanel({</div>);+ // overflow-x-hidden: an unset overflow-x computes to auto beside overflow-y-auto,+ // letting a wide row pan the page sideways on a phone.return (- <div className="flex min-h-0 w-full min-w-0 flex-1 overflow-hidden pl-2 pr-5 pt-9 sm:pr-8">+ <div className="flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden pl-2 pr-5 pt-9 sm:pr-8 md:flex-row md:overflow-hidden">{/* Left: configure. No cards: both panes sit on the page background, split by a full-height rule. */}{/* Gutters match the Create tab: pl-8 puts the content 40px in, level with the modelselector above; pr-8 sets the gap to the rule. */}- <div className="relative flex w-[416px] min-w-0 shrink-0 flex-col overflow-hidden border-r border-border/60 pl-8">+ <div className="relative flex w-full min-w-0 shrink-0 flex-col border-b border-border/60 pl-8 md:w-[416px] md:overflow-hidden md:border-r md:border-b-0">{/* pl-0.5 keeps focus rings off the scroll container's edge. pt-1.5matches the right pane's p-1.5, so both headings start on the same line. */}<divref={attachSettingsScroll}onScroll={onSettingsScroll}className={cn(- "hover-scrollbar panel-scroll-fade flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto overflow-x-hidden pb-20 pl-0.5 pr-8 pt-1.5",+ // pb-20 at every width: the floating Start training button below is absolutely+ // positioned over this rail and stands 72px tall (h-11 + pb-7), so a smaller+ // phone padding puts it on top of the Adapter name field.+ "hover-scrollbar panel-scroll-fade flex min-h-0 flex-1 flex-col gap-5 overflow-x-hidden pb-20 pl-0.5 pr-8 pt-1.5 md:overflow-y-auto",settingsFadeClass,)}>@@ -1420,7 +1425,7 @@ export function DiffusionTrainPanel({{/* Right: the run area. Before a run: training settings + previous-runs history; during/after: the live view. Selecting a previous run re-plots its logs read-only. */}{/* Sections carry no card of their own: spacing and a rule separate them. p-1.5 keeps the chart cards' outer ring from being clipped. */}{/* 40px off the rule, the gutter the settings column has off the page edge. */}- <div className="hover-scrollbar relative flex min-w-0 flex-1 flex-col gap-5 overflow-y-auto p-1.5 pb-7 pl-10">+ <div className="hover-scrollbar relative flex min-w-0 flex-1 flex-col gap-5 p-1.5 pb-7 pl-8 md:overflow-y-auto md:pl-10">{viewRun && !hasRun ? (<><div className="flex flex-col gap-3">diff --git a/studio/frontend/src/features/model-picker/components/chat-template-editor-dialog.tsx b/studio/frontend/src/features/model-picker/components/chat-template-editor-dialog.tsxindex 5326bebac67..3dad635aeed 100644--- a/studio/frontend/src/features/model-picker/components/chat-template-editor-dialog.tsx+++ b/studio/frontend/src/features/model-picker/components/chat-template-editor-dialog.tsx@@ -126,7 +126,7 @@ export function ChatTemplateEditorDialog({setError(null);}}readOnly={readOnly}- className="min-h-[20rem] max-h-[50vh] overflow-y-auto border-0 font-mono text-xs leading-5 corner-squircle focus-visible:ring-0"+ className="min-h-[20rem] max-h-[50dvh] overflow-y-auto border-0 font-mono text-xs leading-5 corner-squircle focus-visible:ring-0"rows={14}spellCheck={false}placeholder={defaultLoading ? "Loading model default..." : ""}diff --git a/studio/frontend/src/features/onboarding/components/steps/model-type-step.tsx b/studio/frontend/src/features/onboarding/components/steps/model-type-step.tsxindex 0efe5818441..07bd47cd268 100644--- a/studio/frontend/src/features/onboarding/components/steps/model-type-step.tsx+++ b/studio/frontend/src/features/onboarding/components/steps/model-type-step.tsx@@ -103,7 +103,7 @@ export function ModelTypeStep(): ReactElement {setModelType(v as ModelType);}}}- className="grid grid-cols-2 gap-4"+ className="grid grid-cols-1 gap-4 sm:grid-cols-2">{MODEL_TYPES.map((type) => {const Icon = TYPE_ICONS[type.value];diff --git a/studio/frontend/src/features/onboarding/components/steps/summary-step.tsx b/studio/frontend/src/features/onboarding/components/steps/summary-step.tsxindex 996966c34b9..88002d94bfc 100644--- a/studio/frontend/src/features/onboarding/components/steps/summary-step.tsx+++ b/studio/frontend/src/features/onboarding/components/steps/summary-step.tsx@@ -109,7 +109,7 @@ export function SummaryStep() {const trainingMethodLabel = getTrainingMethodLabel(trainingMethod);return (- <div className="grid grid-cols-2 gap-3">+ <div className="grid grid-cols-1 gap-3 sm:grid-cols-2"><Card size="sm" className="flex flex-col rounded-2xl"><CardHeader className="pb-2"><CardTitle className="text-sm text-muted-foreground">@@ -210,7 +210,7 @@ export function SummaryStep() {</div></div><Separator className="my-2" />- <div className="grid grid-cols-2 gap-x-6 gap-y-1 text-sm">+ <div className="grid grid-cols-1 gap-x-6 gap-y-1 text-sm sm:grid-cols-2"><Row label="Epochs" value={epochs} mono /><Row label="Context" value={contextLength.toLocaleString()} mono /><Row label="LR" value={learningRate.toExponential()} mono />diff --git a/studio/frontend/src/features/onboarding/components/wizard-layout.tsx b/studio/frontend/src/features/onboarding/components/wizard-layout.tsxindex 348f0fd051b..b8219d1eb54 100644--- a/studio/frontend/src/features/onboarding/components/wizard-layout.tsx+++ b/studio/frontend/src/features/onboarding/components/wizard-layout.tsx@@ -77,7 +77,8 @@ export function WizardLayout() {}, [isFinalStep]);return (- <div className="relative flex min-h-[calc(100dvh-var(--studio-titlebar-height,0px))] items-center justify-center overflow-hidden bg-gradient-to-br from-primary/5 via-background to-primary/3 p-4 sm:p-6 md:p-8">+ // a bounded height, not just a minimum, or the container grows to the card and never scrolls+ <div className="relative flex h-[calc(100dvh-var(--studio-titlebar-height,0px))] justify-center overflow-y-auto overflow-x-hidden bg-gradient-to-br from-primary/5 via-background to-primary/3 p-4 sm:p-6 md:p-8">{showSplash && (<SplashScreenonStartOnboarding={() => setShowSplash(false)}@@ -96,7 +97,8 @@ export function WizardLayout() {</Suspense>{!showSplash && (<motion.div- className="w-full max-w-5xl"+ // my-auto centers the card when it fits and lets it scroll from the top when it does not+ className="my-auto w-full max-w-5xl"initial={{ opacity: 0, scale: 0.98, y: 10 }}animate={{ opacity: 1, scale: 1, y: 0 }}transition={{diff --git a/studio/frontend/src/features/rag/components/knowledge-base-dialog.tsx b/studio/frontend/src/features/rag/components/knowledge-base-dialog.tsxindex f7d84ae2f46..d80c77b12c8 100644--- a/studio/frontend/src/features/rag/components/knowledge-base-dialog.tsx+++ b/studio/frontend/src/features/rag/components/knowledge-base-dialog.tsx@@ -216,7 +216,7 @@ export function KnowledgeBaseDialog({No knowledge bases yet.</div>) : (- <ul className="flex max-h-[60vh] flex-col divide-y overflow-y-auto rounded-md border">+ <ul className="flex max-h-[60dvh] flex-col divide-y overflow-y-auto rounded-md border">{kbs.map((kb) => (<likey={kb.id}@@ -350,7 +350,7 @@ function KnowledgeBaseDocuments({No documents yet. Upload a PDF, Markdown, DOCX, HTML, or text file.</div>) : (- <div className="flex max-h-[55vh] flex-wrap gap-1.5 overflow-y-auto pr-0.5">+ <div className="flex max-h-[55dvh] flex-wrap gap-1.5 overflow-y-auto pr-0.5">{documents.map((doc) => (<DocumentStatusChipkey={doc.id}diff --git a/studio/frontend/src/features/settings/settings-dialog.tsx b/studio/frontend/src/features/settings/settings-dialog.tsxindex d3df8e66f5e..5e5ef9e6451 100644--- a/studio/frontend/src/features/settings/settings-dialog.tsx+++ b/studio/frontend/src/features/settings/settings-dialog.tsx@@ -285,11 +285,14 @@ export function SettingsDialog() {// Cap at 960px but shrink to the viewport so it doesn't clip on// iPad-portrait widths where a fixed width overflows. Height caps// the same way so short viewports don't get a clipped dialog.- "settings-surface !max-w-[min(960px,calc(100vw-2rem))] h-[min(680px,calc(100dvh-2rem))] w-[min(960px,calc(100vw-2rem))] p-0 overflow-hidden",+ "settings-surface !max-w-[min(960px,calc(100vw-2rem))] h-[min(820px,calc(100dvh-var(--studio-window-chrome-top,0px)-2rem))] w-[min(960px,calc(100vw-2rem))] p-0 overflow-hidden",// Soft shadow, no outline ring. Pin --radius to the light value so// corner rounding matches in dark mode."shadow-border rounded-xl ring-0 [--radius:1.1rem]",- "max-sm:h-dvh max-sm:w-dvw max-sm:!max-w-none max-sm:rounded-none",+ // Same chrome-subtracted height the shared DialogContent uses at this+ // breakpoint: a plain h-dvh wins tailwind-merge and would hang the surface+ // (and its overflow-hidden bottom edge) below the window. 0px on web.+ "max-sm:h-[calc(100dvh-var(--studio-window-chrome-top,0px))] max-sm:w-dvw max-sm:!max-w-none max-sm:rounded-none",)}><DialogTitle className="sr-only">diff --git a/studio/frontend/src/features/studio/history-card-grid.tsx b/studio/frontend/src/features/studio/history-card-grid.tsxindex 670f58c2c19..97ac777a1f2 100644--- a/studio/frontend/src/features/studio/history-card-grid.tsx+++ b/studio/frontend/src/features/studio/history-card-grid.tsx@@ -638,7 +638,7 @@ export function HistoryCardGrid({{!isRunning && (<buttontype="button"- className="absolute right-3 top-3 z-10 rounded-md p-1 text-muted-foreground/50 opacity-0 transition-opacity hover:bg-destructive/10 hover:text-destructive group-hover:opacity-100 focus-visible:opacity-100"+ className="absolute right-3 top-3 z-10 rounded-md p-1 text-muted-foreground/50 opacity-0 transition-opacity hover:bg-destructive/10 hover:text-destructive group-hover:opacity-100 focus-visible:opacity-100 pointer-coarse:opacity-100"aria-label={t("studio.history.deleteRun")}onClick={() => setDeleteTarget(run.id)}>diff --git a/studio/frontend/src/features/studio/live-training-view.tsx b/studio/frontend/src/features/studio/live-training-view.tsxindex 7f510f88304..1365ef3092b 100644--- a/studio/frontend/src/features/studio/live-training-view.tsx+++ b/studio/frontend/src/features/studio/live-training-view.tsx@@ -175,7 +175,7 @@ export function LiveTrainingView(): ReactElement {(isWaitingForFirstStep && runtime.currentStep <= 0);return (- <div className={cn("relative", showOverlay && "min-h-[72vh]")}>+ <div className={cn("relative", showOverlay && "min-h-[72dvh]")}><divclassName={cn("relative z-10 flex flex-col gap-6 transition-[filter]",diff --git a/studio/frontend/src/features/studio/sections/dataset-preview-dialog.tsx b/studio/frontend/src/features/studio/sections/dataset-preview-dialog.tsxindex 9d1f5d562f4..c6de29841f5 100644--- a/studio/frontend/src/features/studio/sections/dataset-preview-dialog.tsx+++ b/studio/frontend/src/features/studio/sections/dataset-preview-dialog.tsx@@ -558,7 +558,7 @@ export function DatasetPreviewDialog({return (<Dialog open={open} onOpenChange={handleOpenChange}><DialogContent- className="sm:max-w-5xl w-[90vw] max-h-[88vh] flex flex-col gap-0 p-0 overflow-hidden rounded-3xl corner-squircle"+ className="sm:max-w-5xl w-[90vw] max-h-[88dvh] flex flex-col gap-0 p-0 overflow-hidden rounded-3xl corner-squircle"showCloseButton={true}>{/* Header */}diff --git a/studio/frontend/src/features/studio/sections/lora-params-section.tsx b/studio/frontend/src/features/studio/sections/lora-params-section.tsxindex 5488e7ba5de..2bb08b7b24c 100644--- a/studio/frontend/src/features/studio/sections/lora-params-section.tsx+++ b/studio/frontend/src/features/studio/sections/lora-params-section.tsx@@ -216,7 +216,7 @@ export function LoraParamsSection(): ReactElement | null {</div>)}- <div className="grid grid-cols-2 gap-2">+ <div className="grid grid-cols-1 gap-2 sm:grid-cols-2">{([{diff --git a/studio/frontend/src/features/video/video-page.tsx b/studio/frontend/src/features/video/video-page.tsxindex d0c87876176..02428431315 100644--- a/studio/frontend/src/features/video/video-page.tsx+++ b/studio/frontend/src/features/video/video-page.tsx@@ -1545,15 +1545,20 @@ export function VideoPage({ active = true }: { active?: boolean }) {{/* Controls rail + preview canvas, as on the Images tabs: no cards, a rule the full pageheight. Full width, so the preview grows with the window.Gutters match Images, so both pages' content starts at the same 40px. */}- <div className="flex min-h-0 w-full min-w-0 flex-1 overflow-hidden pl-2 pr-5 pt-9 sm:pr-8">+ {/* overflow-x-hidden: an unset overflow-x computes to auto beside overflow-y-auto,+ letting a wide row pan the page sideways on a phone. */}+ <div className="flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden pl-2 pr-5 pt-9 sm:pr-8 md:flex-row md:overflow-hidden">{/* Widened by the pl-8 so the controls keep their old width. */}- <div className="relative flex w-[400px] shrink-0 flex-col overflow-hidden border-r border-border/60 pl-8">+ <div className="relative flex w-full shrink-0 flex-col border-b border-border/60 pl-8 md:w-[400px] md:overflow-hidden md:border-r md:border-b-0">{/* pl-0.5 keeps focus rings off the scroll container's edge. */}<divref={attachSettingsScroll}onScroll={onSettingsScroll}className={cn(- "hover-scrollbar panel-scroll-fade flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto pb-20 pl-0.5 pr-7",+ // pb-20 at every width: the floating Generate button below is absolutely+ // positioned over this rail and stands 72px tall (h-11 + pb-7), so a smaller+ // phone padding puts it on top of the last control.+ "hover-scrollbar panel-scroll-fade flex min-h-0 flex-1 flex-col gap-4 pb-20 pl-0.5 pr-7 md:overflow-y-auto",settingsFadeClass,)}>@@ -1697,7 +1702,7 @@ export function VideoPage({ active = true }: { active?: boolean }) {</div></div>- <div className="relative flex min-w-0 flex-1 flex-col overflow-hidden pl-2">+ <div className="relative flex min-h-[60dvh] min-w-0 flex-1 flex-col overflow-hidden pl-2 md:min-h-0"><div className="hover-scrollbar relative flex flex-1 items-center justify-center overflow-auto p-6">{selected && selectedSrc ? (<>