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.

Revert "Studio: steady the Images and Video loading spinners, and tidy the pr…" (#11691)

Michael Han3ef36472dfe1
diff --git a/studio/frontend/src/components/ui/spinner.tsx b/studio/frontend/src/components/ui/spinner.tsx
index 68fbeeea9a1..34543ed7639 100644
--- a/studio/frontend/src/components/ui/spinner.tsx
+++ b/studio/frontend/src/components/ui/spinner.tsx
@@ -7,51 +7,16 @@ import { Loader2Icon } from "lucide-react";
import { cn } from "@/lib/utils";
/** App-wide spinner inheriting the current text color. `label` overrides the announcement
- * where "loading" is not what it means (a sidebar chat is generating). `variant="ring"` turns
- * only an arc over a static track, so it reads as fixed in place rather than drifting. */
+ * where "loading" is not what it means (a sidebar chat is generating). */
function Spinner({
className,
label = "Loading",
- variant = "arc",
"data-testid": dataTestId,
}: {
className?: string;
label?: string;
- variant?: "arc" | "ring";
"data-testid"?: string;
}) {
- if (variant === "ring") {
- return (
- <svg
- viewBox="0 0 24 24"
- fill="none"
- role="status"
- aria-label={label}
- data-testid={dataTestId}
- className={cn("size-4 shrink-0", className)}
- >
- <circle
- cx="12"
- cy="12"
- r="9"
- stroke="currentColor"
- strokeOpacity={0.2}
- strokeWidth={2.5}
- />
- <circle
- cx="12"
- cy="12"
- r="9"
- stroke="currentColor"
- strokeWidth={2.5}
- strokeLinecap="round"
- // About a quarter of the circumference.
- strokeDasharray="14 43"
- className="origin-center animate-spin [transform-box:view-box] will-change-transform"
- />
- </svg>
- );
- }
return (
<Loader2Icon
role="status"
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 adee7c4f4de..b20477c9362 100644
--- a/studio/frontend/src/features/chat/components/model-load-status.tsx
+++ b/studio/frontend/src/features/chat/components/model-load-status.tsx
@@ -13,8 +13,6 @@ type ModelLoadDescriptionProps = {
progressLabel?: string | null;
// Extra classes for the root row (e.g. a titleless caller dropping min-h-12).
className?: string;
- /** "floating": the Images / Video progress card. Ring spinner, brighter text on its dark card. */
- variant?: "default" | "floating";
};
function clampProgress(value: number): number {
@@ -42,10 +40,8 @@ export function ModelLoadDescription({
progressPercent,
progressLabel,
className,
- variant = "default",
}: ModelLoadDescriptionProps) {
const hasProgress = typeof progressPercent === "number";
- const floating = variant === "floating";
// Split once at the top so the JSX below stays flat (no IIFE).
const { primary: labelPrimary, secondary: labelSecondary } =
splitProgressLabel(progressLabel);
@@ -53,58 +49,30 @@ export function ModelLoadDescription({
return (
<div className={cn("relative flex min-h-12 w-full items-stretch gap-2", className)}>
<div className="flex h-full shrink-0 items-center self-center">
- <Spinner
- variant={floating ? "ring" : "arc"}
- className={cn(
- "size-3.5 text-muted-foreground",
- floating && "size-4 dark:text-foreground/70",
- )}
- />
+ <Spinner className="size-3.5 text-muted-foreground" />
</div>
<div className="flex min-w-0 flex-1 flex-col justify-center">
{title ? <p className="text-foreground leading-tight font-semibold">{title}</p> : null}
{hasProgress ? (
<div className="w-full pt-1">
- <div
- className={cn(
- "flex items-center justify-between gap-2 text-ui-10 font-medium tracking-[0.08em] text-muted-foreground/80",
- floating && "dark:text-foreground/85",
- )}
- >
+ <div className="flex items-center justify-between gap-2 text-ui-10 font-medium tracking-[0.08em] text-muted-foreground/80">
<span className="min-w-0 truncate">{labelPrimary}</span>
<span className="shrink-0 tabular-nums">
{Math.round(clampProgress(progressPercent))}%
</span>
</div>
{labelSecondary ? (
- <div
- className={cn(
- "truncate pt-0.5 text-ui-10 font-medium tracking-[0.08em] text-muted-foreground/60",
- floating && "dark:text-foreground/65",
- )}
- >
+ <div className="truncate pt-0.5 text-ui-10 font-medium tracking-[0.08em] text-muted-foreground/60">
{labelSecondary}
</div>
) : null}
<Progress
value={clampProgress(progressPercent)}
- className={cn(
- "mt-1 h-1 bg-[color-mix(in_oklab,var(--foreground)_calc(8%*var(--contrast-wash-gain,1)),transparent)]",
- // The lighter card would swallow the 8% track.
- floating &&
- "dark:bg-[color-mix(in_oklab,var(--foreground)_calc(14%*var(--contrast-wash-gain,1)),transparent)]",
- )}
+ className="mt-1 h-1 bg-[color-mix(in_oklab,var(--foreground)_calc(8%*var(--contrast-wash-gain,1)),transparent)]"
/>
</div>
) : message ? (
- <p
- className={cn(
- "pt-1 text-xs leading-relaxed text-muted-foreground",
- floating && "dark:text-foreground/85",
- )}
- >
- {message}
- </p>
+ <p className="pt-1 text-xs leading-relaxed text-muted-foreground">{message}</p>
) : null}
</div>
</div>
diff --git a/studio/frontend/src/features/images/images-page.tsx b/studio/frontend/src/features/images/images-page.tsx
index 36d18f5f16f..00052c80db6 100644
--- a/studio/frontend/src/features/images/images-page.tsx
+++ b/studio/frontend/src/features/images/images-page.tsx
@@ -1226,7 +1226,7 @@ export function ImagesPage({
const imageModels = useImageModels(hostClass, denseQuantSchemes);
const [quant, setQuant] = useState<string | null>(galleryCache.quant);
const [prompt, setPrompt] = useState(
- "A rally car speeding across vast desert dunes, throwing a dramatic trail of sand behind it. Low-angle action photograph, crisp vehicle details, motion blur in the foreground, harsh afternoon light, realistic textures.",
+ "Cinematic wide shot of a whimsical Alice in Wonderland tea party in an overgrown Victorian garden. Exactly three figures at a long white lace-draped table: a tall eccentric gentleman in an oversized emerald velvet top hat pouring tea from a silver pot mid-motion; a young woman in a pale blue Victorian dress seated left, holding a porcelain teacup with both hands, looking up and laughing; an older woman in deep burgundy seated right in profile, reaching for a tiered cake stand. Detailed embroidered fabrics, realistic skin texture, natural expressions. The table holds mismatched porcelain, antique silverware, towering pastel cakes, and wildflowers. Giant red-capped mushrooms rise behind the table, with ancient trees overhead and golden sunlight streaming through leaves. Shot on 85mm, f/2.8, focus on the gentleman, soft background falloff. Photorealistic, saturated storybook color, warm amber and deep green palette.",
);
const [negativePrompt, setNegativePrompt] = useState("");
const [negativeOpen, setNegativeOpen] = useState(false);
@@ -5081,7 +5081,7 @@ export function ImagesPage({
variant="outline"
onClick={handleCancelGenerate}
>
- <Spinner variant="ring" className="mr-2 size-4" />
+ <Spinner className="mr-2 size-4" />
{genDone != null && count > 1 ? `Stop (${genDone}/${count})` : "Stop"}
</Button>
) : (
@@ -5154,7 +5154,7 @@ export function ImagesPage({
) : selected ? (
// The selected record's blob is still loading; spin in place.
<div className="flex flex-col items-center gap-3 text-muted-foreground">
- <Spinner variant="ring" className="size-8" />
+ <Spinner className="size-8" />
<p className="text-sm">Loading…</p>
</div>
) : busy === "generating" ? null : (
@@ -5177,9 +5177,8 @@ export function ImagesPage({
selectedSrc ? "inset-x-0 bottom-4" : "inset-0 items-center",
)}
>
- <div className="w-72 max-w-full rounded-xl bg-background/85 p-3 shadow-lg backdrop-blur dark:bg-card/95">
+ <div className="w-72 max-w-full rounded-xl bg-background/85 p-3 shadow-lg ring-1 ring-border backdrop-blur">
<ModelLoadDescription
- variant="floating"
// Drop the chat min-height: this floating card has no layout to stabilise.
className="min-h-0"
title={
@@ -5210,8 +5209,8 @@ export function ImagesPage({
{/* In-progress generation: a placeholder tile at the front so past images stay browsable while
the new one renders. */}
{busy === "generating" && (
- <div className="flex size-16 shrink-0 animate-pulse items-center justify-center rounded-lg bg-muted/50">
- <Spinner variant="ring" className="size-6 text-muted-foreground" />
+ <div className="flex size-16 shrink-0 animate-pulse items-center justify-center rounded-lg bg-muted/50 ring-2 ring-primary/30">
+ <Spinner className="size-5 text-muted-foreground" />
</div>
)}
{/* The tile is a wrapper, not a button: the actions menu must be the select button's SIBLING,
diff --git a/studio/frontend/src/features/video/video-page.tsx b/studio/frontend/src/features/video/video-page.tsx
index 3da76cd6833..32323307497 100644
--- a/studio/frontend/src/features/video/video-page.tsx
+++ b/studio/frontend/src/features/video/video-page.tsx
@@ -4091,7 +4091,7 @@ function VideoGenerator({
variant="outline"
onClick={handleCancelGenerate}
>
- <Spinner variant="ring" className="mr-2 size-4" />
+ <Spinner className="mr-2 size-4" />
Cancel
</Button>
) : (
@@ -4186,7 +4186,7 @@ function VideoGenerator({
) : selected ? (
// The selected record's link has not landed yet; spin in place.
<div className="flex flex-col items-center gap-3 text-muted-foreground">
- <Spinner variant="ring" className="size-8" />
+ <Spinner className="size-8" />
<p className="text-sm">Loading…</p>
</div>
) : busy === "generating" ? null : (
@@ -4210,9 +4210,8 @@ function VideoGenerator({
selectedSrc ? "inset-x-0 bottom-4" : "inset-0 items-center",
)}
>
- <div className="w-72 max-w-full rounded-xl bg-background/85 p-3 shadow-lg backdrop-blur dark:bg-card/95">
+ <div className="w-72 max-w-full rounded-xl bg-background/85 p-3 shadow-lg ring-1 ring-border backdrop-blur">
<ModelLoadDescription
- variant="floating"
className="min-h-0"
title={null}
message="Starting…"
@@ -4241,8 +4240,8 @@ function VideoGenerator({
{/* In-progress generation: a placeholder tile at the front so past clips stay browsable while
the new one renders. */}
{busy === "generating" && (
- <div className="flex size-16 shrink-0 animate-pulse items-center justify-center rounded-[10px] bg-muted/50">
- <Spinner variant="ring" className="size-6 text-muted-foreground" />
+ <div className="flex size-16 shrink-0 animate-pulse items-center justify-center rounded-[10px] bg-muted/50 ring-2 ring-primary/30">
+ <Spinner className="size-5 text-muted-foreground" />
</div>
)}
{/* The card is a wrapper, not a button: the actions menu must be the select button's SIBLING,