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.

Improve desktop installer progress UX (#8102)

Wasim Yousef Saide6d773a8e7a2
diff --git a/studio/frontend/src/app/provider.tsx b/studio/frontend/src/app/provider.tsx
index 623c48ea767..07f50de7384 100644
--- a/studio/frontend/src/app/provider.tsx
+++ b/studio/frontend/src/app/provider.tsx
@@ -435,7 +435,7 @@ const MAC_NATIVE_CHROME_STYLE = {
"--studio-titlebar-height": "0px",
"--studio-mac-titlebar-height": "34px",
"--studio-desktop-titlebar-height": "34px",
- "--studio-titlebar-navigation-offset-y": "2px",
+ "--studio-titlebar-navigation-offset-y": "4px",
"--studio-mac-traffic-light-inset": "78px",
"--studio-collapsed-chat-controls-inset": "188px",
"--studio-startup-top-inset": "58px",
@@ -443,7 +443,7 @@ const MAC_NATIVE_CHROME_STYLE = {
"--studio-non-chat-content-top-inset": "34px",
"--studio-hidden-route-top-inset": "34px",
"--studio-chat-header-height": "44px",
- "--studio-chat-header-padding-top": "7px",
+ "--studio-chat-header-padding-top": "9px",
"--studio-media-header-left-inset": "0.5rem",
"--studio-chat-control-height": "33px",
"--studio-chat-header-right-inset": "0px",
diff --git a/studio/frontend/src/components/tauri/startup-messages.ts b/studio/frontend/src/components/tauri/startup-messages.ts
index 3614b7f78a0..ff1b052f548 100644
--- a/studio/frontend/src/components/tauri/startup-messages.ts
+++ b/studio/frontend/src/components/tauri/startup-messages.ts
@@ -1,37 +1,58 @@
-export const INITIAL_STARTUP_MESSAGE = "Loading Unsloth...";
+export const INITIAL_STARTUP_MESSAGE = "Starting Unsloth...";
export const MODELS_STARTUP_MESSAGE = "Loading models...";
-export const SERVER_STARTUP_MESSAGE = "Starting server...";
-export const SERVER_START_FALLBACK_MS = 3_000;
+export const SERVER_STARTUP_MESSAGE = "Nearly done...";
+export const STATUS_MESSAGE_ROTATION_MS = 5_000;
export interface InstallProgressMessage {
title: string;
subtitle: string;
}
-const GETTING_READY_MESSAGE: InstallProgressMessage = {
- title: "Getting things ready...",
- subtitle: "This won’t take long.",
-};
+const INSTALL_PHASE_MESSAGES: readonly InstallProgressMessage[] = [
+ {
+ title: "Preparing your workspace...",
+ subtitle: "Checking what this computer needs.",
+ },
+ {
+ title: "Downloading required components...",
+ subtitle: "Creating your local environment.",
+ },
+ {
+ title: "Installing Unsloth...",
+ subtitle: "Setting up local AI tools...",
+ },
+ {
+ title: "Finishing setup...",
+ subtitle: "Getting everything ready.",
+ },
+];
+
+const INSTALL_WAITING_SUBTITLES = [
+ "Setup will continue automatically.",
+ "This can take a few minutes.",
+ "Some components take longer to configure.",
+] as const;
+
+function normalizedRotationIndex(index: number, length: number): number {
+ const wholeIndex = Number.isFinite(index) ? Math.trunc(index) : 0;
+ return ((wholeIndex % length) + length) % length;
+}
export function installProgressMessage(
currentStepIndex: number,
+ rotationIndex = 0,
): InstallProgressMessage {
- if (currentStepIndex < 2) return GETTING_READY_MESSAGE;
- if (currentStepIndex < 4) {
- return {
- title: "Preparing your workspace...",
- subtitle: "Setting up everything Unsloth needs.",
- };
- }
- if (currentStepIndex < 6) {
- return {
- title: "Installing Unsloth...",
- subtitle: "Your private AI workspace is taking shape.",
- };
- }
+ const phaseIndex =
+ currentStepIndex < 2 ? 0 : currentStepIndex < 4 ? 1 : currentStepIndex < 6 ? 2 : 3;
+ const phaseMessage = INSTALL_PHASE_MESSAGES[phaseIndex];
+ if (rotationIndex === 0) return phaseMessage;
+
return {
- title: "Nearly done...",
- subtitle: "Finishing setup.",
+ title: phaseMessage.title,
+ subtitle:
+ INSTALL_WAITING_SUBTITLES[
+ normalizedRotationIndex(rotationIndex - 1, INSTALL_WAITING_SUBTITLES.length)
+ ],
};
}
@@ -40,6 +61,21 @@ export type StartupMessage =
| typeof MODELS_STARTUP_MESSAGE
| typeof SERVER_STARTUP_MESSAGE;
+const STARTUP_WAITING_MESSAGES = [
+ INITIAL_STARTUP_MESSAGE,
+ "Loading projects...",
+] as const;
+
+export function startupWaitingMessage(
+ phaseMessage: StartupMessage,
+ rotationIndex: number,
+): string {
+ if (phaseMessage !== INITIAL_STARTUP_MESSAGE) return phaseMessage;
+ return STARTUP_WAITING_MESSAGES[
+ normalizedRotationIndex(rotationIndex, STARTUP_WAITING_MESSAGES.length)
+ ];
+}
+
export function startupMessageFromLog(
current: StartupMessage,
line: string,
diff --git a/studio/frontend/src/components/tauri/startup-screen.tsx b/studio/frontend/src/components/tauri/startup-screen.tsx
index e4d1ccaa1d6..9d6842f18fb 100644
--- a/studio/frontend/src/components/tauri/startup-screen.tsx
+++ b/studio/frontend/src/components/tauri/startup-screen.tsx
@@ -2,13 +2,11 @@
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import {
- INITIAL_STARTUP_MESSAGE,
installProgressMessage,
- SERVER_STARTUP_MESSAGE,
- SERVER_START_FALLBACK_MS,
+ startupWaitingMessage,
+ STATUS_MESSAGE_ROTATION_MS,
type StartupMessage,
} from "@/components/tauri/startup-messages";
-import { ShimmerButton } from "@/components/ui/shimmer-button";
import { Spinner } from "@/components/ui/spinner";
import type { BackendStatus } from "@/hooks/use-tauri-backend";
import type { CopySupportDiagnosticsResult } from "@/lib/tauri-diagnostics";
@@ -169,19 +167,28 @@ function NotInstalledContent({ onInstall }: { onInstall: () => void }) {
>
To install Unsloth, click Get Started.
</p>
- <ShimmerButton
- onClick={onInstall}
- shimmerColor="#a7f3d0"
- background="oklch(0.696 0.17 162.48)"
- className="text-sm font-medium"
- >
+ <ActionButton onClick={onInstall}>
Get Started
- </ShimmerButton>
+ </ActionButton>
</div>
</div>
);
}
+function useRotatingMessageIndex(): number {
+ const [messageIndex, setMessageIndex] = useState(0);
+
+ useEffect(() => {
+ const interval = window.setInterval(
+ () => setMessageIndex((current) => current + 1),
+ STATUS_MESSAGE_ROTATION_MS,
+ );
+ return () => window.clearInterval(interval);
+ }, []);
+
+ return messageIndex;
+}
+
function InstallingContent({
logs,
currentStepIndex,
@@ -191,7 +198,8 @@ function InstallingContent({
currentStepIndex: number;
progressDetail: string | null;
}) {
- const message = installProgressMessage(currentStepIndex);
+ const messageIndex = useRotatingMessageIndex();
+ const message = installProgressMessage(currentStepIndex, messageIndex);
const detailLines = progressDetail
? [...logs, progressDetail]
: logs;
@@ -341,21 +349,8 @@ function NeedsElevationContent({
}
function StartingContent({ message }: { message: StartupMessage }) {
- const [showFallback, setShowFallback] = useState(false);
-
- useEffect(() => {
- if (message !== SERVER_STARTUP_MESSAGE) {
- return;
- }
-
- const fallback = window.setTimeout(
- () => setShowFallback(true),
- SERVER_START_FALLBACK_MS,
- );
- return () => window.clearTimeout(fallback);
- }, [message]);
-
- const displayMessage = showFallback ? INITIAL_STARTUP_MESSAGE : message;
+ const messageIndex = useRotatingMessageIndex();
+ const displayMessage = startupWaitingMessage(message, messageIndex);
return (
<div className="flex h-full flex-col items-center">
diff --git a/studio/frontend/src/components/tauri/window-titlebar.tsx b/studio/frontend/src/components/tauri/window-titlebar.tsx
index 09ca4ede71c..a5d0d56c7f9 100644
--- a/studio/frontend/src/components/tauri/window-titlebar.tsx
+++ b/studio/frontend/src/components/tauri/window-titlebar.tsx
@@ -144,7 +144,7 @@ export function DesktopTitlebarNavigation({
<HugeiconsIcon
icon={LayoutAlignLeftIcon}
strokeWidth={1.75}
- className="size-icon"
+ className="size-icon !size-[calc(var(--icon-size)+1px)]"
/>
</button>
) : (
@@ -165,7 +165,7 @@ export function DesktopTitlebarNavigation({
<ArrowLeft
aria-hidden="true"
strokeWidth={1.75}
- className="size-icon"
+ className="size-icon !size-[calc(var(--icon-size)+1px)]"
/>
</button>
<button
@@ -183,7 +183,7 @@ export function DesktopTitlebarNavigation({
<ArrowRight
aria-hidden="true"
strokeWidth={1.75}
- className="size-icon"
+ className="size-icon !size-[calc(var(--icon-size)+1px)]"
/>
</button>
</div>
diff --git a/studio/frontend/tests/mac-titlebar-optical-alignment.test.ts b/studio/frontend/tests/mac-titlebar-optical-alignment.test.ts
new file mode 100644
index 00000000000..33fd6ad335f
--- /dev/null
+++ b/studio/frontend/tests/mac-titlebar-optical-alignment.test.ts
@@ -0,0 +1,40 @@
+import assert from "node:assert/strict";
+import { readFile } from "node:fs/promises";
+import test from "node:test";
+
+const source = (path: string) =>
+ readFile(new URL(`../src/${path}`, import.meta.url), "utf8");
+
+test("mac titlebar navigation shifts buttons with centered glyphs", async () => {
+ const [titlebar, provider] = await Promise.all([
+ source("components/tauri/window-titlebar.tsx"),
+ source("app/provider.tsx"),
+ ]);
+ const macStyle = provider.match(
+ /const MAC_NATIVE_CHROME_STYLE = \{[\s\S]*?\} as CSSProperties;/,
+ )?.[0];
+ assert.ok(macStyle);
+ assert.match(macStyle, /"--studio-titlebar-navigation-offset-y": "4px"/);
+
+ const enlargedIconClass =
+ 'className="size-icon !size-[calc(var(--icon-size)+1px)]"';
+ assert.equal(titlebar.split(enlargedIconClass).length - 1, 3);
+});
+
+test("mac chat and media headers share the lowered control row", async () => {
+ const [provider, chat, images, video] = await Promise.all([
+ source("app/provider.tsx"),
+ source("features/chat/chat-page.tsx"),
+ source("features/images/images-page.tsx"),
+ source("features/video/video-page.tsx"),
+ ]);
+
+ const macStyle = provider.match(
+ /const MAC_NATIVE_CHROME_STYLE = \{[\s\S]*?\} as CSSProperties;/,
+ )?.[0];
+ assert.ok(macStyle);
+ assert.match(macStyle, /"--studio-chat-header-padding-top": "9px"/);
+ for (const page of [chat, images, video]) {
+ assert.match(page, /var\(--studio-chat-header-padding-top,/);
+ }
+});
diff --git a/studio/frontend/tests/startup-messages.test.ts b/studio/frontend/tests/startup-messages.test.ts
index 5227e2c61fd..c1b4054e3c1 100644
--- a/studio/frontend/tests/startup-messages.test.ts
+++ b/studio/frontend/tests/startup-messages.test.ts
@@ -4,8 +4,9 @@ import test from "node:test";
import {
INITIAL_STARTUP_MESSAGE,
installProgressMessage,
- SERVER_START_FALLBACK_MS,
+ STATUS_MESSAGE_ROTATION_MS,
startupMessageFromLog,
+ startupWaitingMessage,
} from "../src/components/tauri/startup-messages.ts";
test("startup messages follow backend phases without regressing", () => {
@@ -17,7 +18,7 @@ test("startup messages follow backend phases without regressing", () => {
assert.equal(startupMessageFromLog(models, "unrelated output"), models);
const server = startupMessageFromLog(models, " - Starting server...");
- assert.equal(server, "Starting server...");
+ assert.equal(server, "Nearly done...");
assert.equal(
startupMessageFromLog(
server,
@@ -27,18 +28,42 @@ test("startup messages follow backend phases without regressing", () => {
);
});
-test("installer progress uses friendly staged messages", () => {
- assert.deepEqual(installProgressMessage(-1), {
- title: "Getting things ready...",
- subtitle: "This won’t take long.",
- });
- assert.equal(installProgressMessage(2).title, "Preparing your workspace...");
- assert.equal(installProgressMessage(4).title, "Installing Unsloth...");
- assert.equal(installProgressMessage(6).title, "Nearly done...");
- assert.equal(installProgressMessage(999).title, "Nearly done...");
+test("installer progress rotates reassurance without changing actual phases", () => {
+ const expectedTitles = new Map([
+ [-1, "Preparing your workspace..."],
+ [2, "Downloading required components..."],
+ [4, "Installing Unsloth..."],
+ [6, "Finishing setup..."],
+ ]);
+
+ for (const [step, expectedTitle] of expectedTitles) {
+ const subtitles = new Set<string>();
+ for (let rotation = 0; rotation < 20; rotation += 1) {
+ const message = installProgressMessage(step, rotation);
+ assert.equal(message.title, expectedTitle);
+ subtitles.add(message.subtitle);
+ }
+ assert.ok(subtitles.size > 1, `step ${step} should rotate reassurance copy`);
+ }
+});
+
+test("startup copy rotates while preserving backend phase transitions", () => {
+ assert.equal(startupWaitingMessage(INITIAL_STARTUP_MESSAGE, 0), "Starting Unsloth...");
+ assert.equal(startupWaitingMessage(INITIAL_STARTUP_MESSAGE, 1), "Loading projects...");
+ assert.equal(startupWaitingMessage(INITIAL_STARTUP_MESSAGE, 2), "Starting Unsloth...");
});
+test("nearly done only appears after the backend starts its server", () => {
+ const models = startupMessageFromLog(
+ INITIAL_STARTUP_MESSAGE,
+ " - loading PyTorch, Unsloth and Transformers...",
+ );
+ const server = startupMessageFromLog(models, " - Starting server...");
+ assert.notEqual(startupWaitingMessage(INITIAL_STARTUP_MESSAGE, 20), "Nearly done...");
+ assert.notEqual(startupWaitingMessage(models, 20), "Nearly done...");
+ assert.equal(startupWaitingMessage(server, 20), "Nearly done...");
+});
-test("server fallback delay is three seconds", () => {
- assert.equal(SERVER_START_FALLBACK_MS, 3_000);
+test("status copy rotates every five seconds", () => {
+ assert.equal(STATUS_MESSAGE_ROTATION_MS, 5_000);
});