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.

Desktop: move update controls to Settings > General (#7807)

oobabooga4bc460c3a762
diff --git a/studio/frontend/src/features/settings/components/desktop-update-control.tsx b/studio/frontend/src/features/settings/components/desktop-update-control.tsx
new file mode 100644
index 00000000000..46f42362282
--- /dev/null
+++ b/studio/frontend/src/features/settings/components/desktop-update-control.tsx
@@ -0,0 +1,105 @@
+// 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 { Button } from "@/components/ui/button";
+import { useTauriUpdateController } from "@/hooks/tauri-update-context";
+import { useT } from "@/i18n";
+import type { ReactElement } from "react";
+import { SettingsRow } from "./settings-row";
+
+function formatDesktopVersion(version: string): string {
+ return version.startsWith("v") ? version : `v${version}`;
+}
+
+/** Explains the automatic check, so the button does not read as the only path. */
+export function DesktopUpdateNote(): ReactElement | null {
+ const t = useT();
+ const update = useTauriUpdateController();
+ if (!update) return null;
+ return (
+ <p className="pb-1 text-xs text-muted-foreground leading-relaxed">
+ {t("settings.about.update.desktopManaged")}
+ </p>
+ );
+}
+
+// Lives in General, under the version rows it acts on: that is the tab the
+// settings dialog opens on. Desktop-only, outside Tauri there is no controller
+// in context and the row renders nothing.
+export function DesktopUpdateControl(): ReactElement | null {
+ const t = useT();
+ const update = useTauriUpdateController();
+ if (!update) return null;
+
+ const checking = update.status === "checking";
+ // A running install owns the update screen; no second "Update now".
+ const inFlight =
+ update.status === "updating-backend" ||
+ update.status === "downloading" ||
+ update.status === "installing";
+ const busy = checking || inFlight;
+ const available = update.info !== null && !checking;
+ const checkFailed = update.checkError !== null && !available;
+
+ let label: string;
+ let description: string;
+ if (checking) {
+ label = t("settings.about.update.desktopChecking");
+ description = t("settings.about.update.desktopCheckingDescription");
+ } else if (available && update.info) {
+ label = t("settings.about.update.desktopAvailable", {
+ version: formatDesktopVersion(update.info.version),
+ });
+ description = update.isExternalServer
+ ? t("settings.about.update.desktopExternalServer")
+ : update.updatePolicyMode === "manual_linux_package"
+ ? t("settings.about.update.desktopManualInstall")
+ : t("settings.about.update.desktopAvailableDescription");
+ } else if (checkFailed) {
+ label = t("settings.about.update.desktopCheckFailed");
+ // Keep the raw reason: failures can come from the network, HTTP response,
+ // release manifest, or updater itself.
+ description = update.checkError ?? label;
+ } else if (update.hasChecked) {
+ label = t("settings.about.update.desktopCurrent");
+ description = t("settings.about.update.desktopCurrentDescription");
+ } else {
+ label = t("settings.about.update.desktopReady");
+ description = t("settings.about.update.desktopReadyDescription");
+ }
+
+ const action = available
+ ? update.updatePolicyMode === "manual_linux_package"
+ ? t("settings.about.update.openReleasePage")
+ : t("settings.about.update.updateNow")
+ : checkFailed
+ ? t("settings.about.update.retryCheck")
+ : update.hasChecked
+ ? t("settings.about.update.checkAgain")
+ : t("settings.about.update.checkForUpdates");
+
+ return (
+ <SettingsRow
+ label={label}
+ description={<span aria-live="polite">{description}</span>}
+ >
+ {available && update.isExternalServer ? null : (
+ <Button
+ size="sm"
+ variant={available ? "default" : "outline"}
+ disabled={busy}
+ aria-busy={busy}
+ onClick={() => {
+ if (available) {
+ void update.installUpdate();
+ } else {
+ void update.checkForUpdate();
+ }
+ }}
+ >
+ {checking ? t("settings.about.update.checking") : action}
+ </Button>
+ )}
+ </SettingsRow>
+ );
+}
diff --git a/studio/frontend/src/features/settings/components/studio-version-section.tsx b/studio/frontend/src/features/settings/components/studio-version-section.tsx
index f25f22daa9c..8cb62709e42 100644
--- a/studio/frontend/src/features/settings/components/studio-version-section.tsx
+++ b/studio/frontend/src/features/settings/components/studio-version-section.tsx
@@ -4,6 +4,7 @@
import { getAuthToken, refreshSession } from "@/features/auth";
import { useT } from "@/i18n";
import { apiUrl } from "@/lib/api-base";
+import type { ReactNode } from "react";
import { useEffect, useState } from "react";
import { SettingsRow } from "./settings-row";
import { SettingsSection } from "./settings-section";
@@ -65,13 +66,16 @@ async function fetchStudioVersions(): Promise<StudioVersions> {
// Shared "Unsloth" version block, shown in both General and About. The About
// tab passes llamaCppVersion to surface the installed llama.cpp build alongside
-// the version rows; General omits it, so the row only shows on About.
+// the version rows; General omits it, so the row only shows on About. Children
+// are appended below the version rows, for controls that act on them.
export function StudioVersionSection({
llamaCppVersion,
desktopAppVersion,
+ children,
}: {
llamaCppVersion?: string | null;
desktopAppVersion?: string | null;
+ children?: ReactNode;
} = {}) {
const t = useT();
const [packageVersion, setPackageVersion] = useState("dev");
@@ -116,6 +120,7 @@ export function StudioVersionSection({
</code>
</SettingsRow>
) : null}
+ {children}
</SettingsSection>
);
}
diff --git a/studio/frontend/src/features/settings/components/update-studio-instructions.tsx b/studio/frontend/src/features/settings/components/update-studio-instructions.tsx
index a45edddd0c8..cf8d683c3ab 100644
--- a/studio/frontend/src/features/settings/components/update-studio-instructions.tsx
+++ b/studio/frontend/src/features/settings/components/update-studio-instructions.tsx
@@ -1,8 +1,6 @@
// 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 { Button } from "@/components/ui/button";
-import { useTauriUpdateController } from "@/hooks/tauri-update-context";
import { copyToClipboard } from "@/lib/copy-to-clipboard";
import { useT } from "@/i18n";
import { Tick02Icon } from "@/lib/tick-icon";
@@ -15,7 +13,6 @@ import { HugeiconsIcon } from "@hugeicons/react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
import type { ReactElement } from "react";
import { useEffect, useRef, useState } from "react";
-import { SettingsRow } from "./settings-row";
const STUDIO_INSTALL_UNIX_CMD =
"curl -fsSL https://unsloth.ai/install.sh | sh";
@@ -175,87 +172,6 @@ function UpdateDocsLinks(): ReactElement {
);
}
-function formatDesktopVersion(version: string): string {
- return version.startsWith("v") ? version : `v${version}`;
-}
-
-function DesktopUpdateControl(): ReactElement | null {
- const t = useT();
- const update = useTauriUpdateController();
- if (!update) return null;
-
- const checking = update.status === "checking";
- // A running install owns the update screen; no second "Update now".
- const inFlight =
- update.status === "updating-backend" ||
- update.status === "downloading" ||
- update.status === "installing";
- const busy = checking || inFlight;
- const available = update.info !== null && !checking;
- const checkFailed = update.checkError !== null && !available;
-
- let label: string;
- let description: string;
- if (checking) {
- label = t("settings.about.update.desktopChecking");
- description = t("settings.about.update.desktopCheckingDescription");
- } else if (available && update.info) {
- label = t("settings.about.update.desktopAvailable", {
- version: formatDesktopVersion(update.info.version),
- });
- description = update.isExternalServer
- ? t("settings.about.update.desktopExternalServer")
- : update.updatePolicyMode === "manual_linux_package"
- ? t("settings.about.update.desktopManualInstall")
- : t("settings.about.update.desktopAvailableDescription");
- } else if (checkFailed) {
- label = t("settings.about.update.desktopCheckFailed");
- // Keep the reason: it separates offline from a bad release manifest.
- description = `${t("settings.about.update.desktopCheckFailedDescription")} ${update.checkError}`;
- } else if (update.hasChecked) {
- label = t("settings.about.update.desktopCurrent");
- description = t("settings.about.update.desktopCurrentDescription");
- } else {
- label = t("settings.about.update.desktopReady");
- description = t("settings.about.update.desktopReadyDescription");
- }
-
- const action = available
- ? update.updatePolicyMode === "manual_linux_package"
- ? t("settings.about.update.openReleasePage")
- : t("settings.about.update.updateNow")
- : checkFailed
- ? t("settings.about.update.retryCheck")
- : update.hasChecked
- ? t("settings.about.update.checkAgain")
- : t("settings.about.update.checkForUpdates");
-
- return (
- <SettingsRow
- label={label}
- description={<span aria-live="polite">{description}</span>}
- >
- {available && update.isExternalServer ? null : (
- <Button
- size="sm"
- variant={available ? "default" : "outline"}
- disabled={busy}
- aria-busy={busy}
- onClick={() => {
- if (available) {
- void update.installUpdate();
- } else {
- void update.checkForUpdate();
- }
- }}
- >
- {checking ? t("settings.about.update.checking") : action}
- </Button>
- )}
- </SettingsRow>
- );
-}
-
function ShellToggleButton({
active,
label,
@@ -328,10 +244,8 @@ export function UpdateStudioInstructions({
{t("settings.about.update.title")}
</p>
) : null}
- <p className="text-xs text-muted-foreground leading-relaxed">
- {t("settings.about.update.desktopManaged")}
- </p>
- <DesktopUpdateControl />
+ {/* The check/update control and its explanation live in General, next
+ to the version rows, so there is exactly one place to update from. */}
<UpdateDocsLinks />
</div>
);
diff --git a/studio/frontend/src/features/settings/settings-dialog.tsx b/studio/frontend/src/features/settings/settings-dialog.tsx
index 68d9f2a87c3..af69182dbe5 100644
--- a/studio/frontend/src/features/settings/settings-dialog.tsx
+++ b/studio/frontend/src/features/settings/settings-dialog.tsx
@@ -9,8 +9,9 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { type TranslationKey, useT } from "@/i18n";
-import { cn } from "@/lib/utils";
+import { isTauri } from "@/lib/api-base";
import { MicIcon } from "@/lib/mic-icon";
+import { cn } from "@/lib/utils";
import {
BotIcon,
Cancel01Icon,
@@ -36,8 +37,8 @@ import {
useState,
} from "react";
import {
- SETTINGS_SEARCH_INDEX,
SETTINGS_SEARCH_KEYWORDS,
+ createSettingsSearchIndex,
} from "./settings-search";
import {
type SettingsTab,
@@ -118,6 +119,8 @@ const TABS: TabDef[] = [
{ id: "about", labelKey: "settings.tabs.about", icon: HelpCircleIcon },
];
+const SETTINGS_SEARCH_INDEX = createSettingsSearchIndex(isTauri);
+
function renderTab(tab: SettingsTab) {
switch (tab) {
case "general":
diff --git a/studio/frontend/src/features/settings/settings-search.ts b/studio/frontend/src/features/settings/settings-search.ts
index 035efae8118..a517bc4b856 100644
--- a/studio/frontend/src/features/settings/settings-search.ts
+++ b/studio/frontend/src/features/settings/settings-search.ts
@@ -157,6 +157,21 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {
],
};
+export function createSettingsSearchIndex(
+ desktop: boolean,
+): Record<SettingsTab, TranslationKey[]> {
+ if (!desktop) {
+ return SETTINGS_SEARCH_INDEX;
+ }
+ return {
+ ...SETTINGS_SEARCH_INDEX,
+ general: [...SETTINGS_SEARCH_INDEX.general, "settings.about.updates"],
+ about: SETTINGS_SEARCH_INDEX.about.filter(
+ (key) => key !== "settings.about.updates",
+ ),
+ };
+}
+
/**
* Extra terms a row matches on, beyond its own label. The value is a
* translation key holding space-separated synonyms; it is never rendered.
diff --git a/studio/frontend/src/features/settings/tabs/general-tab.tsx b/studio/frontend/src/features/settings/tabs/general-tab.tsx
index d7f6ea20b5d..b53e0de4669 100644
--- a/studio/frontend/src/features/settings/tabs/general-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/general-tab.tsx
@@ -54,6 +54,10 @@ import {
updateUploadLimitSettings,
} from "../api/upload-limit";
import { ChangePasswordDialog } from "../components/change-password-dialog";
+import {
+ DesktopUpdateControl,
+ DesktopUpdateNote,
+} from "../components/desktop-update-control";
import { EmbeddingModelCombobox } from "../components/embedding-model-combobox";
import { LanguageSelect } from "../components/language-select";
import { SettingsRow } from "../components/settings-row";
@@ -464,7 +468,16 @@ export function GeneralTab() {
</p>
</header>
- <StudioVersionSection />
+ {/* Desktop-only, and self-gating: outside the desktop app both render
+ nothing and the section keeps just the version rows. */}
+ <StudioVersionSection>
+ {isTauri ? (
+ <div data-settings-label={t("settings.about.updates")}>
+ <DesktopUpdateControl />
+ <DesktopUpdateNote />
+ </div>
+ ) : null}
+ </StudioVersionSection>
<SettingsSection title={t("settings.general.account")}>
<SettingsRow
diff --git a/studio/frontend/tests/settings-search.test.ts b/studio/frontend/tests/settings-search.test.ts
new file mode 100644
index 00000000000..fc658e7ea0e
--- /dev/null
+++ b/studio/frontend/tests/settings-search.test.ts
@@ -0,0 +1,23 @@
+// 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 { createSettingsSearchIndex } from "../src/features/settings/settings-search.ts";
+
+const UPDATE_ENTRY = "settings.about.updates";
+
+test("desktop update searches route to General", () => {
+ const index = createSettingsSearchIndex(true);
+
+ assert.ok(index.general.includes(UPDATE_ENTRY));
+ assert.ok(!index.about.includes(UPDATE_ENTRY));
+});
+
+test("browser update searches keep routing to About", () => {
+ const index = createSettingsSearchIndex(false);
+
+ assert.ok(!index.general.includes(UPDATE_ENTRY));
+ assert.ok(index.about.includes(UPDATE_ENTRY));
+});
diff --git a/tests/studio/test_desktop_reliability_frontend_contract.py b/tests/studio/test_desktop_reliability_frontend_contract.py
index a4c282ebbb5..3f48926d7ef 100644
--- a/tests/studio/test_desktop_reliability_frontend_contract.py
+++ b/tests/studio/test_desktop_reliability_frontend_contract.py
@@ -27,6 +27,8 @@ TAURI_MAIN = REPO / "studio/src-tauri/src/main.rs"
TAURI_UPDATE_CONTEXT = FRONTEND / "hooks/tauri-update-context.ts"
TAURI_UPDATE_HOOK = FRONTEND / "hooks/use-tauri-update.ts"
UPDATE_INSTRUCTIONS = FRONTEND / "features/settings/components/update-studio-instructions.tsx"
+DESKTOP_UPDATE_CONTROL = FRONTEND / "features/settings/components/desktop-update-control.tsx"
+GENERAL_SETTINGS = FRONTEND / "features/settings/tabs/general-tab.tsx"
DESKTOP_UPDATE_POLICY = REPO / "studio/src-tauri/src/desktop_update_policy.rs"
@@ -45,7 +47,7 @@ def test_desktop_update_offer_remains_actionable_from_settings():
provider = APP_PROVIDER.read_text(encoding = "utf-8")
context = TAURI_UPDATE_CONTEXT.read_text(encoding = "utf-8")
hook = TAURI_UPDATE_HOOK.read_text(encoding = "utf-8")
- settings = UPDATE_INSTRUCTIONS.read_text(encoding = "utf-8")
+ settings = DESKTOP_UPDATE_CONTROL.read_text(encoding = "utf-8")
assert "<TauriUpdateContext.Provider value={update}>" in provider
context_start = provider.index("<TauriUpdateContext.Provider value={update}>")
@@ -66,6 +68,13 @@ def test_desktop_update_offer_remains_actionable_from_settings():
assert "void update.checkForUpdate();" in settings
+def test_desktop_update_search_has_a_stable_general_tab_destination():
+ general = GENERAL_SETTINGS.read_text(encoding = "utf-8")
+
+ assert 'data-settings-label={t("settings.about.updates")}' in general
+ assert "<DesktopUpdateControl />" in general
+
+
def test_desktop_update_keeps_the_in_app_path_on_a_guessed_policy():
"""resolveUpdatePolicy fails safe to manual_linux_package on every platform.
@@ -94,7 +103,7 @@ def test_desktop_update_keeps_the_in_app_path_on_a_guessed_policy():
def test_settings_update_button_is_inert_while_an_install_runs():
- settings = UPDATE_INSTRUCTIONS.read_text(encoding = "utf-8")
+ settings = DESKTOP_UPDATE_CONTROL.read_text(encoding = "utf-8")
assert 'update.status === "updating-backend"' in settings
assert 'update.status === "downloading"' in settings
@@ -105,14 +114,16 @@ def test_settings_update_button_is_inert_while_an_install_runs():
def test_desktop_update_check_failures_are_retryable():
hook = TAURI_UPDATE_HOOK.read_text(encoding = "utf-8")
- settings = UPDATE_INSTRUCTIONS.read_text(encoding = "utf-8")
+ settings = DESKTOP_UPDATE_CONTROL.read_text(encoding = "utf-8")
policy = DESKTOP_UPDATE_POLICY.read_text(encoding = "utf-8")
assert "setCheckError(String(e));" in hook
assert "update.checkError !== null" in settings
assert 't("settings.about.update.retryCheck")' in settings
- # The reason must reach the user, not just the console.
- assert "${update.checkError}" in settings
+ # The reason must reach the user without guessing that every failure is
+ # caused by their network connection.
+ assert "description = update.checkError ?? label;" in settings
+ assert 't("settings.about.update.desktopCheckFailedDescription")' not in settings
assert "server returned HTTP {status}" in policy
request = policy.split("let response = client", 1)[1].split("let metadata", 1)[0]
assert ".map_err(" in request