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 Hub: drop the compact list view, make grid and split views responsive (#13822)
Michael Han9ae8f8b94bf0
diff --git a/studio/frontend/src/features/hub/catalog/model-card.tsx b/studio/frontend/src/features/hub/catalog/model-card.tsxindex e2a9559eac4..f3f65dfc022 100644--- a/studio/frontend/src/features/hub/catalog/model-card.tsx+++ b/studio/frontend/src/features/hub/catalog/model-card.tsx@@ -24,7 +24,7 @@ import {import { OwnerAvatar, useAvatarImageUrl } from "./owner-avatar";import { AccessGlyphs, CapabilityPill } from "./shared";-export const MODEL_CARD_WIDTH_PX = 204;+export const MODEL_CARD_WIDTH_PX = 224;export const MODEL_CARD_HEIGHT_PX = 128;export type TrendingCardStyle = CSSProperties & {diff --git a/studio/frontend/src/features/hub/catalog/models-catalog-lists.tsx b/studio/frontend/src/features/hub/catalog/models-catalog-lists.tsxindex 5b387610bf7..6431d8aa70e 100644--- a/studio/frontend/src/features/hub/catalog/models-catalog-lists.tsx+++ b/studio/frontend/src/features/hub/catalog/models-catalog-lists.tsx@@ -40,6 +40,7 @@ import {NetworkErrorState,SkeletonList,} from "./catalog-states";+import { useIsMobile } from "@/hooks/use-mobile";import { useUiSpaceScale } from "@/hooks/use-ui-space-scale";import {CATALOG_COLUMN_GAP_PX,@@ -50,13 +51,14 @@ import {type AllModelsView,type InventorySort,RESULT_CARD_HEIGHT_PX,+ RESULT_CARD_MOBILE_HEIGHT_PX,RESULT_GRID_HEIGHT_PX,RESULT_GRID_ROW_HEIGHT_PX,RESULT_ROW_HEIGHT_PX,+ RESULT_ROW_MOBILE_HEIGHT_PX,RESULT_SPLIT_HEIGHT_PX,RESULT_SPLIT_ROW_HEIGHT_PX,ResultCard,- ResultGridRow,ResultSplitRow,} from "./models-table";@@ -109,6 +111,7 @@ export function DiscoverList({onRetry,onSwitchDevice,view,+ columns,selectedId,showFormatDots = true,}: {@@ -135,22 +138,21 @@ export function DiscoverList({onRetry: () => void;onSwitchDevice?: () => void;view: AllModelsView;+ columns: number;showFormatDots?: boolean;}) {- // "two" = two cards per row; "grid" = compact table rows; "split" = one card per row.const isSplit = view === "split";- const isCardLike = view === "two" || view === "split";+ const isMobile = useIsMobile();const rowHeight = isSplit? RESULT_SPLIT_ROW_HEIGHT_PX- : isCardLike- ? RESULT_ROW_HEIGHT_PX- : RESULT_GRID_ROW_HEIGHT_PX;+ : isMobile+ ? RESULT_ROW_MOBILE_HEIGHT_PX+ : RESULT_ROW_HEIGHT_PX;const cellHeight = isSplit? RESULT_SPLIT_HEIGHT_PX- : isCardLike- ? RESULT_CARD_HEIGHT_PX- : RESULT_GRID_HEIGHT_PX;- const columns = view === "two" ? 2 : 1;+ : isMobile+ ? RESULT_CARD_MOBILE_HEIGHT_PX+ : RESULT_CARD_HEIGHT_PX;return (<>@@ -167,7 +169,7 @@ export function DiscoverList({cellHeight={cellHeight}getKey={(row) => row.id}renderRow={(row) =>- view === "split" ? (+ isSplit ? (<ResultSplitRowrow={row}deviceType={deviceType}@@ -176,16 +178,8 @@ export function DiscoverList({showFormatDot={showFormatDots}onSelect={onSelect}/>- ) : isCardLike ? (- <ResultCard- row={row}- deviceType={deviceType}- isDataset={isDataset}- showFormatDot={showFormatDots}- onSelect={onSelect}- />) : (- <ResultGridRow+ <ResultCardrow={row}deviceType={deviceType}isDataset={isDataset}diff --git a/studio/frontend/src/features/hub/catalog/models-catalog.tsx b/studio/frontend/src/features/hub/catalog/models-catalog.tsxindex 270f2229a70..3b4429789be 100644--- a/studio/frontend/src/features/hub/catalog/models-catalog.tsx+++ b/studio/frontend/src/features/hub/catalog/models-catalog.tsx@@ -14,6 +14,7 @@ import {useLayoutEffect,useRef,useState,+ useSyncExternalStore,} from "react";import type {CachedInventoryRow,@@ -34,6 +35,19 @@ import {RESULT_SPLIT_ROW_HEIGHT_PX,} from "./models-table";+// Phones and small tablets (768px and under) show one card per row.+const SINGLE_COLUMN_QUERY = "(max-width: 768px)";++function getSingleColumnSnapshot(): boolean {+ return window.matchMedia(SINGLE_COLUMN_QUERY).matches;+}++function subscribeSingleColumn(callback: () => void): () => void {+ const mql = window.matchMedia(SINGLE_COLUMN_QUERY);+ mql.addEventListener("change", callback);+ return () => mql.removeEventListener("change", callback);+}+export interface ModelsCatalogState {tab: ModelsTab;discoverRows: DiscoverRow[];@@ -157,6 +171,12 @@ export const ModelsCatalog = memo(function ModelsCatalog({downloaded: 0,});const deviceType = usePlatformStore((s) => s.deviceType);+ const singleColumn = useSyncExternalStore(+ subscribeSingleColumn,+ getSingleColumnSnapshot,+ () => false,+ );+ const columns = discoverView === "two" && !singleColumn ? 2 : 1;const setDiscoverScrollNode = useCallback((node: HTMLDivElement | null) => {discoverScrollRef.current = node;@@ -352,30 +372,23 @@ export const ModelsCatalog = memo(function ModelsCatalog({// Non-split reserves an equal `both-edges` gutter so the centered --hub-measure column stays// symmetric; 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] " ++ "absolute inset-0 min-h-0 overflow-x-hidden overflow-y-auto pb-6 pt-0 [overflow-anchor:none] [scrollbar-width:thin] max-md:[scrollbar-gutter:auto] " +(discoverView === "split"? "[scrollbar-gutter:stable]": "[scrollbar-gutter:stable_both-edges]");- // Split mode keeps the top bar's left padding to align the list header but tightens the right.+ // Split mode tightens the right padding only once the detail pane sits beside it (lg).const splitView = discoverView === "split";- const discoverColumnClassName = splitView- ? "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-[var(--hub-measure)] pl-5 pr-2 sm:pl-8"+ const columnClassName = splitView+ ? "mx-auto w-full max-w-[var(--hub-measure)] px-5 sm:px-8 lg:pr-2": "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(savedScrollHeightsRef.current.discover,- (discoverView === "two"- ? Math.ceil(discoverRows.length / 2)- : discoverRows.length) *- (discoverView === "grid"- ? RESULT_GRID_ROW_HEIGHT_PX- : discoverView === "split"- ? RESULT_SPLIT_ROW_HEIGHT_PX- : RESULT_ROW_HEIGHT_PX) ++ Math.ceil(discoverRows.length / columns) *+ (discoverView === "split"+ ? RESULT_SPLIT_ROW_HEIGHT_PX+ : RESULT_ROW_HEIGHT_PX) +lastHeaderHeightRef.current,);const downloadedInactiveHeight = Math.max(@@ -409,7 +422,7 @@ export const ModelsCatalog = memo(function ModelsCatalog({)}>{discoverActive ? (- <div className={discoverColumnClassName}>+ <div className={columnClassName}>{header ? <div ref={headerRef}>{header}</div> : null}<DiscoverListdiscoverRows={discoverRows}@@ -434,6 +447,7 @@ export const ModelsCatalog = memo(function ModelsCatalog({onRetry={onRetry}onSwitchDevice={onSwitchDevice}view={discoverView}+ columns={columns}selectedId={selectedId}showFormatDots={showFormatDots}/>@@ -456,7 +470,7 @@ export const ModelsCatalog = memo(function ModelsCatalog({)}>{downloadedActive ? (- <div className={downloadedColumnClassName}>+ <div className={columnClassName}>{downloadedHeader ? (<div className="flex flex-col gap-3 pt-6">{downloadedHeader}@@ -477,7 +491,7 @@ export const ModelsCatalog = memo(function ModelsCatalog({inventoryTokens={inventoryTokens}deviceType={deviceType}compact={splitView}- columns={discoverView === "two" ? 2 : 1}+ columns={columns}sort={inventorySort}onInventoryChange={onInventoryChange}showFormatDots={showFormatDots}diff --git a/studio/frontend/src/features/hub/catalog/models-table.tsx b/studio/frontend/src/features/hub/catalog/models-table.tsxindex 9738262f9fa..c04918896df 100644--- a/studio/frontend/src/features/hub/catalog/models-table.tsx+++ b/studio/frontend/src/features/hub/catalog/models-table.tsx@@ -2,13 +2,6 @@// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0import { useVllmAvailable, useVllmPlatform } from "@/features/model-picker";-import { useHfEndpoint, useHubName } from "@/lib/hf-endpoint";-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuTrigger,-} from "@/components/ui/dropdown-menu";import {Tooltip,TooltipContent,@@ -27,17 +20,12 @@ import {formatModelParamLabel,formatPipelineTag,} from "@/features/hub/lib/view-models";-import { copyToClipboard } from "@/lib/copy-to-clipboard";import { cn, formatCompact } from "@/lib/utils";import {ArrowUpDownIcon,- Copy01Icon,Download01Icon,FavouriteIcon,LayoutTwoColumnIcon,- LeftToRightListBulletIcon,- LinkSquare02Icon,- MoreVerticalIcon,Refresh01Icon,ViewSidebarLeftIcon,} from "@hugeicons/core-free-icons";@@ -46,8 +34,7 @@ import {} from "lucide-react";import type { IconSvgElement } from "@hugeicons/react";import { HugeiconsIcon } from "@hugeicons/react";-import { Fragment, type ReactNode, memo, useMemo } from "react";-import { confirmExternalLink } from "../stores/external-link-confirm";+import { type ReactNode, memo, useMemo } from "react";import type { DiscoverRow } from "../types";import { HubOptionMenu } from "./hub-option-menu";import {@@ -55,11 +42,15 @@ import {buildRowStatusTooltip,} from "./models-catalog-rows";import { OwnerAvatar } from "./owner-avatar";-import { AccessGlyphs, CapabilityPill } from "./shared";+import { AccessGlyphs } from "./shared";export const RESULT_CARD_HEIGHT_PX = 78;export const RESULT_ROW_GAP_PX = 8;export const RESULT_ROW_HEIGHT_PX = RESULT_CARD_HEIGHT_PX + RESULT_ROW_GAP_PX;+// Phone widths (below md) use a shorter card; ResultCard's max-md classes match it.+export const RESULT_CARD_MOBILE_HEIGHT_PX = 66;+export const RESULT_ROW_MOBILE_HEIGHT_PX =+ RESULT_CARD_MOBILE_HEIGHT_PX + RESULT_ROW_GAP_PX;export const RESULT_GRID_HEIGHT_PX = 64;export const RESULT_GRID_ROW_GAP_PX = 8;export const RESULT_GRID_ROW_HEIGHT_PX =@@ -69,20 +60,7 @@ export const RESULT_SPLIT_HEIGHT_PX = 56;export const RESULT_SPLIT_ROW_HEIGHT_PX =RESULT_SPLIT_HEIGHT_PX + RESULT_ROW_GAP_PX;-export type AllModelsView = "grid" | "two" | "split";--// Shared column widths so header and rows align: two flexible lead columns-// (Model, Capabilities) plus fixed metric columns that drop on narrow viewports.-const LIST_COLS = {- model: "flex min-w-0 flex-[2.4] items-center gap-3",- caps: "hidden min-w-0 flex-[1.7] items-center gap-1.5 md:flex",- capsModel: "hidden w-[calc(132px*var(--ui-space-scale,1))] shrink-0 items-center gap-1.5 md:flex",- size: "hidden w-[calc(60px*var(--ui-space-scale,1))] shrink-0 lg:block",- updated: "hidden w-[calc(82px*var(--ui-space-scale,1))] shrink-0 xl:block",- downloads: "hidden w-[calc(104px*var(--ui-space-scale,1))] shrink-0 items-center gap-1.5 sm:flex",- likes: "hidden w-[calc(76px*var(--ui-space-scale,1))] shrink-0 items-center gap-1.5 sm:flex",- actions: "flex w-[calc(64px*var(--ui-space-scale,1))] shrink-0 items-center justify-end gap-0.5",-} as const;+export type AllModelsView = "two" | "split";function ViewToggleButton({active,@@ -280,9 +258,7 @@ export function HubListHeader({aria-hidden="true"className="hub-tab-toggle-pill pointer-events-none absolute inset-y-0 left-0 w-8 rounded-full transition-transform duration-200 ease-out"style={{- transform: `translateX(${- (view === "split" ? 1 : view === "grid" ? 2 : 0) * 100- }%)`,+ transform: `translateX(${view === "split" ? 100 : 0}%)`,}}/><ViewToggleButton@@ -297,12 +273,6 @@ export function HubListHeader({icon={ViewSidebarLeftIcon}onClick={() => onViewChange("split")}/>- <ViewToggleButton- active={view === "grid"}- label="Compact"- icon={LeftToRightListBulletIcon}- onClick={() => onViewChange("grid")}- /></div>)}</div>@@ -311,22 +281,6 @@ export function HubListHeader({);}-export function ResultListHeader({ isDataset }: { isDataset: boolean }) {- return (- <div className="flex w-full items-center gap-3 px-4 pb-2 text-ui-11 font-medium text-muted-foreground/55">- <span className={LIST_COLS.model}>{isDataset ? "Dataset" : "Model"}</span>- <span className={isDataset ? LIST_COLS.caps : LIST_COLS.capsModel}>- {isDataset ? "Details" : "Capabilities"}- </span>- <span className={LIST_COLS.size}>Size</span>- <span className={LIST_COLS.updated}>Updated</span>- <span className={LIST_COLS.downloads}>Downloads</span>- <span className={LIST_COLS.likes}>Likes</span>- <span className={LIST_COLS.actions} aria-hidden="true" />- </div>- );-}-const STATUS_DOT_CLASS = "inline-block size-[calc(6px*var(--ui-space-scale,1))] shrink-0 rounded-full";function TitleMarkers({@@ -409,165 +363,6 @@ function VerifiedOwner({ owner }: { owner: string }) {);}-function StatItem({ icon, value }: { icon: IconSvgElement; value: string }) {- return (- <span className="flex shrink-0 items-center gap-1.5">- <HugeiconsIcon- icon={icon}- strokeWidth={1.75}- className="size-3.5 shrink-0"- />- {value}- </span>- );-}--function CapabilitiesCell({- row,- taskLabel,- onSelect,-}: {- row: DiscoverRow;- taskLabel: string | null;- onSelect: (id: string) => void;-}) {- const caps = row.capabilities;- if (caps.length === 0 && !taskLabel) {- return null;- }- const max = 3;- const shown = caps.slice(0, max);- const extra = caps.length - shown.length;- return (- <Tooltip>- <TooltipTrigger asChild={true}>- <div- className="pointer-events-auto flex w-full min-w-0 cursor-pointer items-center gap-1.5"- onClick={(event) => {- event.stopPropagation();- onSelect(row.id);- }}- >- {shown.map((capability) => (- <CapabilityPill- key={capability.key}- capability={capability}- iconOnly={true}- tooltip={false}- />- ))}- {extra > 0 && <span className="hub-chip shrink-0">+{extra}</span>}- {shown.length === 0 && taskLabel && (- <span className="truncate text-ui-12 text-muted-foreground/75">- {taskLabel}- </span>- )}- </div>- </TooltipTrigger>- <TooltipContent side="top" align="start" className="tooltip-compact">- <div className="flex flex-col items-start gap-1">- {taskLabel && (- <span className="text-ui-11 font-medium text-muted-foreground">- {taskLabel}- </span>- )}- {caps.map((capability) => (- <CapabilityPill key={capability.key} capability={capability} />- ))}- </div>- </TooltipContent>- </Tooltip>- );-}--function RowActions({- row,- isDataset,- onSelect,-}: {- row: DiscoverRow;- isDataset: boolean;- onSelect: (id: string) => void;-}) {- const hfEndpoint = useHfEndpoint();- const hubName = useHubName();- const hfUrl = `${hfEndpoint}/${isDataset ? "datasets/" : ""}${row.result.id}`;- const actionClass =- "pointer-events-auto inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground/70 transition-colors hover:bg-[color-mix(in_oklab,var(--foreground)_calc(7%*var(--contrast-wash-gain,1)),transparent)] hover:text-foreground focus-visible:text-foreground data-[state=open]:bg-[color-mix(in_oklab,var(--foreground)_calc(7%*var(--contrast-wash-gain,1)),transparent)] data-[state=open]:text-foreground";- return (- <>- <Tooltip>- <TooltipTrigger asChild={true}>- <button- type="button"- aria-label={`Get ${row.repo}`}- onClick={(event) => {- event.stopPropagation();- onSelect(row.id);- }}- className={actionClass}- >- <HugeiconsIcon- icon={Download01Icon}- strokeWidth={1.75}- className="size-4"- />- </button>- </TooltipTrigger>- <TooltipContent side="top" className="tooltip-compact">- {isDataset ? "View dataset" : "View and download"}- </TooltipContent>- </Tooltip>- <DropdownMenu>- <DropdownMenuTrigger asChild={true}>- <button- type="button"- aria-label={`More options for ${row.repo}`}- onClick={(event) => event.stopPropagation()}- className={actionClass}- >- <HugeiconsIcon- icon={MoreVerticalIcon}- strokeWidth={1.75}- className="size-4"- />- </button>- </DropdownMenuTrigger>- <DropdownMenuContent align="end" className="min-w-[calc(184px*var(--ui-space-scale,1))]">- <DropdownMenuItem- onClick={async (event) => {- event.stopPropagation();- await copyToClipboard(row.result.id);- }}- >- <HugeiconsIcon- icon={Copy01Icon}- strokeWidth={1.75}- className="size-4"- />- Copy ID- </DropdownMenuItem>- <DropdownMenuItem- onClick={(event) => {- event.stopPropagation();- if (!confirmExternalLink(hfUrl)) {- window.open(hfUrl, "_blank", "noopener,noreferrer");- }- }}- >- <HugeiconsIcon- icon={LinkSquare02Icon}- strokeWidth={1.75}- className="size-4"- />- Open on {hubName}- </DropdownMenuItem>- </DropdownMenuContent>- </DropdownMenu>- </>- );-}-function useResultRowModel(row: DiscoverRow,deviceType: string | null,@@ -665,7 +460,8 @@ export const ResultCard = memo(function ResultCard({key: "updated",node: (<span className="shrink-0">- Updated {formatRelativeLong(row.result.updatedAt)}+ <span className="hidden @[26rem]:inline">Updated </span>+ {formatRelativeLong(row.result.updatedAt)}</span>),});@@ -676,17 +472,17 @@ export const ResultCard = memo(function ResultCard({type="button"aria-label={row.repo}onClick={() => onSelect(row.id)}- className="hub-result-row hub-result-card group/row flex h-full w-full cursor-pointer items-center gap-3.5 px-4 text-left outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset"+ className="hub-result-row hub-result-card group/row @container flex h-full w-full cursor-pointer items-center gap-3.5 px-4 text-left max-md:gap-3 max-md:px-3 outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset"><OwnerAvatarowner={row.owner}repoName={row.repo}- className="size-[calc(52px*var(--ui-space-scale,1))] shrink-0 rounded-[16px] text-ui-16 ring-1 ring-[rgb(0_0_0_/_calc(0.05*var(--contrast-edge-gain,1)))] dark:ring-[rgb(255_255_255_/_calc(0.1*var(--contrast-edge-gain,1)))]"+ className="size-[calc(52px*var(--ui-space-scale,1))] shrink-0 rounded-[16px] text-ui-16 max-md:size-[calc(42px*var(--ui-space-scale,1))] max-md:rounded-[13px] max-md:text-ui-14 ring-1 ring-[rgb(0_0_0_/_calc(0.05*var(--contrast-edge-gain,1)))] dark:ring-[rgb(255_255_255_/_calc(0.1*var(--contrast-edge-gain,1)))]"remote={false}/><div className="flex min-w-0 flex-1 flex-col"><div className="flex min-w-0 items-center gap-2">- <span className="truncate text-ui-15 font-semibold leading-ui-18 text-foreground">+ <span className="truncate text-ui-15 font-semibold leading-ui-18 text-foreground max-md:text-ui-14">{row.repo}</span><TitleMarkers@@ -703,18 +499,33 @@ export const ResultCard = memo(function ResultCard({<VerifiedOwner owner={row.owner} /></span><div className="flex min-w-0 items-center gap-2 overflow-hidden text-ui-11p5 leading-ui-16 tabular-nums text-muted-foreground/65">+ {/* Narrow cards drop the task label, then the date. */}{textParts.map((part, index) => (- <Fragment key={part.key}>+ <span+ key={part.key}+ className={+ part.key === "task"+ ? "hidden @[26rem]:contents"+ : part.key === "updated"+ ? "hidden @[19rem]:contents"+ : "contents"+ }+ >{index > 0 && (<spanaria-hidden="true"- className="shrink-0 text-muted-foreground/35"+ className={cn(+ "shrink-0 text-muted-foreground/35",+ index === 1 &&+ textParts[0].key === "task" &&+ "hidden @[26rem]:inline",+ )}>•</span>)}{part.node}- </Fragment>+ </span>))}<span className="hub-meta-tag"><HugeiconsIcon@@ -750,157 +561,6 @@ export const ResultCard = memo(function ResultCard({);});-export const ResultGridRow = memo(function ResultGridRow({- row,- deviceType,- isDataset,- showFormatDot = true,- onSelect,-}: {- row: DiscoverRow;- deviceType: string | null;- isDataset: boolean;- showFormatDot?: boolean;- onSelect: (id: string) => void;-}) {- const {- support,- unsupported,- partial,- downloading,- onDevice,- sizeLabel,- taskLabel,- } =- useResultRowModel(row, deviceType, isDataset);- const sizeDisplay = isDataset ? null : sizeLabel;- const format =- isDataset || !showFormatDot- ? null- : row.result.isGguf- ? "gguf"- : "checkpoint";- const tip = buildRowStatusTooltip({- partialRepoId: partial ? row.result.id : undefined,- downloading,- unsupported,- unsupportedReason: support?.reason ?? null,- resourceLabel: isDataset ? "dataset" : "model",- });- const overlayButton = (- <button- type="button"- aria-label={row.repo}- onClick={() => onSelect(row.id)}- className="absolute inset-0 z-0 cursor-pointer rounded-[inherit] outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset"- />- );-- return (- <div className="hub-result-row group/row relative flex h-full w-full items-center gap-3 px-4">- {tip ? (- <Tooltip>- <TooltipTrigger asChild={true}>{overlayButton}</TooltipTrigger>- <TooltipContent- side="top"- align="start"- className="tooltip-compact max-w-[calc(280px*var(--ui-space-scale,1))]"- >- {tip}- </TooltipContent>- </Tooltip>- ) : (- overlayButton- )}- <div className="pointer-events-none relative z-[1] flex w-full items-center gap-3">- <div className={LIST_COLS.model}>- <OwnerAvatar- owner={row.owner}- repoName={row.repo}- className="size-9 shrink-0 rounded-[12px] text-ui-13 ring-1 ring-[rgb(0_0_0_/_calc(0.05*var(--contrast-edge-gain,1)))] dark:ring-[rgb(255_255_255_/_calc(0.1*var(--contrast-edge-gain,1)))]"- remote={false}- />- <div className="min-w-0 flex-1">- <div className="flex min-w-0 items-center gap-1.5">- <span className="truncate text-ui-13p5 font-semibold leading-ui-17 text-foreground">- {row.repo}- </span>- <TitleMarkers- format={format}- gated={row.result.gated}- isPrivate={row.result.private}- partial={partial}- downloading={downloading}- unsupported={unsupported}- onDevice={onDevice}- />- </div>- <span className="mt-0.5 flex min-w-0 items-center gap-1 text-ui-11p5 leading-ui-15 text-muted-foreground/80">- <VerifiedOwner owner={row.owner} />- </span>- </div>- </div>- <div className={isDataset ? LIST_COLS.caps : LIST_COLS.capsModel}>- {isDataset ? (- row.summary ? (- <span className="truncate text-ui-12 text-muted-foreground/75">- {row.summary}- </span>- ) : null- ) : (- <CapabilitiesCell- row={row}- taskLabel={taskLabel}- onSelect={onSelect}- />- )}- </div>- <div- className={cn(- LIST_COLS.size,- "truncate text-ui-12 tabular-nums text-muted-foreground",- )}- >- {sizeDisplay ?? "—"}- </div>- <div- className={cn(- LIST_COLS.updated,- "truncate text-ui-12 tabular-nums text-muted-foreground",- )}- >- {formatRelativeShort(row.result.updatedAt)}- </div>- <div- className={cn(- LIST_COLS.downloads,- "text-ui-12 tabular-nums text-muted-foreground",- )}- >- <StatItem- icon={Download01Icon}- value={formatCompact(row.result.downloads)}- />- </div>- <div- className={cn(- LIST_COLS.likes,- "text-ui-12 tabular-nums text-muted-foreground",- )}- >- <StatItem- icon={FavouriteIcon}- value={formatCompact(row.result.likes)}- />- </div>- <div className={LIST_COLS.actions}>- <RowActions row={row} isDataset={isDataset} onSelect={onSelect} />- </div>- </div>- </div>- );-});-// Compact master-pane row for split view: avatar + name/owner left, stats right,// with a selected highlight for the model shown in the detail pane.export const ResultSplitRow = memo(function ResultSplitRow({diff --git a/studio/frontend/src/features/hub/hub-page.tsx b/studio/frontend/src/features/hub/hub-page.tsxindex b8ee4cfd63f..31ea299233d 100644--- a/studio/frontend/src/features/hub/hub-page.tsx+++ b/studio/frontend/src/features/hub/hub-page.tsx@@ -31,6 +31,7 @@ import { loadOpenAIAutoSwitchSettings } from "@/features/settings";import { GuidedTour, useGuidedTourController } from "@/features/tour";import { useDebouncedValue } from "@/hooks/use-debounced-value";import { useGpuInfo, useInferenceGpuInfo } from "@/hooks/use-gpu-info";+import { useIsCompact } from "@/hooks/use-mobile";import { useVramBudgetFraction } from "@/hooks/use-vram-budget-fraction";import { diffusionRouteSearch } from "@/lib/diffusion-route-search";import { subscribeModelLifecycle } from "@/lib/model-lifecycle-events";@@ -64,7 +65,6 @@ import {type InventorySort,InventorySortControl,InventoryTypeFilterControl,- ResultListHeader,} from "./catalog/models-table";import {hasModelSearchFilters,@@ -281,16 +281,19 @@ function writeModelsTabPreference(tab: ModelsTab): void {}}-// "All models" defaults to list layout; list-vs-grid choice persists across sessions.+// "All models" defaults to split layout; the choice persists across sessions.function readAllModelsViewPreference(): AllModelsView {if (typeof window === "undefined") {return "split";}try {const value = window.localStorage.getItem(ALL_MODELS_VIEW_STORAGE_KEY);- return value === "grid" || value === "two" || value === "split"- ? value- : "split";+ // "grid" was the removed compact list; keep those users on a card layout.+ if (value === "grid") {+ window.localStorage.setItem(ALL_MODELS_VIEW_STORAGE_KEY, "two");+ return "two";+ }+ return value === "two" || value === "split" ? value : "split";} catch {return "split";}@@ -657,6 +660,9 @@ export function ModelsPage() {const [allModelsView, setAllModelsViewState] = useState<AllModelsView>(readAllModelsViewPreference,);+ const isCompactViewport = useIsCompact();+ // The split view's auto-picked first row; an explicit selection or leaving split clears it.+ const autoPreviewIdRef = useRef<string | null>(null);// Remembers the last non-split view so "Back to Hub" drops into the prior browsing layout.const lastNonSplitViewRef = useRef<AllModelsView>("two");const setAllModelsView = useCallback(@@ -665,6 +671,7 @@ export function ModelsPage() {writeAllModelsViewPreference(view);// Leaving split view drops the inline preview so the user lands on the full hub list.if (view !== "split") {+ autoPreviewIdRef.current = null;void navigate({to: "/hub",search: (prev) => ({ ...prev, model: undefined }),@@ -1349,6 +1356,7 @@ export function ModelsPage() {const handleSelect = useCallback((id: string) => {+ autoPreviewIdRef.current = null;runConfigOpenCoordinator.cancel();setRunConfigOpening(null);void navigate({@@ -1361,9 +1369,10 @@ export function ModelsPage() {const handleCloseDetail = useCallback(() => {runConfigOpenCoordinator.cancel();setRunConfigOpening(null);+ autoPreviewIdRef.current = null;// From split view, "Back to Hub" returns to the main hub feed (not the filtered list): leave// split mode, reset discover state, and clear the inline preview and channel.- if (allModelsView === "split") {+ if (allModelsView === "split" && !isCompactViewport) {const next = lastNonSplitViewRef.current;setAllModelsViewState(next);writeAllModelsViewPreference(next);@@ -1385,7 +1394,7 @@ export function ModelsPage() {to: "/hub",search: (prev) => ({ ...prev, model: undefined }),});- }, [navigate, allModelsView, runConfigOpenCoordinator]);+ }, [navigate, allModelsView, isCompactViewport, runConfigOpenCoordinator]);const handleQueryChange = useCallback((next: string) => {if (next.trim() === "") {@@ -1453,15 +1462,28 @@ export function ModelsPage() {}}, [allModelsView]);+ // Narrowing below lg drops the auto-picked preview so the rows show; a model the user opened stays.+ useEffect(() => {+ if (!isCompactViewport || allModelsView !== "split") return;+ if (!urlModel || urlModel !== autoPreviewIdRef.current) return;+ autoPreviewIdRef.current = null;+ void navigate({+ to: "/hub",+ search: (prev) => ({ ...prev, model: undefined, file: undefined }),+ replace: true,+ });+ }, [isCompactViewport, allModelsView, urlModel, navigate]);+// Split view previews the first row so the detail pane isn't empty. Feed mode included: split// view shows only the master list, so its first row lands on a real README, not a placeholder.useEffect(() => {- if (allModelsView !== "split" || urlModel) return;+ if (allModelsView !== "split" || urlModel || isCompactViewport) return;// Use the filtered rows the master pane renders so the preview never lands on a filtered-out row.const firstId = isDiscoverTab? listRows[0]?.id: (filteredCachedRows[0]?.id ?? filteredLocalRows[0]?.id);if (!firstId) return;+ autoPreviewIdRef.current = firstId;void navigate({to: "/hub",search: (prev) => ({ ...prev, model: firstId, file: undefined }),@@ -1470,6 +1492,7 @@ export function ModelsPage() {}, [allModelsView,urlModel,+ isCompactViewport,isDiscoverTab,listRows,filteredCachedRows,@@ -1848,9 +1871,6 @@ export function ModelsPage() {onRefresh={handleRetrySearch}isRefreshing={isLoading}/>- {allModelsView === "grid" && listCount > 0 && (- <ResultListHeader isDataset={isDatasetMode} />- )}</div></div>);@@ -1881,9 +1901,6 @@ export function ModelsPage() {actions={ownerToggle}/>)}- {allModelsView === "grid" && listCount > 0 && (- <ResultListHeader isDataset={isDatasetMode} />- )}</div>);}, [diff --git a/studio/frontend/src/features/hub/hub.css b/studio/frontend/src/features/hub/hub.cssindex 97aab8d227f..c34497afe94 100644--- a/studio/frontend/src/features/hub/hub.css+++ b/studio/frontend/src/features/hub/hub.css@@ -613,6 +613,12 @@border-radius: 16px;}+ @media (max-width: 767px) {+ .hub-page .hub-result-row.hub-result-card {+ border-radius: 14px;+ }+ }+.hub-page .hub-result-row:hover {background-color: var(--card);box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.16);diff --git a/studio/frontend/tests/hub-format-dot-all-formats.test.ts b/studio/frontend/tests/hub-format-dot-all-formats.test.tsindex 976401d8808..b5cc3c17ba3 100644--- a/studio/frontend/tests/hub-format-dot-all-formats.test.ts+++ b/studio/frontend/tests/hub-format-dot-all-formats.test.ts@@ -42,13 +42,13 @@ test("format dots show only under the mixed filters, All formats and Recommended/showFormatDots:\s*isDatasetMode \|\|\s*deferredFormatFilter === "all" \|\|\s*deferredFormatFilter === "recommended",/,);assert.ok(CATALOG.includes("showFormatDots={showFormatDots}"));- assert.equal(LISTS.match(/showFormatDot=\{showFormatDots\}/g)?.length, 4);+ assert.equal(LISTS.match(/showFormatDot=\{showFormatDots\}/g)?.length, 3);});test("every row drops its format dot when told to", () => {assert.equal(TABLE.match(/isDataset \|\| !showFormatDot\n\s*\? null/g)?.length,- 3,+ 2,);assert.ok(ROWS.includes("{showFormatDot && row.isGguf && ("));assert.ok(