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: responsive layout for phones, tablets and ultrawide (#11660)

Michael Hana5ee71344716
diff --git a/studio/frontend/src/components/ui/context-menu.tsx b/studio/frontend/src/components/ui/context-menu.tsx
index 86f659734f1..7afc3cf7995 100644
--- a/studio/frontend/src/components/ui/context-menu.tsx
+++ b/studio/frontend/src/components/ui/context-menu.tsx
@@ -76,7 +76,7 @@ function ContextMenuContent({
<ContextMenuPrimitive.Content
data-slot="context-menu-content"
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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-[color-mix(in_oklab,var(--foreground)_calc(5%*var(--contrast-edge-gain,1)),transparent)] bg-popover text-popover-foreground min-w-48 rounded-2xl p-1 shadow-2xl ring-1 duration-100 z-50 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto",
+ "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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-[color-mix(in_oklab,var(--foreground)_calc(5%*var(--contrast-edge-gain,1)),transparent)] bg-popover text-popover-foreground min-w-48 max-w-[calc(100vw-32px)] rounded-2xl p-1 shadow-2xl ring-1 duration-100 z-50 max-h-(--radix-context-menu-content-available-height) origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto",
className,
)}
{...props}
@@ -147,7 +147,7 @@ function ContextMenuSubContent({
<ContextMenuPrimitive.SubContent
data-slot="context-menu-sub-content"
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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground min-w-32 rounded-md border p-1 shadow-lg duration-100 z-50 origin-(--radix-context-menu-content-transform-origin) overflow-hidden",
+ "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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground min-w-32 max-w-[calc(100vw-32px)] rounded-md border p-1 shadow-lg duration-100 z-50 origin-(--radix-context-menu-content-transform-origin) overflow-hidden",
className,
)}
{...props}
diff --git a/studio/frontend/src/components/ui/empty.tsx b/studio/frontend/src/components/ui/empty.tsx
index 0d495755dd2..84f6d247511 100644
--- a/studio/frontend/src/components/ui/empty.tsx
+++ b/studio/frontend/src/components/ui/empty.tsx
@@ -10,7 +10,7 @@ function Empty({ className, ...props }: React.ComponentProps<"div">) {
<div
data-slot="empty"
className={cn(
- "gap-4 rounded-lg border-dashed p-12 flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center text-balance",
+ "gap-4 rounded-lg border-dashed p-12 max-sm:px-4 max-sm:py-8 flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center text-balance",
className
)}
{...props}
diff --git a/studio/frontend/src/components/ui/sidebar.tsx b/studio/frontend/src/components/ui/sidebar.tsx
index 61874f0b579..756d9ebcd7f 100644
--- a/studio/frontend/src/components/ui/sidebar.tsx
+++ b/studio/frontend/src/components/ui/sidebar.tsx
@@ -334,7 +334,7 @@ function Sidebar({
data-sidebar="sidebar"
data-slot="sidebar"
data-mobile="true"
- className="bg-sidebar text-sidebar-foreground w-2/3 max-w-[calc(18rem*var(--ui-space-scale,1))] p-0 [&>button]:hidden"
+ className="bg-sidebar text-sidebar-foreground w-2/3 max-w-[calc(18rem*var(--ui-space-scale,1))] max-sm:w-[85vw] p-0 [&>button]:hidden"
side={side}
>
<SheetHeader className="sr-only">
diff --git a/studio/frontend/src/features/api-monitor/api-monitor-page.tsx b/studio/frontend/src/features/api-monitor/api-monitor-page.tsx
index 0416cbc8535..99414d4d952 100644
--- a/studio/frontend/src/features/api-monitor/api-monitor-page.tsx
+++ b/studio/frontend/src/features/api-monitor/api-monitor-page.tsx
@@ -705,7 +705,7 @@ export function ApiMonitorPage(): ReactElement {
: "No model loaded";
return (
- <main className="mx-auto flex w-full max-w-6xl flex-col gap-6 px-6 pb-10 pt-12 font-heading sm:px-10">
+ <main className="mx-auto flex w-full max-w-6xl 3xl:max-w-[calc(1440px*var(--ui-space-scale,1))] 4xl:max-w-[calc(1760px*var(--ui-space-scale,1))] flex-col gap-6 px-6 pb-10 pt-12 max-sm:px-4 max-sm:pt-8 font-heading sm:px-10">
<GuidedTour {...tour.tourProps} />
<header className="flex flex-wrap items-start justify-between gap-4">
<div className="flex min-w-0 flex-col gap-1">
@@ -938,7 +938,7 @@ export function ApiMonitorPage(): ReactElement {
onChange={(event) => setQuery(event.target.value)}
placeholder="Search model, endpoint, preview or error"
aria-label="Search API requests"
- className="h-9 w-full min-w-0 flex-1 rounded-full border-none bg-muted shadow-none dark:bg-background sm:w-64 sm:flex-none"
+ className="h-9 w-full min-w-0 flex-1 max-sm:basis-full rounded-full border-none bg-muted shadow-none dark:bg-background sm:w-64 sm:flex-none"
/>
<Select
value={statusFilter}
@@ -967,9 +967,9 @@ export function ApiMonitorPage(): ReactElement {
<div
data-tour="api-log"
- className="grid min-h-0 grid-cols-1 lg:grid-cols-[minmax(0,380px)_minmax(0,1fr)]"
+ className="grid min-h-0 grid-cols-1 lg:grid-cols-[minmax(0,380px)_minmax(0,1fr)] 4xl:grid-cols-[minmax(0,480px)_minmax(0,1fr)]"
>
- <div className="max-h-[calc(560px*var(--ui-space-scale,1))] min-h-[calc(220px*var(--ui-space-scale,1))] overflow-y-auto border-b border-border/60 lg:border-b-0 lg:border-r">
+ <div className="max-h-[calc(560px*var(--ui-space-scale,1))] min-h-[calc(220px*var(--ui-space-scale,1))] max-lg:max-h-[45dvh] 3xl:max-h-[calc(100dvh-22rem*var(--ui-space-scale,1))] overflow-y-auto border-b border-border/60 lg:border-b-0 lg:border-r">
{loading ? (
<div className="flex flex-col gap-3 p-4">
{[0, 1, 2].map((i) => (
@@ -996,7 +996,7 @@ export function ApiMonitorPage(): ReactElement {
)}
</div>
- <div className="max-h-[calc(560px*var(--ui-space-scale,1))] min-h-[calc(220px*var(--ui-space-scale,1))] overflow-y-auto">
+ <div className="max-h-[calc(560px*var(--ui-space-scale,1))] min-h-[calc(220px*var(--ui-space-scale,1))] max-lg:max-h-[45dvh] 3xl:max-h-[calc(100dvh-22rem*var(--ui-space-scale,1))] overflow-y-auto">
{selected ? (
<RequestDetail
entry={selected}
diff --git a/studio/frontend/src/features/audio/audio-page.tsx b/studio/frontend/src/features/audio/audio-page.tsx
index 1a3b0de39c7..986cf6c76ad 100644
--- a/studio/frontend/src/features/audio/audio-page.tsx
+++ b/studio/frontend/src/features/audio/audio-page.tsx
@@ -106,6 +106,7 @@ import { subscribeGalleryChanged } from "@/lib/gallery-flags";
import { subscribeModelLifecycle } from "@/lib/model-lifecycle-events";
import { toast } from "@/lib/toast";
import { cn } from "@/lib/utils";
+import { useIsMobileShell } from "@/hooks/use-mobile";
import { useNavigate, useSearch } from "@tanstack/react-router";
import {
@@ -285,7 +286,7 @@ function ClipRowMenu({
aria-label={`Actions for ${clip.prompt || "clip"}`}
// Hidden until the row is hovered or the menu is open, so a long list stays quiet; keyboard
// focus reveals it too.
- className="flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground/60 opacity-0 transition-colors hover:bg-[rgb(0_0_0_/_calc(0.05*var(--contrast-wash-gain,1)))] hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100 dark:hover:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))]"
+ className="flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground/60 opacity-0 any-pointer-coarse:opacity-100 transition-colors hover:bg-[rgb(0_0_0_/_calc(0.05*var(--contrast-wash-gain,1)))] hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100 dark:hover:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))]"
>
<HugeiconsIcon
icon={MoreVerticalIcon}
@@ -337,6 +338,8 @@ export function AudioPage({
onInitialReady?: () => void;
}) {
const initialReadySent = useRef(false);
+ // Clear the floating sidebar toggle on mobile.
+ const isMobileShell = useIsMobileShell();
const [mode, setMode] = useState<CreateMode>("speak");
const tourSteps = useMemo(() => buildAudioTourSteps({ mode }), [mode]);
const tour = useGuidedTourController({
@@ -2568,8 +2571,13 @@ export function AudioPage({
{active && <GuidedTour {...tour.tourProps} />}
{/* Keep the tabs centered over the preview at every width. The model rail holds at 408px when
space permits and shrinks only to preserve the controls. */}
- <div className="pointer-events-none relative z-40 grid h-[calc(48px*var(--ui-space-scale,1))] shrink-0 grid-cols-[minmax(0,calc(408px*var(--ui-space-scale,1)))_minmax(13rem,1fr)]">
- <div className="pointer-events-none flex h-full min-w-0 items-start overflow-hidden pl-[var(--studio-media-header-left-inset,1.5rem)] @[50rem]:border-r @[50rem]:border-border/60">
+ <div className="pointer-events-none relative z-40 grid h-[calc(48px*var(--ui-space-scale,1))] shrink-0 grid-cols-[minmax(0,calc(408px*var(--ui-space-scale,1)))_minmax(13rem,1fr)] @max-[30rem]:grid-cols-[minmax(0,1fr)_auto]">
+ <div
+ className={cn(
+ "pointer-events-none flex h-full min-w-0 items-start overflow-hidden @[50rem]:border-r @[50rem]:border-border/60",
+ isMobileShell ? "pl-12" : "pl-[var(--studio-media-header-left-inset,1.5rem)]",
+ )}
+ >
{/* A long resident model name must yield to the mode pill instead of painting over it. */}
<div className="pointer-events-auto flex min-w-0 max-w-full items-center gap-2 overflow-hidden pt-[var(--studio-chat-header-padding-top,11px)]">
<ModelSelector
@@ -2616,7 +2624,7 @@ export function AudioPage({
void navigateSelf({ to: "/studio" });
}}
fit={true}
- className="h-[calc(34px*var(--ui-space-scale,1))] [&>button]:h-[calc(34px*var(--ui-space-scale,1))] [&>button]:px-3 @[68rem]:[&>button]:px-11"
+ className="h-[calc(34px*var(--ui-space-scale,1))] [&>button]:h-[calc(34px*var(--ui-space-scale,1))] [&>button]:px-3 @[68rem]:[&>button]:px-11 @max-[30rem]:[&>button]:px-2.5 @max-[30rem]:[&>button>span]:sr-only"
tabs={[
{
value: "create",
@@ -2651,7 +2659,7 @@ export function AudioPage({
ref={attachSettingsScroll}
onScroll={onSettingsScroll}
className={cn(
- "hover-scrollbar flex min-h-0 flex-1 flex-col gap-4 px-10 pt-9 pb-6 @[50rem]:overflow-y-auto",
+ "hover-scrollbar flex min-h-0 flex-1 flex-col gap-4 px-10 max-sm:px-5 pt-9 pb-6 @[50rem]:overflow-y-auto",
mode === "speak"
? "panel-scroll-fade-action"
: "panel-scroll-fade",
diff --git a/studio/frontend/src/features/audio/transcript-gallery.tsx b/studio/frontend/src/features/audio/transcript-gallery.tsx
index ca3aa5bb3eb..4706d6cf292 100644
--- a/studio/frontend/src/features/audio/transcript-gallery.tsx
+++ b/studio/frontend/src/features/audio/transcript-gallery.tsx
@@ -221,7 +221,7 @@ export function TranscriptGallery({
<Button
variant="ghost"
size="icon"
- className="size-5 text-muted-foreground/60 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100"
+ className="size-5 text-muted-foreground/60 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100 any-pointer-coarse:opacity-100"
aria-label="Transcript actions"
>
<HugeiconsIcon icon={MoreVerticalIcon} className="size-3.5" />
diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsx
index a9231dee629..e9a4772efcc 100644
--- a/studio/frontend/src/features/chat/chat-page.tsx
+++ b/studio/frontend/src/features/chat/chat-page.tsx
@@ -54,6 +54,7 @@ import {
import { useSidebar } from "@/components/ui/sidebar";
import { Tooltip, TooltipContent } from "@/components/ui/tooltip";
import { useIsMobile } from "@/hooks/use-mobile";
+import { holdSidebarPinned, releaseSidebarPinned } from "@/hooks/use-sidebar-pin";
import {
DOWNLOAD_KIND,
dismissStartToast,
@@ -800,7 +801,7 @@ function CompareShell({
<div className="flex min-h-0 min-w-0 flex-1 basis-0 flex-col">
<div
data-tour="chat-compare-view"
- className="flex min-h-0 min-w-0 flex-1 basis-0 flex-col pt-[var(--studio-content-top-inset,0px)] md:flex-row"
+ className="flex min-h-0 min-w-0 flex-1 basis-0 flex-col pt-[var(--studio-content-top-inset,0px)] lg:flex-row"
>
{children}
</div>
@@ -947,9 +948,9 @@ const LoraCompareContent = memo(function LoraCompareContent({
onInitialHistoryReady={
threadsSettled ? markInitialHistoryReady : undefined
}
- borderClassName="border-t border-border/60 md:border-t-0 md:border-l"
+ borderClassName="border-t border-border/60 lg:border-t-0 lg:border-l"
header={
- <div className="shrink-0 px-3 py-1.5 text-start md:text-end md:pr-[calc(4rem*var(--ui-space-scale,1)+var(--studio-chat-header-right-inset,var(--studio-window-control-inset,0px)))]">
+ <div className="shrink-0 px-3 py-1.5 text-start lg:text-end lg:pr-[calc(4rem*var(--ui-space-scale,1)+var(--studio-chat-header-right-inset,var(--studio-window-control-inset,0px)))]">
<span className="text-ui-10 font-semibold uppercase tracking-wider text-primary">
Fine-tuned
</span>
@@ -1191,7 +1192,7 @@ const GeneralCompareContent = memo(function GeneralCompareContent({
onInitialHistoryReady={
threadsSettled ? markInitialHistoryReady : undefined
}
- borderClassName="border-t border-sidebar-border md:border-t-0 md:border-l"
+ borderClassName="border-t border-sidebar-border lg:border-t-0 lg:border-l"
header={
<GeneralCompareHeader
side="right"
@@ -3561,17 +3562,11 @@ export function ChatPage({
},
{ enabled: active && fastModeSupported },
);
- const { isMobile, pinned, setPinned } = useSidebar();
- // The tour's orientation step spotlights the nav, so show it for that step and put the user's
- // own pin setting back on the way out; it is persisted, so a tour must not rewrite it.
- const sidebarWasPinnedRef = useRef(pinned);
- const showSidebarForTour = useCallback(() => {
- sidebarWasPinnedRef.current = pinned;
- setPinned(true);
- }, [pinned, setPinned]);
- const restoreSidebarAfterTour = useCallback(() => {
- if (!sidebarWasPinnedRef.current) setPinned(false);
- }, [setPinned]);
+ const { isMobile, pinned } = useSidebar();
+ // The tour's orientation step spotlights the nav, so hold it open for that step. The hold is
+ // never persisted, so a tour cannot rewrite the user's pin or the width default.
+ const showSidebarForTour = holdSidebarPinned;
+ const restoreSidebarAfterTour = releaseSidebarPinned;
const enterCompare = useCallback(() => {
viewBeforeCompareRef.current = { ...search };
@@ -4053,7 +4048,7 @@ export function ChatPage({
triggerDataTour="chat-model-selector"
contentDataTour="chat-model-selector-popover"
showCloudIndicator={isExternalModel}
- className="max-w-[62vw] !pr-3 sm:max-w-none !h-[var(--studio-chat-control-height,34px)]"
+ className="max-w-[62vw] !pr-3 md:max-w-none !h-[var(--studio-chat-control-height,34px)]"
/>
)}
{view.mode !== "compare" && currentProjectId && (
diff --git a/studio/frontend/src/features/chat/chat-providers-dialog.tsx b/studio/frontend/src/features/chat/chat-providers-dialog.tsx
index 1c8fd9e8c82..fad636e8877 100644
--- a/studio/frontend/src/features/chat/chat-providers-dialog.tsx
+++ b/studio/frontend/src/features/chat/chat-providers-dialog.tsx
@@ -1391,24 +1391,24 @@ export function ChatProvidersSettings({
key={preset.providerType}
value={preset.providerType}
>
- <span className="flex items-center gap-2">
+ <span className="flex min-w-0 items-center gap-2">
<ApiProviderLogo
providerType={preset.providerType}
className="size-4"
title={preset.displayName}
/>
- {preset.displayName}
+ <span className="truncate">{preset.displayName}</span>
</span>
</SelectItem>
))}
<SelectItem value={LEGACY_CUSTOM_PROVIDER_TYPE}>
- <span className="flex items-center gap-2">
+ <span className="flex min-w-0 items-center gap-2">
<ApiProviderLogo
providerType={LEGACY_CUSTOM_PROVIDER_TYPE}
className="size-4"
title={CUSTOM_PROVIDER_DISPLAY_NAME}
/>
- {CUSTOM_PROVIDER_DISPLAY_NAME}
+ <span className="truncate">{CUSTOM_PROVIDER_DISPLAY_NAME}</span>
</span>
</SelectItem>
</SelectGroup>
@@ -1424,13 +1424,13 @@ export function ChatProvidersSettings({
key={entry.provider_type}
value={entry.provider_type}
>
- <span className="flex items-center gap-2">
+ <span className="flex min-w-0 items-center gap-2">
<ApiProviderLogo
providerType={entry.provider_type}
className="size-4"
title={entry.display_name}
/>
- {entry.display_name}
+ <span className="truncate">{entry.display_name}</span>
</span>
</SelectItem>
))}
diff --git a/studio/frontend/src/features/chat/chat-settings-sheet.tsx b/studio/frontend/src/features/chat/chat-settings-sheet.tsx
index e1cb5e58bae..7960e3e310b 100644
--- a/studio/frontend/src/features/chat/chat-settings-sheet.tsx
+++ b/studio/frontend/src/features/chat/chat-settings-sheet.tsx
@@ -56,7 +56,7 @@ import {
clampChatSettingsWidth,
useChatSettingsWidth,
} from "@/hooks/use-chat-settings-width";
-import { useIsMobile } from "@/hooks/use-mobile";
+import { useIsCompact } from "@/hooks/use-mobile";
import { useT } from "@/i18n";
import { ChevronDownStandardIcon } from "@/lib/chevron-icons";
import { toast } from "@/lib/toast";
@@ -506,7 +506,8 @@ export function ChatSettingsPanel({
!isExternalModel || Boolean(providerCapabilities?.repetitionPenalty);
const showPresencePenalty =
!isExternalModel || Boolean(providerCapabilities?.presencePenalty);
- const isMobile = useIsMobile();
+ // Overlay as a sheet below lg so the thread keeps its width.
+ const isCompact = useIsCompact();
const activeGgufVariant = useChatRuntimeStore((s) => s.activeGgufVariant);
const loadedIsGguf = useChatRuntimeStore((s) => s.loadedIsGguf);
const activeNativePathToken = useChatRuntimeStore(
@@ -1083,7 +1084,7 @@ export function ChatSettingsPanel({
{/* Header is outside the scroll area so the scrollbar never shifts the close button.
Reuse the chat header metrics so the toggle stays put when the panel opens. */}
<div className="flex h-[var(--studio-chat-header-height,48px)] shrink-0 items-start gap-2 bg-panel-surface pl-[calc(18px*var(--ui-space-scale,1))] pr-[calc(18px*var(--ui-space-scale,1))] pt-[var(--studio-chat-header-padding-top,11px)]">
- {isMobile ? (
+ {isCompact ? (
<span className="flex h-[var(--studio-chat-control-height,34px)] flex-1 items-center text-ui-16 font-semibold tracking-[0em] dark:tracking-[0.015em] text-nav-fg">
Run settings
</span>
@@ -1827,7 +1828,7 @@ export function ChatSettingsPanel({
</>
);
- if (isMobile) {
+ if (isCompact) {
return (
<Sheet open={open} onOpenChange={onOpenChange}>
<SheetContent side="right" className="w-[min(calc(18rem*var(--ui-space-scale,1)),100vw)] p-0 font-heading">
diff --git a/studio/frontend/src/features/chat/components/model-load-status.tsx b/studio/frontend/src/features/chat/components/model-load-status.tsx
index bbacb66df02..adee7c4f4de 100644
--- a/studio/frontend/src/features/chat/components/model-load-status.tsx
+++ b/studio/frontend/src/features/chat/components/model-load-status.tsx
@@ -129,14 +129,14 @@ export function ModelLoadInlineStatus({
const hasProgress = typeof progressPercent === "number";
return (
- <div className="flex min-w-[min(calc(20rem*var(--ui-space-scale,1)),100%)] items-center gap-2.5 text-muted-foreground" title={title}>
+ <div className="flex min-w-[min(calc(20rem*var(--ui-space-scale,1)),100%)] max-sm:min-w-0 max-sm:flex-1 items-center gap-2.5 text-muted-foreground" title={title}>
<div className="flex items-center gap-1.5 shrink-0">
<Spinner className="size-3.5 shrink-0" />
<span className="text-xs">{label}</span>
</div>
{hasProgress ? (
<div className="flex min-w-0 flex-[1.35] items-center gap-2.5">
- <div className="min-w-[calc(7rem*var(--ui-space-scale,1))] flex-1">
+ <div className="min-w-[calc(7rem*var(--ui-space-scale,1))] max-sm:min-w-[calc(3rem*var(--ui-space-scale,1))] flex-1">
<Progress value={clampProgress(progressPercent)} className="h-1 bg-[color-mix(in_oklab,var(--foreground)_calc(8%*var(--contrast-wash-gain,1)),transparent)]" />
</div>
<div
diff --git a/studio/frontend/src/features/chat/projects-page.tsx b/studio/frontend/src/features/chat/projects-page.tsx
index 46f1b7565ce..b3d00e57dd7 100644
--- a/studio/frontend/src/features/chat/projects-page.tsx
+++ b/studio/frontend/src/features/chat/projects-page.tsx
@@ -646,7 +646,7 @@ export function ProjectsPage() {
}
return (
- <main className="mx-auto w-full max-w-5xl px-6 pb-10 pt-16 font-heading sm:px-10">
+ <main className="mx-auto w-full max-w-5xl 4xl:max-w-6xl px-6 pb-10 pt-16 max-sm:px-4 max-sm:pt-10 font-heading sm:px-10">
<GuidedTour {...tour.tourProps} />
{/* Global import file input */}
<input
diff --git a/studio/frontend/src/features/data-recipes/pages/data-recipes-page.tsx b/studio/frontend/src/features/data-recipes/pages/data-recipes-page.tsx
index 9499f493107..43a9a3f30a9 100644
--- a/studio/frontend/src/features/data-recipes/pages/data-recipes-page.tsx
+++ b/studio/frontend/src/features/data-recipes/pages/data-recipes-page.tsx
@@ -221,7 +221,7 @@ function LearningRecipeCards({
loadingTemplateId: string | null;
}): ReactElement {
return (
- <div className="grid w-full gap-4 sm:grid-cols-2 xl:grid-cols-3">
+ <div className="grid w-full gap-4 sm:grid-cols-2 xl:grid-cols-3 4xl:grid-cols-4">
{TEMPLATE_CARDS.map((template) => {
const learningRecipe = template.learningRecipeId
? LEARNING_RECIPE_BY_ID.get(template.learningRecipeId)
@@ -272,7 +272,7 @@ function LearningRecipeCards({
{template.description}
</p>
</div>
- <div className="flex items-center gap-1 overflow-hidden whitespace-nowrap">
+ <div className="flex items-center gap-1 overflow-hidden whitespace-nowrap max-xl:flex-wrap max-xl:gap-y-1">
{isLoading ? (
<Badge variant="outline">Loading...</Badge>
) : (
@@ -419,7 +419,7 @@ export function DataRecipesPage(): ReactElement {
return (
<div className="min-h-[calc(100dvh-var(--studio-titlebar-height,0px))] bg-background">
- <main className="mx-auto w-full max-w-7xl px-5 py-8 sm:px-9">
+ <main className="mx-auto w-full max-w-7xl 3xl:max-w-[calc(1440px*var(--ui-space-scale,1))] 4xl:max-w-[calc(1760px*var(--ui-space-scale,1))] px-5 py-8 max-sm:px-4 sm:px-9">
<GuidedTour {...tour.tourProps} />
<div className="flex items-center justify-between gap-4">
<div>
@@ -478,7 +478,7 @@ export function DataRecipesPage(): ReactElement {
workflows work.
</EmptyDescription>
</EmptyHeader>
- <EmptyContent className="max-w-6xl items-stretch">
+ <EmptyContent className="max-w-6xl 4xl:max-w-none items-stretch">
{/*<Button*/}
{/* type="button"*/}
{/* variant="secondary"*/}
diff --git a/studio/frontend/src/features/export/export-page.tsx b/studio/frontend/src/features/export/export-page.tsx
index 44aa6f604cd..334926ee261 100644
--- a/studio/frontend/src/features/export/export-page.tsx
+++ b/studio/frontend/src/features/export/export-page.tsx
@@ -871,7 +871,7 @@ export function ExportPage() {
return (
<div className="min-h-[calc(100dvh-var(--studio-titlebar-height,0px))] bg-background">
- <main className="mx-auto max-w-7xl px-5 py-8 sm:px-9">
+ <main className="mx-auto max-w-7xl 3xl:max-w-[calc(1440px*var(--ui-space-scale,1))] 4xl:max-w-[calc(1760px*var(--ui-space-scale,1))] px-5 py-8 max-sm:px-4 sm:px-9">
<GuidedTour {...tour.tourProps} />
<div className="mb-8 flex flex-col gap-0.5">
diff --git a/studio/frontend/src/features/hub/catalog/dot-tag.tsx b/studio/frontend/src/features/hub/catalog/dot-tag.tsx
index 5c2a0c8d1a8..00341b8674c 100644
--- a/studio/frontend/src/features/hub/catalog/dot-tag.tsx
+++ b/studio/frontend/src/features/hub/catalog/dot-tag.tsx
@@ -27,11 +27,14 @@ export function DotTag({
label,
className,
dotClassName,
+ labelClassName,
}: {
tone: DotTagTone;
label: string;
className?: string;
dotClassName?: string;
+ /** Wraps the label, e.g. to sr-only it and keep just the dot. */
+ labelClassName?: string;
}) {
return (
<span
@@ -48,7 +51,7 @@ export function DotTag({
dotClassName,
)}
/>
- {label}
+ {labelClassName ? <span className={labelClassName}>{label}</span> : label}
</span>
);
}
diff --git a/studio/frontend/src/features/hub/catalog/gguf-download-card.tsx b/studio/frontend/src/features/hub/catalog/gguf-download-card.tsx
index 2d903750971..5a93a5a210a 100644
--- a/studio/frontend/src/features/hub/catalog/gguf-download-card.tsx
+++ b/studio/frontend/src/features/hub/catalog/gguf-download-card.tsx
@@ -1024,7 +1024,7 @@ export function GgufDownloadCard({
The group sizes to its content (it still shrinks when the row
is tight) so the chevron follows the tags instead of stranding
itself at the far edge of a full-width trigger. */}
- <span className="flex min-w-0 items-center gap-2 overflow-hidden text-ui-12 text-muted-foreground">
+ <span className="flex min-w-0 items-center gap-2 overflow-hidden text-ui-12 text-muted-foreground max-[360px]:gap-1">
{selected ? (
<QuantBadge
quant={selectedLabel ?? selected.quant}
@@ -1037,7 +1037,13 @@ export function GgufDownloadCard({
</span>
)}
{selected?.downloaded && (
- <DotTag tone="success" label="On device" />
+ // Dot only on phones.
+ <DotTag
+ tone="success"
+ label="On device"
+ className="max-sm:border-0 max-sm:px-0"
+ labelClassName="max-sm:sr-only"
+ />
)}
{selected && !selected.downloaded && selected.partial && (
<Tooltip>
@@ -1058,7 +1064,8 @@ export function GgufDownloadCard({
</TooltipContent>
</Tooltip>
)}
- <DotTag tone="gguf" label="GGUF" />
+ {/* Size beats format tag on phones. */}
+ <DotTag tone="gguf" label="GGUF" className="max-sm:hidden" />
{selected &&
selectedDownloadSizeLabel &&
!selected.downloaded && (
diff --git a/studio/frontend/src/features/hub/catalog/models-header.tsx b/studio/frontend/src/features/hub/catalog/models-header.tsx
index 1c3da08cb7c..384160e3f24 100644
--- a/studio/frontend/src/features/hub/catalog/models-header.tsx
+++ b/studio/frontend/src/features/hub/catalog/models-header.tsx
@@ -70,7 +70,7 @@ export function ModelsHeader({
<div
data-tour="hub-device"
- className="flex min-w-0 flex-wrap items-center justify-end gap-1.5 sm:flex-1"
+ className="flex min-w-0 flex-wrap items-center justify-end gap-1.5 max-sm:justify-start sm:flex-1"
>
<HfTokenIndicator onOpenSettings={() => openSettings("general")} />
<TransportToggle />
diff --git a/studio/frontend/src/features/hub/hub.css b/studio/frontend/src/features/hub/hub.css
index 4f90be26da0..c7623bc3e1e 100644
--- a/studio/frontend/src/features/hub/hub.css
+++ b/studio/frontend/src/features/hub/hub.css
@@ -62,6 +62,22 @@
--hub-readme-measure: 1400px;
}
+ /* Wrap long tokens in readmes on small screens instead of clipping. */
+ @media (max-width: 1023px) {
+ .hub-readme-prose :is(p, li, td, th, code) {
+ overflow-wrap: break-word;
+ }
+ }
+
+ /* Wider column on 4K / ultrawide. */
+ @media (min-width: 2560px) {
+ .hub-page {
+ --hub-measure: clamp(1100px, 90%, 2200px);
+ --hub-measure-compact: clamp(860px, 90%, 1440px);
+ --hub-readme-measure: 1600px;
+ }
+ }
+
/* Filled-control surface — Hub search, Hub filter triggers, picker
search bars. Borderless soft fill matching the .hub-tab-toggle pills:
- Resting: 5% bg, no border
diff --git a/studio/frontend/src/features/images/images-page.tsx b/studio/frontend/src/features/images/images-page.tsx
index 52206dd8330..4cacb798f20 100644
--- a/studio/frontend/src/features/images/images-page.tsx
+++ b/studio/frontend/src/features/images/images-page.tsx
@@ -738,7 +738,7 @@ function AdvancedSelect({
{badge}
</span>
<Select value={value} onValueChange={onValueChange}>
- <SelectTrigger aria-label={label} className="h-8 w-[calc(160px*var(--ui-space-scale,1))] text-xs">
+ <SelectTrigger aria-label={label} className="h-8 w-[calc(160px*var(--ui-space-scale,1))] max-sm:w-[min(calc(160px*var(--ui-space-scale,1)),50vw)] text-xs">
<SelectValue />
</SelectTrigger>
<SelectContent>
@@ -4160,7 +4160,7 @@ export function ImagesPage({
{active && <GuidedTour {...tour.tourProps} />}
{/* Keep the tabs centered over the preview at every width: the model rail holds at 408px when
space permits and shrinks only to preserve the controls. */}
- <div className="pointer-events-none relative z-40 grid h-[calc(48px*var(--ui-space-scale,1))] shrink-0 grid-cols-[minmax(0,calc(408px*var(--ui-space-scale,1)))_minmax(13rem,1fr)]">
+ <div className="pointer-events-none relative z-40 grid h-[calc(48px*var(--ui-space-scale,1))] shrink-0 grid-cols-[minmax(0,calc(408px*var(--ui-space-scale,1)))_minmax(13rem,1fr)] @max-[30rem]:grid-cols-[minmax(0,1fr)_auto]">
<div
className={cn(
"pointer-events-none flex h-full min-w-0 items-start overflow-hidden @[50rem]:border-r @[50rem]:border-border/60",
@@ -4228,7 +4228,7 @@ export function ImagesPage({
value={pageMode}
onValueChange={(v) => setPageMode(v as "create" | "train")}
fit={true}
- className="h-[calc(34px*var(--ui-space-scale,1))] [&>button]:h-[calc(34px*var(--ui-space-scale,1))] [&>button]:px-3 @[68rem]:[&>button]:px-11"
+ className="h-[calc(34px*var(--ui-space-scale,1))] [&>button]:h-[calc(34px*var(--ui-space-scale,1))] [&>button]:px-3 @[68rem]:[&>button]:px-11 @max-[30rem]:[&>button]:px-2.5 @max-[30rem]:[&>button>span]:sr-only"
tabs={[
{ value: "create", label: "Create", icon: <HugeiconsIcon icon={SparklesIcon} className="size-3.5" /> },
{ value: "train", label: "Train", icon: <HugeiconsIcon icon={TestTubeOutlineIcon} className="size-3.5" /> },
@@ -4279,7 +4279,7 @@ export function ImagesPage({
ref={attachSettingsScroll}
onScroll={onSettingsScroll}
className={cn(
- "hover-scrollbar panel-scroll-fade-action flex min-h-0 flex-1 flex-col gap-4 px-10 pt-9 pb-6 @[50rem]:overflow-y-auto",
+ "hover-scrollbar panel-scroll-fade-action flex min-h-0 flex-1 flex-col gap-4 px-10 max-sm:px-5 pt-9 pb-6 @[50rem]:overflow-y-auto",
settingsFadeClass,
)}
>
@@ -5162,7 +5162,7 @@ export function ImagesPage({
<div
ref={stripRef}
// The rule spans the pane; only the thumbnail contents receive the 40px gutter.
- className="hover-scrollbar flex shrink-0 gap-2 overflow-x-auto border-t border-[color-mix(in_oklab,var(--foreground)_calc(10%*var(--contrast-edge-gain,1)),transparent)] px-10 py-3"
+ className="hover-scrollbar flex shrink-0 gap-2 overflow-x-auto border-t border-[color-mix(in_oklab,var(--foreground)_calc(10%*var(--contrast-edge-gain,1)),transparent)] px-10 max-sm:px-5 py-3"
onScroll={(e) => {
// Near the right edge: pull the next older page (infinite scroll).
const el = e.currentTarget;
diff --git a/studio/frontend/src/features/images/train/dataset-labeling-grid.tsx b/studio/frontend/src/features/images/train/dataset-labeling-grid.tsx
index 7efb3bfe845..d8ac445c20d 100644
--- a/studio/frontend/src/features/images/train/dataset-labeling-grid.tsx
+++ b/studio/frontend/src/features/images/train/dataset-labeling-grid.tsx
@@ -132,7 +132,7 @@ function LabelTile({
onClick={remove}
disabled={deleting}
aria-label="Remove image"
- className="absolute right-1.5 top-1.5 flex size-6 items-center justify-center rounded-full bg-background/85 text-muted-foreground opacity-0 shadow-sm backdrop-blur-sm transition-opacity hover:bg-background hover:text-destructive focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-hover/tile:opacity-100"
+ className="absolute right-1.5 top-1.5 flex size-6 items-center justify-center rounded-full bg-background/85 text-muted-foreground opacity-0 any-pointer-coarse:opacity-100 shadow-sm backdrop-blur-sm transition-opacity hover:bg-background hover:text-destructive focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-hover/tile:opacity-100"
>
{deleting ? (
<Spinner className="size-3" />
diff --git a/studio/frontend/src/features/images/train/dataset-showcase.tsx b/studio/frontend/src/features/images/train/dataset-showcase.tsx
index 45d6bcb71c2..f997d81b1e9 100644
--- a/studio/frontend/src/features/images/train/dataset-showcase.tsx
+++ b/studio/frontend/src/features/images/train/dataset-showcase.tsx
@@ -106,7 +106,7 @@ function ShowcaseTile({
onClick={remove}
disabled={deleting}
aria-label={`Remove ${filename}`}
- className="absolute right-0.5 top-0.5 flex size-5 items-center justify-center rounded-full bg-background/90 text-muted-foreground opacity-0 shadow-sm ring-1 ring-border backdrop-blur-sm transition-opacity hover:text-destructive focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-hover/thumb:opacity-100"
+ className="absolute right-0.5 top-0.5 flex size-5 items-center justify-center rounded-full bg-background/90 text-muted-foreground opacity-0 any-pointer-coarse:opacity-100 shadow-sm ring-1 ring-border backdrop-blur-sm transition-opacity hover:text-destructive focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-hover/thumb:opacity-100"
>
{deleting ? (
<Spinner className="size-2.5" />
diff --git a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx b/studio/frontend/src/features/images/train/diffusion-train-panel.tsx
index fdd78b76f5a..db8044e06b9 100644
--- a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx
+++ b/studio/frontend/src/features/images/train/diffusion-train-panel.tsx
@@ -1521,7 +1521,7 @@ export function DiffusionTrainPanel({
return (
<div className="flex min-h-0 w-full min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden pr-5 sm:pr-8 @[50rem]:flex-row @[50rem]:overflow-hidden">
{/* Left: configure. The 408px rail and container breakpoint match Create and the shared header. */}
- <div className="flex w-full min-w-0 shrink-0 flex-col border-b border-border/60 pl-10 @[50rem]:w-[calc(408px*var(--ui-space-scale,1))] @[50rem]:overflow-hidden @[50rem]:border-r @[50rem]:border-b-0">
+ <div className="flex w-full min-w-0 shrink-0 flex-col border-b border-border/60 pl-10 max-sm:pl-5 @[50rem]:w-[calc(408px*var(--ui-space-scale,1))] @[50rem]:overflow-hidden @[50rem]:border-r @[50rem]:border-b-0">
{/* Keep the former row-level top inset inside the pane so the divider reaches the header. */}
<div
ref={attachSettingsScroll}
diff --git a/studio/frontend/src/features/profile/components/profile-personalization-panel.tsx b/studio/frontend/src/features/profile/components/profile-personalization-panel.tsx
index e0ae9cb4717..67efa254f9d 100644
--- a/studio/frontend/src/features/profile/components/profile-personalization-panel.tsx
+++ b/studio/frontend/src/features/profile/components/profile-personalization-panel.tsx
@@ -229,7 +229,7 @@ export function ProfilePersonalizationPanel() {
size="lg"
className="size-[calc(128px*var(--ui-space-scale,1))] text-[calc(3.2rem*var(--ui-font-scale,1))]"
/>
- <span className="absolute inset-0 flex items-center justify-center rounded-full bg-black/45 opacity-0 transition-opacity group-hover:opacity-100">
+ <span className="absolute inset-0 flex items-center justify-center rounded-full bg-black/45 opacity-0 any-pointer-coarse:opacity-100 transition-opacity group-hover:opacity-100">
<HugeiconsIcon
icon={Image01Icon}
className="size-8 text-white"
@@ -319,7 +319,7 @@ export function ProfilePersonalizationPanel() {
<span className="text-ui-11 font-medium uppercase tracking-wide text-muted-foreground">
{t("settings.profile.chooseSloth")}
</span>
- <div className="grid grid-cols-7 gap-2">
+ <div className="grid grid-cols-7 gap-2 max-[400px]:grid-cols-6">
{SLOTH_AVATARS.map((path) => {
const url = publicAssetUrl(path);
const selected = shownAvatar === url;
diff --git a/studio/frontend/src/features/recipe-studio/components/controls/viewport-controls.tsx b/studio/frontend/src/features/recipe-studio/components/controls/viewport-controls.tsx
index e777826315a..4fda696a8fe 100644
--- a/studio/frontend/src/features/recipe-studio/components/controls/viewport-controls.tsx
+++ b/studio/frontend/src/features/recipe-studio/components/controls/viewport-controls.tsx
@@ -45,8 +45,12 @@ export function ViewportControls({
fitView(buildFitViewOptions(getNodes()));
}, [fitView, getNodes]);
+ // Stack vertically on narrow canvases to clear the Run / Check bar.
return (
- <Panel position="bottom-left" className="m-3 flex items-center gap-2">
+ <Panel
+ position="bottom-left"
+ className="m-3 flex items-center gap-2 @max-[48rem]/canvas:flex-col-reverse"
+ >
<Button
type="button"
variant="ghost"
diff --git a/studio/frontend/src/features/recipe-studio/components/executions/execution-sidebar.tsx b/studio/frontend/src/features/recipe-studio/components/executions/execution-sidebar.tsx
index f613c775b3d..fd74287d68c 100644
--- a/studio/frontend/src/features/recipe-studio/components/executions/execution-sidebar.tsx
+++ b/studio/frontend/src/features/recipe-studio/components/executions/execution-sidebar.tsx
@@ -29,7 +29,7 @@ export function ExecutionSidebar({
onSelectExecution,
}: ExecutionSidebarProps): ReactElement {
return (
- <aside className="w-72 shrink-0 border-r border-border/60 bg-card/20">
+ <aside className="w-72 shrink-0 overflow-y-auto border-r border-border/60 bg-card/20 max-md:max-h-48 max-md:w-full max-md:border-r-0 max-md:border-b">
<div className="flex items-center justify-between border-border/60 px-3 py-2">
<p className="text-xs font-semibold uppercase text-muted-foreground">
Runs
diff --git a/studio/frontend/src/features/recipe-studio/components/executions/executions-view.tsx b/studio/frontend/src/features/recipe-studio/components/executions/executions-view.tsx
index 544b812575b..7a193be583b 100644
--- a/studio/frontend/src/features/recipe-studio/components/executions/executions-view.tsx
+++ b/studio/frontend/src/features/recipe-studio/components/executions/executions-view.tsx
@@ -182,7 +182,7 @@ export function ExecutionsView({
const value = formatCellValue(rawValue);
const isWide = wideColumns.has(name);
return (
- <div className={cn(isWide ? "min-w-[calc(48rem*var(--ui-space-scale,1))]" : "min-w-[calc(12rem*var(--ui-space-scale,1))]")}>
+ <div className={cn(isWide ? "min-w-[calc(48rem*var(--ui-space-scale,1))] max-md:min-w-[calc(20rem*var(--ui-space-scale,1))]" : "min-w-[calc(12rem*var(--ui-space-scale,1))]")}>
<p className="whitespace-pre-wrap break-all">{value}</p>
</div>
);
@@ -393,7 +393,7 @@ export function ExecutionsView({
}, [terminalLines.length]);
return (
- <div className="flex h-full min-h-0">
+ <div className="flex h-full min-h-0 max-md:w-full max-md:flex-col">
<ExecutionSidebar
executions={executions}
selectedExecutionId={selectedExecutionId}
diff --git a/studio/frontend/src/features/recipe-studio/components/recipe-studio-header.tsx b/studio/frontend/src/features/recipe-studio/components/recipe-studio-header.tsx
index 319dbbcaa8c..56ba322df4a 100644
--- a/studio/frontend/src/features/recipe-studio/components/recipe-studio-header.tsx
+++ b/studio/frontend/src/features/recipe-studio/components/recipe-studio-header.tsx
@@ -85,7 +85,7 @@ export function RecipeStudioHeader({
}
return (
- <div className="grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-4 border-b px-4 py-3">
+ <div className="grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-4 border-b px-4 py-3 max-sm:grid-cols-[minmax(0,1fr)_auto] max-sm:gap-x-2 max-sm:gap-y-2.5 max-sm:px-3">
<div className="flex min-w-0 items-center gap-3">
<div
className="flex size-8 shrink-0 items-center justify-center rounded-lg corner-squircle border border-border/70 bg-muted/20"
@@ -129,7 +129,7 @@ export function RecipeStudioHeader({
</span>
</div>
</div>
- <div data-tour="recipe-views" className="justify-self-center">
+ <div data-tour="recipe-views" className="justify-self-center max-sm:order-last max-sm:col-span-2">
<Tabs value={activeView} onValueChange={handleViewValueChange}>
<TabsList>
{supportsEasyMode && (
diff --git a/studio/frontend/src/features/recipe-studio/recipe-studio-page.tsx b/studio/frontend/src/features/recipe-studio/recipe-studio-page.tsx
index 7226129e004..ffe22c8aa95 100644
--- a/studio/frontend/src/features/recipe-studio/recipe-studio-page.tsx
+++ b/studio/frontend/src/features/recipe-studio/recipe-studio-page.tsx
@@ -679,7 +679,7 @@ export function RecipeStudioPage({
nodesConnectable={canvasInteractive}
elementsSelectable={canvasInteractive}
fitView={false}
- className="h-full w-full rounded-t-none"
+ className="@container/canvas h-full w-full rounded-t-none"
>
<LayoutControls
direction={layoutDirection}
diff --git a/studio/frontend/src/features/settings/settings-dialog.tsx b/studio/frontend/src/features/settings/settings-dialog.tsx
index c5d66f215b7..139749efd74 100644
--- a/studio/frontend/src/features/settings/settings-dialog.tsx
+++ b/studio/frontend/src/features/settings/settings-dialog.tsx
@@ -479,6 +479,8 @@ export function SettingsDialog() {
// 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",
+ // Larger surface on 4K / ultrawide.
+ "4xl:w-[min(1120px,calc(100vw-2rem))] 4xl:!max-w-[min(1120px,calc(100vw-2rem))] 4xl:h-[min(940px,calc(100dvh-var(--studio-window-chrome-top,0px)-2rem))]",
)}
>
<DialogTitle className="sr-only">
@@ -494,7 +496,13 @@ export function SettingsDialog() {
>
{/* Match the app shell: tabs on the sidebar fill, content on the
page fill, so both track the active palette. */}
- <aside className="font-heading flex w-[min(calc(248px*var(--ui-space-scale,1)),50%)] shrink-0 flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground p-2 dark:border-r-0 group-data-stacked/settings:w-full group-data-stacked/settings:border-r-0 group-data-stacked/settings:border-b group-data-stacked/settings:border-sidebar-border">
+ <aside
+ className={cn(
+ "font-heading flex w-[min(calc(248px*var(--ui-space-scale,1)),50%)] shrink-0 flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground p-2 dark:border-r-0 group-data-stacked/settings:w-full group-data-stacked/settings:border-r-0 group-data-stacked/settings:border-b group-data-stacked/settings:border-sidebar-border",
+ // Narrower rail on tablets, unless the scale has stacked it.
+ !stacked && "md:max-lg:w-[min(calc(208px*var(--ui-space-scale,1)),50%)]",
+ )}
+ >
<div className="relative mx-1 mt-3 mb-2 shrink-0 group-data-stacked/settings:hidden">
<HugeiconsIcon
icon={Search01Icon}
diff --git a/studio/frontend/src/features/settings/tabs/debugging-tab.tsx b/studio/frontend/src/features/settings/tabs/debugging-tab.tsx
index 6d0ee11d449..dc7d1ca1e7a 100644
--- a/studio/frontend/src/features/settings/tabs/debugging-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/debugging-tab.tsx
@@ -496,14 +496,14 @@ export function DebuggingTab() {
value={source.id}
className="font-mono text-ui-12"
>
- <span className="flex items-center gap-2">
- <span>{source.label}</span>
+ <span className="flex min-w-0 items-center gap-2">
+ <span className="min-w-0 truncate">{source.label}</span>
{source.isCurrent ? (
- <span className="rounded-full bg-primary/10 px-1.5 py-px font-sans text-ui-10 font-medium text-primary">
+ <span className="shrink-0 rounded-full bg-primary/10 px-1.5 py-px font-sans text-ui-10 font-medium text-primary">
{t("settings.debugging.currentSession")}
</span>
) : null}
- <span className="font-sans text-ui-10 text-muted-foreground tabular-nums">
+ <span className="shrink-0 font-sans text-ui-10 text-muted-foreground tabular-nums">
{formatBytes(source.sizeBytes)}
</span>
</span>
diff --git a/studio/frontend/src/features/studio/history-card-grid.tsx b/studio/frontend/src/features/studio/history-card-grid.tsx
index 0756af895b2..b3a818b3d79 100644
--- a/studio/frontend/src/features/studio/history-card-grid.tsx
+++ b/studio/frontend/src/features/studio/history-card-grid.tsx
@@ -444,7 +444,7 @@ export function HistoryCardGrid({
return (
<div className="contents" aria-label={t("studio.history.title")}>
- <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3">
+ <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3 4xl:grid-cols-4">
{runs.map((run) => {
const wasContinued =
run.resumed_later || wasContinuedInVisibleRuns(run, runs);
@@ -664,7 +664,7 @@ export function HistoryCardGrid({
</div>
)}
{loading && runs.length === 0 && (
- <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3">
+ <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3 4xl:grid-cols-4">
{["first", "second", "third"].map((skeletonId) => (
<div
key={`skeleton-${skeletonId}`}
diff --git a/studio/frontend/src/features/studio/sections/charts-section.tsx b/studio/frontend/src/features/studio/sections/charts-section.tsx
index 87b02045440..4e8e04bab89 100644
--- a/studio/frontend/src/features/studio/sections/charts-section.tsx
+++ b/studio/frontend/src/features/studio/sections/charts-section.tsx
@@ -76,7 +76,7 @@ export function ChartsSection({
{SKELETON_KEYS.map((key) => (
<div
key={key}
- className="h-[calc(280px*var(--ui-space-scale,1))] rounded-xl border bg-muted/30 animate-pulse"
+ className="h-[calc(280px*var(--ui-space-scale,1))] 4xl:h-[calc(360px*var(--ui-space-scale,1))] rounded-xl border bg-muted/30 animate-pulse"
/>
))}
</div>
diff --git a/studio/frontend/src/features/studio/sections/charts/utils.ts b/studio/frontend/src/features/studio/sections/charts/utils.ts
index d743c2f7973..17d8f168631 100644
--- a/studio/frontend/src/features/studio/sections/charts/utils.ts
+++ b/studio/frontend/src/features/studio/sections/charts/utils.ts
@@ -5,7 +5,7 @@ import type { LossHistoryItem, OutlierMode, SmoothedLossItem } from "./types";
export const CHART_SYNC_ID = "train-metrics-sync";
export const MAX_RENDER_POINTS = 800;
-export const CHART_CONTAINER_CLASS = "h-[calc(220px*var(--ui-space-scale,1))] w-full";
+export const CHART_CONTAINER_CLASS = "h-[calc(220px*var(--ui-space-scale,1))] 4xl:h-[calc(300px*var(--ui-space-scale,1))] w-full";
export const DEFAULT_CHART_MARGIN = { top: 4, right: 8, bottom: 0, left: 4 };
export const DEFAULT_Y_AXIS_WIDTH = 45;
const TRAILING_ZEROES_RE = /\.?0+$/;
diff --git a/studio/frontend/src/features/studio/sections/dataset-preview-dialog-mapping.tsx b/studio/frontend/src/features/studio/sections/dataset-preview-dialog-mapping.tsx
index 469c12b9296..ac7e0b5f067 100644
--- a/studio/frontend/src/features/studio/sections/dataset-preview-dialog-mapping.tsx
+++ b/studio/frontend/src/features/studio/sections/dataset-preview-dialog-mapping.tsx
@@ -49,7 +49,7 @@ export function HeaderRolePicker({
value={currentRole ?? "_none"}
onValueChange={(v) => onRoleChange(v === "_none" ? undefined : v)}
>
- <SelectTrigger className="h-6 w-[calc(90px*var(--ui-space-scale,1))] text-ui-10 px-2 py-0 border-dashed cursor-pointer">
+ <SelectTrigger className="h-6 w-[calc(90px*var(--ui-space-scale,1))] max-md:h-8 max-md:w-[calc(104px*var(--ui-space-scale,1))] text-ui-10 px-2 py-0 border-dashed cursor-pointer">
<SelectValue placeholder="Role..." />
</SelectTrigger>
<SelectContent>
diff --git a/studio/frontend/src/features/studio/sections/dataset-preview-dialog.tsx b/studio/frontend/src/features/studio/sections/dataset-preview-dialog.tsx
index 0d425fb9ebc..40161e379ef 100644
--- a/studio/frontend/src/features/studio/sections/dataset-preview-dialog.tsx
+++ b/studio/frontend/src/features/studio/sections/dataset-preview-dialog.tsx
@@ -557,11 +557,11 @@ export function DatasetPreviewDialog({
return (
<Dialog open={open} onOpenChange={handleOpenChange}>
<DialogContent
- className="sm:max-w-5xl w-[90vw] max-h-[88dvh] flex flex-col gap-0 p-0 overflow-hidden rounded-3xl corner-squircle"
+ className="sm:max-w-5xl w-[90vw] max-sm:w-[calc(100vw-1rem)] max-sm:rounded-2xl max-h-[88dvh] flex flex-col gap-0 p-0 overflow-hidden rounded-3xl corner-squircle"
showCloseButton={true}
>
{/* Header */}
- <DialogHeader className="px-6 pt-5 pb-4 shrink-0">
+ <DialogHeader className="px-6 max-sm:px-4 pt-5 pb-4 shrink-0">
<div className="flex items-center gap-3 pr-10">
<div className="rounded-xl corner-squircle p-2 ring-1 ring-indigo-200 bg-indigo-50 text-indigo-600 dark:ring-indigo-800 dark:bg-indigo-950 dark:text-indigo-400 shrink-0">
<HugeiconsIcon icon={Database02Icon} className="size-4" />
diff --git a/studio/frontend/src/features/studio/sections/training-hyperparameters-section.tsx b/studio/frontend/src/features/studio/sections/training-hyperparameters-section.tsx
index b3a4c96e6b1..418063c6ba5 100644
--- a/studio/frontend/src/features/studio/sections/training-hyperparameters-section.tsx
+++ b/studio/frontend/src/features/studio/sections/training-hyperparameters-section.tsx
@@ -141,7 +141,7 @@ export function TrainingHyperparametersSection({
value={tab}
options={tabs}
ariaLabel={t("studio.params.trainingHyperparameters")}
- className="w-full max-w-[calc(520px*var(--ui-space-scale,1))] [&>button]:px-6"
+ className="w-full max-w-[calc(520px*var(--ui-space-scale,1))] [&>button]:px-6 max-sm:[&>button]:px-2.5"
/>
</div>
diff --git a/studio/frontend/src/features/studio/studio-page.tsx b/studio/frontend/src/features/studio/studio-page.tsx
index d87892c44a3..49821d0c271 100644
--- a/studio/frontend/src/features/studio/studio-page.tsx
+++ b/studio/frontend/src/features/studio/studio-page.tsx
@@ -187,7 +187,7 @@ export function StudioPage(): ReactElement {
onValueChange={(value) => handleTabChange(value as TrainSubTab)}
className="contents"
>
- <div className="mx-auto flex w-full max-w-[calc(1180px*var(--ui-space-scale,1))] flex-col gap-7 px-5 pb-20 pt-8 sm:px-9 sm:pt-10">
+ <div className="mx-auto flex w-full max-w-[calc(1180px*var(--ui-space-scale,1))] 3xl:max-w-[calc(1440px*var(--ui-space-scale,1))] 4xl:max-w-[calc(1760px*var(--ui-space-scale,1))] flex-col gap-7 px-5 pb-20 pt-8 max-sm:px-4 sm:px-9 sm:pt-10">
<header className="font-heading flex flex-col gap-5">
<div className="flex flex-col gap-0.5">
<h1 className="page-title-halo text-ui-30 font-semibold leading-[1.04] tracking-[-0.028em] text-foreground sm:text-ui-34">
diff --git a/studio/frontend/src/features/studio/training-start-overlay.tsx b/studio/frontend/src/features/studio/training-start-overlay.tsx
index f26e061839b..b9989168129 100644
--- a/studio/frontend/src/features/studio/training-start-overlay.tsx
+++ b/studio/frontend/src/features/studio/training-start-overlay.tsx
@@ -382,7 +382,7 @@ export function TrainingStartOverlay({
return (
<div className="pointer-events-none absolute inset-0 z-30 flex flex-col items-center rounded-2xl bg-background/45 backdrop-blur-[1px]">
<div className="pointer-events-auto relative my-auto flex w-[calc(860px*var(--ui-space-scale,1))] max-w-[calc(100%-2rem)] flex-col items-center">
- <MascotImg src="unsloth-gem.png" className="size-24 object-contain" />
+ <MascotImg src="unsloth-gem.png" className="size-24 object-contain max-sm:size-16" />
<div className="relative w-full">
<AlertDialog open={cancelDialogOpen} onOpenChange={setCancelDialogOpen}>
<Button
@@ -427,7 +427,7 @@ export function TrainingStartOverlay({
</AlertDialogContent>
</AlertDialog>
<Terminal
- className="w-full min-h-[calc(390px*var(--ui-space-scale,1))] rounded-2xl border-0 px-7 py-6 text-left"
+ className="w-full min-h-[calc(390px*var(--ui-space-scale,1))] rounded-2xl border-0 px-7 py-6 text-left max-sm:min-h-[calc(260px*var(--ui-space-scale,1))] max-sm:px-4 max-sm:py-4"
startOnView={false}
instant={alreadyAnimated}
>
diff --git a/studio/frontend/src/features/video/video-page.tsx b/studio/frontend/src/features/video/video-page.tsx
index a80ed262618..7b14bcefe8b 100644
--- a/studio/frontend/src/features/video/video-page.tsx
+++ b/studio/frontend/src/features/video/video-page.tsx
@@ -117,6 +117,7 @@ import { useNavigate, useSearch } from "@tanstack/react-router";
import { useStagedDownload } from "@/features/hub/download-manager";
import { isTauri } from "@/lib/api-base";
import { cn } from "@/lib/utils";
+import { useIsMobileShell } from "@/hooks/use-mobile";
import { resolveDiffusionGgufFilename } from "@/lib/diffusion-gguf-filename";
import { createPickGuard, runGgufRepoPick } from "@/lib/diffusion-gguf-pick";
import { diffusionRoutePick } from "@/lib/diffusion-route-pick";
@@ -596,7 +597,7 @@ function AdvancedSelect({
{badge}
</span>
<Select value={value} onValueChange={onValueChange}>
- <SelectTrigger className="h-8 w-[calc(160px*var(--ui-space-scale,1))] text-xs">
+ <SelectTrigger className="h-8 w-[calc(160px*var(--ui-space-scale,1))] max-sm:w-[min(calc(160px*var(--ui-space-scale,1)),50vw)] text-xs">
<SelectValue />
</SelectTrigger>
<SelectContent>
@@ -887,6 +888,8 @@ function VideoGenerator({
onInitialReady?: () => void;
}) {
const initialReadySent = useRef(false);
+ // Clear the floating sidebar toggle on mobile.
+ const isMobileShell = useIsMobileShell();
const hostClass = useHostClass();
const denseQuantSchemes = useDenseQuantSchemes();
const videoModels = useVideoModels(hostClass, denseQuantSchemes);
@@ -3452,7 +3455,12 @@ function VideoGenerator({
</Dialog>
{/* Top: the model selector, clear of the sidebar and level with the controls column. Load
progress shows in a toast. */}
- <div className="@container pointer-events-none relative z-40 flex h-[calc(48px*var(--ui-space-scale,1))] shrink-0 items-start justify-between pl-[var(--studio-media-header-left-inset,1.5rem)] pr-2 pt-[var(--studio-chat-header-padding-top,11px)]">
+ <div
+ className={cn(
+ "@container pointer-events-none relative z-40 flex h-[calc(48px*var(--ui-space-scale,1))] shrink-0 items-start justify-between pr-2 pt-[var(--studio-chat-header-padding-top,11px)]",
+ isMobileShell ? "pl-12" : "pl-[var(--studio-media-header-left-inset,1.5rem)]",
+ )}
+ >
{/* min-w-0: without it a long resident model name pushes the Images link off a phone screen. */}
<div className="pointer-events-auto flex min-w-0 items-center gap-3">
<ModelSelector
@@ -3506,7 +3514,13 @@ function VideoGenerator({
</div>
<div className="pointer-events-auto flex shrink-0 items-center gap-2">
{/* Images is a separate page, so it sits out here, not in this page's controls. */}
- <MediaPageLink to="/images" label="Images" icon={Image03Icon} />
+ <MediaPageLink
+ to="/images"
+ label="Images"
+ icon={Image03Icon}
+ labelClassName="@max-[30rem]:hidden"
+ arrowClassName="@max-[30rem]:hidden"
+ />
</div>
</div>
@@ -3514,18 +3528,18 @@ function VideoGenerator({
pages' content starts at the same 40px. */}
{/* 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">
+ <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 max-sm:pl-0 max-sm:pr-0 sm:pr-8 lg:flex-row lg:overflow-hidden">
{/* Widened by the pl-8 so the controls keep their old width. */}
<div
data-tour="video-settings"
- className="flex w-full shrink-0 flex-col border-b border-border/60 pl-8 md:w-[min(calc(400px*var(--ui-space-scale,1)),calc(100%-13rem))] md:overflow-hidden md:border-r md:border-b-0"
+ className="flex w-full shrink-0 flex-col border-b border-border/60 pl-8 max-sm:pl-5 lg:w-[min(calc(400px*var(--ui-space-scale,1)),calc(100%-13rem))] lg:overflow-hidden lg:border-r lg:border-b-0"
>
{/* pl-0.5 keeps focus rings off the scroll container's edge. */}
<div
ref={attachSettingsScroll}
onScroll={onSettingsScroll}
className={cn(
- "hover-scrollbar panel-scroll-fade-action flex min-h-0 flex-1 flex-col gap-4 pb-6 pl-0.5 pr-7 md:overflow-y-auto",
+ "hover-scrollbar panel-scroll-fade-action flex min-h-0 flex-1 flex-col gap-4 pb-6 pl-0.5 pr-7 max-sm:pr-5 lg:overflow-y-auto",
settingsFadeClass,
)}
>
@@ -4065,7 +4079,7 @@ function VideoGenerator({
<div
data-tour="video-preview"
- className="relative flex min-h-[60dvh] min-w-0 flex-1 flex-col overflow-hidden pl-2 md:min-h-0"
+ className="relative flex min-h-[60dvh] min-w-0 flex-1 flex-col overflow-hidden pl-2 lg:min-h-0"
>
<div className="hover-scrollbar relative flex flex-1 items-center justify-center overflow-auto p-6">
{selected && selectedSrc ? (
diff --git a/studio/frontend/src/hooks/use-mobile.ts b/studio/frontend/src/hooks/use-mobile.ts
index 74e352903b4..c6904e35775 100644
--- a/studio/frontend/src/hooks/use-mobile.ts
+++ b/studio/frontend/src/hooks/use-mobile.ts
@@ -56,3 +56,22 @@ export function useIsCoarsePointer(): boolean {
export function useIsMobileShell(): boolean {
return useIsMobile() && !isTauri;
}
+
+const COMPACT_QUERY = "(max-width: 1023px)";
+
+function getCompactSnapshot(): boolean {
+ if (typeof window === "undefined") return false;
+ return window.matchMedia(COMPACT_QUERY).matches;
+}
+
+function subscribeCompact(callback: () => void): () => void {
+ if (typeof window === "undefined") return () => {};
+ const mql = window.matchMedia(COMPACT_QUERY);
+ mql.addEventListener("change", callback);
+ return () => mql.removeEventListener("change", callback);
+}
+
+/** Below lg: too narrow to dock a side panel, so panels overlay instead. */
+export function useIsCompact(): boolean {
+ return useSyncExternalStore(subscribeCompact, getCompactSnapshot, () => false);
+}
diff --git a/studio/frontend/src/hooks/use-sidebar-pin.ts b/studio/frontend/src/hooks/use-sidebar-pin.ts
index 71c780d9a41..c315230126a 100644
--- a/studio/frontend/src/hooks/use-sidebar-pin.ts
+++ b/studio/frontend/src/hooks/use-sidebar-pin.ts
@@ -4,19 +4,29 @@
import { useCallback, useSyncExternalStore } from "react";
const PINNED_KEY = "sidebar_pinned";
+const WIDE_QUERY = "(min-width: 1024px)";
-function loadPinned(): boolean {
- if (typeof window === "undefined") return true;
+function readStored(): boolean | null {
try {
const raw = window.localStorage.getItem(PINNED_KEY);
- if (raw === null) return true;
- return raw === "true";
+ return raw === null ? null : raw === "true";
} catch {
- return true;
+ return null;
}
}
+function loadPinned(): boolean {
+ if (typeof window === "undefined") return true;
+ // Default to unpinned below lg, also when storage is unavailable.
+ return readStored() ?? window.matchMedia(WIDE_QUERY).matches;
+}
+
let pinnedValue = loadPinned();
+// Set once the user toggles, so a width change never overrides it.
+let chosen = false;
+// A tour override: shown, but never persisted or counted as a choice.
+let held = false;
+let beforeHold = pinnedValue;
const listeners = new Set<() => void>();
function subscribe(cb: () => void) {
@@ -26,18 +36,33 @@ function subscribe(cb: () => void) {
}
const onStorage = (e: StorageEvent) => {
if (e.key === PINNED_KEY || e.key === null) {
- pinnedValue = loadPinned();
+ // Another tab set or cleared it (Reset all local preferences), so follow what is stored.
+ chosen = readStored() !== null;
+ // During a tour hold, stay open and apply it on release.
+ if (held) beforeHold = loadPinned();
+ else pinnedValue = loadPinned();
cb();
}
};
+ // Re-derive the width default across lg unless the user has chosen.
+ const wide = window.matchMedia(WIDE_QUERY);
+ const onWidth = () => {
+ if (chosen || held) return;
+ pinnedValue = loadPinned();
+ cb();
+ };
window.addEventListener("storage", onStorage);
+ wide.addEventListener("change", onWidth);
return () => {
listeners.delete(cb);
window.removeEventListener("storage", onStorage);
+ wide.removeEventListener("change", onWidth);
};
}
function setPinnedGlobal(next: boolean) {
+ chosen = true;
+ held = false;
pinnedValue = next;
try {
window.localStorage.setItem(PINNED_KEY, String(next));
@@ -45,6 +70,22 @@ function setPinnedGlobal(next: boolean) {
listeners.forEach((cb) => cb());
}
+/** Pin for a tour without touching the stored preference. */
+export function holdSidebarPinned() {
+ if (!held) beforeHold = pinnedValue;
+ held = true;
+ pinnedValue = true;
+ listeners.forEach((cb) => cb());
+}
+
+/** End the hold: the user's choice if any, else the default for the current width. */
+export function releaseSidebarPinned() {
+ if (!held) return;
+ held = false;
+ pinnedValue = chosen ? beforeHold : loadPinned();
+ listeners.forEach((cb) => cb());
+}
+
export function useSidebarPin() {
const pinned = useSyncExternalStore(
subscribe,
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index 81f9900c391..b228d14f471 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -869,6 +869,9 @@ html[data-chat-font] .aui-root {
}
@theme inline {
+ /* Named so they sort after lg/xl. 3xl = 1920px, 4xl = 2560px. */
+ --breakpoint-3xl: 120rem;
+ --breakpoint-4xl: 160rem;
/* UI typography scale (Settings > Appearance). Every token multiplies
its CSS base size by --ui-font-scale, so text follows the preference
while rem-based layout stays put. The CSS base is 16px; the app default
@@ -4111,3 +4114,10 @@ body.sidebar-row-dragging * {
margin-inline-start: calc(-0.75rem * var(--ui-space-scale, 1));
}
}
+
+/* Keep tooltips on screen on phones. Unlayered to beat call site max-w. */
+@media (max-width: 639px) {
+ [data-slot="tooltip-content"] {
+ max-width: calc(100vw - 1rem);
+ }
+}
diff --git a/studio/frontend/tests/ui-font-size-scales-spacing.test.ts b/studio/frontend/tests/ui-font-size-scales-spacing.test.ts
index aa60e005c77..7c3d21f25b3 100644
--- a/studio/frontend/tests/ui-font-size-scales-spacing.test.ts
+++ b/studio/frontend/tests/ui-font-size-scales-spacing.test.ts
@@ -401,7 +401,7 @@ test("a scaled media rail leaves the preview its minimum", () => {
for (const [file, width, split] of [
["features/images/images-page.tsx", "408px", "@[50rem]"],
["features/audio/audio-page.tsx", "408px", "@[50rem]"],
- ["features/video/video-page.tsx", "400px", "md"],
+ ["features/video/video-page.tsx", "400px", "lg"],
] as const) {
const source = readSrc(file);
assert.ok(
@@ -410,7 +410,7 @@ test("a scaled media rail leaves the preview its minimum", () => {
),
`${file} rail can outgrow its split`,
);
- if (split !== "md") {
+ if (split !== "lg") {
assert.ok(
source.includes(
`grid-cols-[minmax(0,calc(${width}*var(--ui-space-scale,1)))_minmax(13rem,1fr)]`,