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
Show activity on a 0-byte Xet download and keep finished cards visible longer (#9303)
Nilay23794ec1a4df
diff --git a/studio/frontend/src/features/hub/catalog/download-card.tsx b/studio/frontend/src/features/hub/catalog/download-card.tsxindex a95354e2ac1..ab79e98b4a6 100644--- a/studio/frontend/src/features/hub/catalog/download-card.tsx+++ b/studio/frontend/src/features/hub/catalog/download-card.tsx@@ -69,6 +69,7 @@ export function DownloadCard({<DownloadProgressBarprogress={progress}bytesPerSec={job.bytesPerSec}+ cancelling={job.cancelling}etaSeconds={job.etaSeconds}/></div>diff --git a/studio/frontend/src/features/hub/download-manager/download-manager-config.ts b/studio/frontend/src/features/hub/download-manager/download-manager-config.tsindex 6cf1fdaa890..10662948821 100644--- a/studio/frontend/src/features/hub/download-manager/download-manager-config.ts+++ b/studio/frontend/src/features/hub/download-manager/download-manager-config.ts@@ -18,7 +18,8 @@ export const TRANSPORT_STATUS_TIMEOUT_MS = 3_000;export const MAX_PROGRESS_FRACTION = 0.99;export const CANCEL_WATCHDOG_MS = 20_000;export const IDLE_EVICT_GRACE_MS = 60_000;-export const COMPLETE_LINGER_MS = 6_000;+// A small Xet download can finish before its card ever shows a byte.+export const COMPLETE_LINGER_MS = 30_000;export const CANCELLED_LINGER_MS = 6_000;export const ERROR_LINGER_MS = 12_000;export const INVENTORY_BUMP_DEBOUNCE_MS = 250;diff --git a/studio/frontend/src/features/hub/download-manager/download-manager-panel.tsx b/studio/frontend/src/features/hub/download-manager/download-manager-panel.tsxindex 94d48591d57..2a3bb0e6885 100644--- a/studio/frontend/src/features/hub/download-manager/download-manager-panel.tsx+++ b/studio/frontend/src/features/hub/download-manager/download-manager-panel.tsx@@ -172,6 +172,7 @@ function DownloadRow({ jobKey }: { jobKey: string }) {fraction: job.fraction,}}bytesPerSec={job.bytesPerSec}+ cancelling={job.state === "cancelling"}etaSeconds={job.etaSeconds}/>) : null}diff --git a/studio/frontend/src/features/hub/download-manager/download-progress-bar.tsx b/studio/frontend/src/features/hub/download-manager/download-progress-bar.tsxindex 6a12ba8cbe6..1474d25018f 100644--- a/studio/frontend/src/features/hub/download-manager/download-progress-bar.tsx+++ b/studio/frontend/src/features/hub/download-manager/download-progress-bar.tsx@@ -2,6 +2,7 @@// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0import { formatBytes, formatEta, formatRate } from "@/features/hub/lib/format";+import { isIndeterminateProgress } from "./progress-reconcile";export interface DownloadProgress {expectedBytes: number;@@ -12,10 +13,12 @@ export interface DownloadProgress {export function DownloadProgressBar({progress,bytesPerSec,+ cancelling = false,etaSeconds = 0,}: {progress: DownloadProgress;bytesPerSec: number;+ cancelling?: boolean;/*** Seconds remaining, from the estimator that produced ``bytesPerSec``.* Deriving it here gave every caller its own ETA semantics and left the@@ -24,6 +27,7 @@ export function DownloadProgressBar({etaSeconds?: number;}) {const exactPercent = Math.min(Math.max(progress.fraction, 0), 1) * 100;+ const indeterminate = isIndeterminateProgress(progress, cancelling);const totalLabel =progress.expectedBytes > 0 ? formatBytes(progress.expectedBytes) : null;const rateLabel = formatRate(bytesPerSec);@@ -31,19 +35,27 @@ export function DownloadProgressBar({return (<div className="flex flex-col gap-1.5 pb-1"><div className="relative h-[3px] overflow-hidden rounded-full bg-foreground/[0.06] dark:bg-white/[0.06]">- <div- className="h-full rounded-full bg-status-warning/80 transition-[width] duration-500 ease-linear"- style={{ width: `${exactPercent}%` }}- />- <span- aria-hidden="true"- className="pointer-events-none absolute top-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-status-warning ring-2 ring-status-warning/30 transition-[left] duration-500 ease-linear"- style={{ left: `${exactPercent}%` }}- />+ {indeterminate ? (+ <div className="loading-bar-slide h-full w-1/3 rounded-full bg-status-warning/80" />+ ) : (+ <>+ <div+ className="h-full rounded-full bg-status-warning/80 transition-[width] duration-500 ease-linear"+ style={{ width: `${exactPercent}%` }}+ />+ <span+ aria-hidden="true"+ className="pointer-events-none absolute top-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-status-warning ring-2 ring-status-warning/30 transition-[left] duration-500 ease-linear"+ style={{ left: `${exactPercent}%` }}+ />+ </>+ )}</div><div className="flex items-center justify-between gap-2 text-ui-10p5 text-muted-foreground tabular-nums"><span>- {formatBytes(progress.downloadedBytes)}+ {indeterminate+ ? "Transferring…"+ : formatBytes(progress.downloadedBytes)}{totalLabel && ` / ${totalLabel}`}</span><span className="flex items-center gap-2">diff --git a/studio/frontend/src/features/hub/download-manager/progress-reconcile.ts b/studio/frontend/src/features/hub/download-manager/progress-reconcile.tsindex fd6d5958776..8ff02916d5d 100644--- a/studio/frontend/src/features/hub/download-manager/progress-reconcile.ts+++ b/studio/frontend/src/features/hub/download-manager/progress-reconcile.ts@@ -31,6 +31,18 @@ function finiteReading(value: number | null | undefined): number {return typeof value === "number" && Number.isFinite(value) ? value : 0;}+// Xet commits bytes in batches, so a small transfer can sit at 0 B for its+// whole life; show activity, not a dead 0%. Cancelling is not activity.+export function isIndeterminateProgress(+ progress: {+ downloadedBytes: number;+ fraction: number;+ },+ cancelling = false,+): boolean {+ return !cancelling && progress.downloadedBytes <= 0 && progress.fraction <= 0;+}+export function resolveProgressUpdate(job: ManagedDownload,progressResp: ProgressLike,diff --git a/studio/frontend/tests/download-progress-indeterminate.test.ts b/studio/frontend/tests/download-progress-indeterminate.test.tsnew file mode 100644index 00000000000..c267c25136b--- /dev/null+++ b/studio/frontend/tests/download-progress-indeterminate.test.ts@@ -0,0 +1,45 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import assert from "node:assert/strict";+import test from "node:test";++import { registerBundlerResolver } from "./helpers/kit.ts";++registerBundlerResolver();++const { isIndeterminateProgress } = await import(+ "../src/features/hub/download-manager/progress-reconcile.ts"+);++test("zero measured bytes and fraction reads as indeterminate", () => {+ assert.equal(+ isIndeterminateProgress({ downloadedBytes: 0, fraction: 0 }),+ true,+ );+});++test("the first measured byte is determinate", () => {+ assert.equal(+ isIndeterminateProgress({ downloadedBytes: 1, fraction: 0 }),+ false,+ );+});++test("a nonzero fraction alone is determinate too", () => {+ // resolveProgressUpdate keeps GGUF fractions monotonic, so a fraction can+ // lead the byte counter; that is a measurement, not a stall.+ assert.equal(+ isIndeterminateProgress({ downloadedBytes: 0, fraction: 0.4 }),+ false,+ );+});++test("a pending cancellation is not transfer activity", () => {+ // The row still renders the bar while cancelling, above a "Cancelling..."+ // status; an animated "Transferring..." there would contradict it.+ assert.equal(+ isIndeterminateProgress({ downloadedBytes: 0, fraction: 0 }, true),+ false,+ );+});