Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: scale the Model hub to the window instead of a fixed 1100px (#7816)
Michael Hanf017cb219f26
diff --git a/studio/frontend/src/features/hub/catalog/hub-detail-view.tsx b/studio/frontend/src/features/hub/catalog/hub-detail-view.tsxindex 78e1d0a4209..d721b78f6a0 100644--- a/studio/frontend/src/features/hub/catalog/hub-detail-view.tsx+++ b/studio/frontend/src/features/hub/catalog/hub-detail-view.tsx@@ -18,8 +18,8 @@ export function HubDetailView({const [scrolled, setScrolled] = useState(false);// Split pane is narrower than the full-page overlay; tighter measure reads better.const measure = compact- ? "mx-auto w-full max-w-[860px] px-5 sm:px-5"- : "mx-auto w-full max-w-[1100px] px-5 sm:px-8";+ ? "mx-auto w-full max-w-[var(--hub-measure-compact)] px-5 sm:px-5"+ : "mx-auto w-full max-w-[var(--hub-measure)] px-5 sm:px-8";useEffect(() => {const el = scrollRef.current;diff --git a/studio/frontend/src/features/hub/catalog/hub-model-settings-view.tsx b/studio/frontend/src/features/hub/catalog/hub-model-settings-view.tsxindex baf86d2f3bf..8e59ecb136c 100644--- a/studio/frontend/src/features/hub/catalog/hub-model-settings-view.tsx+++ b/studio/frontend/src/features/hub/catalog/hub-model-settings-view.tsx@@ -36,8 +36,8 @@ export function HubModelSettingsView({const [scrolled, setScrolled] = useState(false);// Mirrors HubDetailView so this view sits at the Hub's measure.const measure = compact- ? "mx-auto w-full max-w-[860px] px-5 sm:px-5"- : "mx-auto w-full max-w-[1100px] px-5 sm:px-8";+ ? "mx-auto w-full max-w-[var(--hub-measure-compact)] px-5 sm:px-5"+ : "mx-auto w-full max-w-[var(--hub-measure)] px-5 sm:px-8";useEffect(() => {const el = scrollRef.current;diff --git a/studio/frontend/src/features/hub/catalog/hub-top-bar.tsx b/studio/frontend/src/features/hub/catalog/hub-top-bar.tsxindex f706dd1ff2a..bbfd62e9356 100644--- a/studio/frontend/src/features/hub/catalog/hub-top-bar.tsx+++ b/studio/frontend/src/features/hub/catalog/hub-top-bar.tsx@@ -6,7 +6,8 @@ import type { ReactNode } from "react";export function HubTopBar({ children }: { children: ReactNode }) {return (<div className="hub-canvas shrink-0">- <div className="mx-auto flex w-full max-w-[1100px] flex-col gap-4 px-5 pb-3 pt-6 sm:px-8">+ {/* pt-8 matches the py-8 page container on Data recipes and Export. */}+ <div className="mx-auto flex w-full max-w-[var(--hub-measure)] flex-col gap-4 px-5 pb-3 pt-8 sm:px-8">{children}</div></div>diff --git a/studio/frontend/src/features/hub/catalog/model-inspector.tsx b/studio/frontend/src/features/hub/catalog/model-inspector.tsxindex 757ab0e2c93..f2deeea996c 100644--- a/studio/frontend/src/features/hub/catalog/model-inspector.tsx+++ b/studio/frontend/src/features/hub/catalog/model-inspector.tsx@@ -846,7 +846,7 @@ export const ModelInspector = memo(function ModelInspector({/></div>- <div className="max-w-[860px] space-y-4 pt-4">+ <div className="max-w-[var(--hub-readme-measure)] space-y-4 pt-4">{readmeReady && readmeRepoId && (<ModelReadmerepoId={readmeRepoId}diff --git a/studio/frontend/src/features/hub/catalog/models-catalog.tsx b/studio/frontend/src/features/hub/catalog/models-catalog.tsxindex e67954d2674..aae9ba4a8e8 100644--- a/studio/frontend/src/features/hub/catalog/models-catalog.tsx+++ b/studio/frontend/src/features/hub/catalog/models-catalog.tsx@@ -353,9 +353,9 @@ export const ModelsCatalog = memo(function ModelsCatalog({// overflow-y stays `auto` on BOTH panes: toggling to `hidden` clamps the// inactive pane's scrollTop to 0 and corrupts the mirror; visibility +// pointer-events-none hides it while preserving native scroll state.- // Non-split reserves an equal `both-edges` gutter so the centered 1100px- // column stays symmetric and aligned with the top bar; split mode pins a- // narrow master left, so it reserves only the right (divider) gutter.+ // Non-split reserves an equal `both-edges` gutter so the centered+ // --hub-measure column stays symmetric and aligned with the top bar; split+ // mode pins a narrow master left, so it reserves only the right gutter.const scrollPaneClassName ="absolute inset-0 min-h-0 overflow-x-hidden overflow-y-auto pb-6 pt-0 [overflow-anchor:none] [scrollbar-width:thin] " +(discoverView === "split"@@ -365,11 +365,11 @@ export const ModelsCatalog = memo(function ModelsCatalog({// tightens the right padding so compact rows run wider toward the divider.const splitView = discoverView === "split";const discoverColumnClassName = splitView- ? "mx-auto w-full max-w-[1100px] pl-5 pr-2 sm:pl-8"- : "mx-auto w-full max-w-[1100px] px-5 sm:px-8";+ ? "mx-auto w-full max-w-[var(--hub-measure)] pl-5 pr-2 sm:pl-8"+ : "mx-auto w-full max-w-[var(--hub-measure)] px-5 sm:px-8";const downloadedColumnClassName = splitView- ? "mx-auto w-full max-w-[1100px] pl-5 pr-2 sm:pl-8"- : "mx-auto w-full max-w-[1100px] px-5 sm:px-8";+ ? "mx-auto w-full max-w-[var(--hub-measure)] pl-5 pr-2 sm:pl-8"+ : "mx-auto w-full max-w-[var(--hub-measure)] px-5 sm:px-8";const discoverActive = tab === "discover";const downloadedActive = tab === "downloaded";const discoverInactiveHeight = Math.max(diff --git a/studio/frontend/src/features/hub/hub-page.tsx b/studio/frontend/src/features/hub/hub-page.tsxindex 519d94467bb..9c69cf5a883 100644--- a/studio/frontend/src/features/hub/hub-page.tsx+++ b/studio/frontend/src/features/hub/hub-page.tsx@@ -1921,20 +1921,21 @@ export function ModelsPage() {<divclassName={cn("relative flex min-h-0 min-w-0 flex-1 basis-0",- // Split mode shares the top bar's centered 1100px measure so the+ // Split mode shares the top bar's centered --hub-measure column so the// master list lines up with the heading instead of hugging the edge.splitMode- ? "flex-col lg:mx-auto lg:w-full lg:max-w-[1100px] lg:flex-row"+ ? "flex-col lg:mx-auto lg:w-full lg:max-w-[var(--hub-measure)] lg:flex-row": "flex-col",)}><divclassName={cn("flex min-h-0 flex-col",- // Split mode keeps the catalog as a fixed-width master pane on large- // screens; otherwise it fills the area and the detail view overlays it.+ // Split mode keeps the catalog as a master pane that grows with the+ // container off a 460px floor; otherwise it fills the area and the+ // detail view overlays it.splitMode- ? "flex-1 lg:w-[460px] lg:max-w-[44%] lg:flex-none lg:shrink-0 lg:border-r lg:border-border/60"+ ? "flex-1 lg:w-[clamp(460px,32%,620px)] lg:max-w-[44%] lg:flex-none lg:shrink-0 lg:border-r lg:border-border/60": "flex-1",// A full-bleed opaque overlay, so the catalog leaves the tab order; without// this, tabbing out of the form walks into the rows behind it.diff --git a/studio/frontend/src/features/hub/hub.css b/studio/frontend/src/features/hub/hub.cssindex 9329c9382f1..086796f18b9 100644--- a/studio/frontend/src/features/hub/hub.css+++ b/studio/frontend/src/features/hub/hub.css@@ -49,6 +49,20 @@}@layer base {+ /* Shared measure for every centered Hub column (top bar, catalog, detail,+ settings). Container-relative, so the column tracks the width actually+ available instead of pinning to 1100px and leaving wide empty gutters.+ The floor keeps the old measure on ~1280px laptops, the cap stops rows+ stretching on ultrawides, and `max-width` never forces overflow, so the+ floor stays safe on narrow viewports. */+ .hub-page {+ --hub-measure: clamp(1100px, 94%, 1760px);+ /* Split mode's detail pane: tighter, the master list takes the left. */+ --hub-measure-compact: clamp(860px, 94%, 1180px);+ /* Model card readme. Fills the column, capped so prose stays readable. */+ --hub-readme-measure: 1400px;+ }+/* Filled-control surface — Hub search, Hub filter triggers, pickersearch bars. Borderless soft fill matching the .hub-tab-toggle pills:- Resting: 5% bg, no border