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.

Studio: Install Training button in the Train hint and the Export banner (#14861)

Daniel Hand368a7b19d57
diff --git a/studio/frontend/scripts/check-bundle-budget.ts b/studio/frontend/scripts/check-bundle-budget.ts
index ea39bba36de..d0309de0a52 100644
--- a/studio/frontend/scripts/check-bundle-budget.ts
+++ b/studio/frontend/scripts/check-bundle-budget.ts
@@ -387,8 +387,10 @@ export const BUDGET = {
// at c5a9fe021: 6,912,687 B raw / 2,082,221 B transfer (Node 24, 97 chunks). Raised to that plus about 200 B.
// The MLX PLE and expert offload controls (#14326): +7,406 B raw / +2,073 B transfer, plus about 500 B raw
// (a CI build measured about 100 B over a local one). Raised by that.
- transferBytes: 2_084_696,
- rawBytes: 6_920_821,
+ // Install Training button under the greyed Train row's hint: +424 B raw / +141 B transfer against ee55c3c9a
+ // (6,920,512 -> 6,920,936 B raw, 2,084,382 -> 2,084,523 B transfer, Node 24, 97 chunks). Raised by that.
+ transferBytes: 2_084_837,
+ rawBytes: 6_921_245,
};
// The chunk count is reported but not budgeted. Splitting a page out of the entry raises it while lowering the
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsx
index dc64158d545..2981894a46e 100644
--- a/studio/frontend/src/components/app-sidebar.tsx
+++ b/studio/frontend/src/components/app-sidebar.tsx
@@ -363,6 +363,7 @@ type NavRowDef = {
pendingTooltip?: string;
// Greyed out but clickable: Train on an upgradable Chat only install opens the full install dialog.
dimmed?: boolean;
+ tooltipAction?: { label: string; onClick: () => void };
badge?: string;
onClick: () => void;
onIntent?: () => void;
@@ -643,6 +644,7 @@ function NavItem({
className,
spinner,
tooltip,
+ tooltipAction,
alwaysTooltip,
onIntent,
badge,
@@ -665,6 +667,7 @@ function NavItem({
testId?: string;
// Overrides the hover tooltip; explains why a disabled item is greyed out.
tooltip?: string;
+ tooltipAction?: { label: string; onClick: () => void };
// Show that tooltip on the expanded row too, not just the collapsed rail where it
// stands in for the hidden label.
alwaysTooltip?: boolean;
@@ -674,10 +677,25 @@ function NavItem({
// Wraps the row in a hover flyout that names it, so the label tooltip is dropped.
flyout?: (row: ReactNode) => ReactNode;
}) {
+ const rowTooltip =
+ tooltip && tooltipAction
+ ? {
+ className: "tooltip-compact",
+ children: (
+ <div className="flex flex-col items-start gap-1.5">
+ <span>{tooltip}</span>
+ <Button size="xs" onClick={tooltipAction.onClick}>
+ {tooltipAction.label}
+ </Button>
+ </div>
+ ),
+ }
+ : (tooltip ?? label);
const row = (
<div className="relative">
<SidebarMenuButton
- tooltip={flyout ? undefined : (tooltip ?? label)}
+ tooltip={flyout ? undefined : rowTooltip}
+ interactiveTooltip={Boolean(tooltip && tooltipAction)}
alwaysTooltip={alwaysTooltip && Boolean(tooltip)}
disabled={disabled}
onClick={onClick}
@@ -3417,8 +3435,11 @@ export function AppSidebar() {
disabled: chatOnlyMeasured && !fullInstall,
dimmed: chatOnlyMeasured && fullInstall !== null,
tooltip: fullInstall
- ? "Training is not installed. Click to install it (at least 5 GB of disk space)."
+ ? "Training is not installed. It needs at least 5 GB of disk space."
: trainDisabledHint,
+ tooltipAction: fullInstall
+ ? { label: "Install Training", onClick: () => setFullInstallOpen(true) }
+ : undefined,
spinner: trainingInProgress,
pending: capabilitiesUnknown,
pendingTooltip: t("shell.navigation.trainChecking"),
@@ -6172,6 +6193,7 @@ export function AppSidebar() {
}
disabled={rowState.disabled}
tooltip={rowState.tooltip}
+ tooltipAction={rowState.pending ? undefined : row.tooltipAction}
alwaysTooltip={rowState.pending || Boolean(row.dimmed)}
spinner={rowState.spinner}
testId={`nav-row-${id}`}
@@ -6369,7 +6391,12 @@ export function AppSidebar() {
active={row.active}
disabled={rowState.disabled}
dimmed={row.dimmed}
- tooltip={rowState.tooltip}
+ // A menu item holds no button, but selecting it runs the same action.
+ tooltip={
+ row.tooltipAction && !rowState.pending
+ ? `${rowState.tooltip} Click to install it.`
+ : rowState.tooltip
+ }
spinner={rowState.spinner}
onSelect={row.onClick}
onIntent={row.onIntent}
diff --git a/studio/frontend/src/components/ui/sidebar.tsx b/studio/frontend/src/components/ui/sidebar.tsx
index 9135ea78202..ec150f85244 100644
--- a/studio/frontend/src/components/ui/sidebar.tsx
+++ b/studio/frontend/src/components/ui/sidebar.tsx
@@ -784,6 +784,7 @@ function SidebarMenuButton({
size = "default",
tooltip,
alwaysTooltip = false,
+ interactiveTooltip = false,
className,
...props
}: React.ComponentProps<"button"> & {
@@ -792,6 +793,8 @@ function SidebarMenuButton({
tooltip?: string | React.ComponentProps<typeof TooltipContent>
/** Show the tooltip while expanded and enabled, not only on the collapsed rail. */
alwaysTooltip?: boolean
+ /** The tooltip holds a control, so the pointer must be able to move onto it. */
+ interactiveTooltip?: boolean
} & VariantProps<typeof sidebarMenuButtonVariants>) {
const Comp = asChild ? Slot.Root : "button"
const { isMobile, state } = useSidebar()
@@ -831,7 +834,7 @@ function SidebarMenuButton({
)
return (
- <Tooltip>
+ <Tooltip disableHoverableContent={interactiveTooltip ? false : undefined}>
<TooltipTrigger asChild>{trigger}</TooltipTrigger>
<TooltipContent
side="right"
diff --git a/studio/frontend/src/features/export/export-page.tsx b/studio/frontend/src/features/export/export-page.tsx
index 24eee0f7987..1f02a46fd61 100644
--- a/studio/frontend/src/features/export/export-page.tsx
+++ b/studio/frontend/src/features/export/export-page.tsx
@@ -50,6 +50,7 @@ import { GuidedTour, useGuidedTourController } from "@/features/tour";
import type { LocalModelInfo } from "@/features/training";
import { useDebouncedValue, useHfTokenValidation } from "@/hooks";
import { useFullInstallUpgrade } from "@/hooks/use-full-install-upgrade";
+import { FullInstallDialog } from "@/features/settings";
import { useHardwareInfo } from "@/hooks/use-hardware-info";
import { useT } from "@/i18n";
import { ChevronDownStandardIcon } from "@/lib/chevron-icons";
@@ -271,7 +272,9 @@ export function ExportPage() {
// Only gray out on an authoritative unsupported response; the backend supplies the reason.
const exportUnsupported =
hardware.loaded && hardware.exportSupported === false;
- const canUpgrade = useFullInstallUpgrade() !== null;
+ const fullInstall = useFullInstallUpgrade();
+ const canUpgrade = fullInstall !== null;
+ const [fullInstallOpen, setFullInstallOpen] = useState(false);
const exportUnsupportedMessage = exportUnsupportedText(
hardware.exportUnsupportedReason,
hardware.exportUnsupportedMessage,
@@ -1651,9 +1654,23 @@ export function ExportPage() {
<AlertTitle>Export unavailable</AlertTitle>
<AlertDescription>
{exportUnsupportedMessage}
+ {fullInstall && (
+ <div className="mt-2">
+ <Button size="xs" onClick={() => setFullInstallOpen(true)}>
+ Install Training
+ </Button>
+ </div>
+ )}
</AlertDescription>
</Alert>
)}
+ {fullInstall && (
+ <FullInstallDialog
+ open={fullInstallOpen}
+ onOpenChange={setFullInstallOpen}
+ onConfirm={() => void fullInstall.repairInstall()}
+ />
+ )}
<MethodPicker
value={exportMethod}
diff --git a/studio/frontend/tests/chat-only-full-install.test.ts b/studio/frontend/tests/chat-only-full-install.test.ts
index bba71cefbab..6bb258f5be0 100644
--- a/studio/frontend/tests/chat-only-full-install.test.ts
+++ b/studio/frontend/tests/chat-only-full-install.test.ts
@@ -108,3 +108,26 @@ test("the greyed Train row opens the full install dialog when the upgrade is off
assert.match(source, /<FullInstallDialog\s+open=\{fullInstallOpen\}/);
assert.match(en.settings.general.fullInstall.confirmDescription, /at least 5 GB of disk space/);
});
+
+test("the Train hint and the Export banner both carry an Install Training button", async () => {
+ const sidebar = await readSrcAsync("components/app-sidebar.tsx");
+ const row = /train: \{[\s\S]*?\n \},\n/.exec(sidebar);
+ assert.ok(row, "could not find the train nav row");
+ assert.match(
+ row[0],
+ /tooltipAction: fullInstall\s*\? \{ label: "Install Training", onClick: \(\) => setFullInstallOpen\(true\) \}\s*: undefined,/,
+ );
+ // The inline row renders it, and a still-spinning row never offers it.
+ assert.match(sidebar, /tooltipAction=\{rowState\.pending \? undefined : row\.tooltipAction\}/);
+ assert.match(sidebar, /<Button size="xs" onClick=\{tooltipAction\.onClick\}>/);
+ // The More flyout renders no button, so its title keeps the click guidance.
+ assert.match(sidebar, /row\.tooltipAction && !rowState\.pending\s*\? `\$\{rowState\.tooltip\} Click to install it\.`/);
+ // The nav provider disables hoverable tooltips; a tooltip with a button must opt back in.
+ assert.match(sidebar, /interactiveTooltip=\{Boolean\(tooltip && tooltipAction\)\}/);
+
+ const exportPage = await readSrcAsync("features/export/export-page.tsx");
+ const banner = /<AlertTitle>Export unavailable<\/AlertTitle>[\s\S]*?<\/Alert>/.exec(exportPage);
+ assert.ok(banner, "could not find the Export unavailable banner");
+ assert.match(banner[0], /\{fullInstall && \([\s\S]*?setFullInstallOpen\(true\)[\s\S]*?Install Training/);
+ assert.match(exportPage, /<FullInstallDialog\s+open=\{fullInstallOpen\}/);
+});
diff --git a/studio/frontend/tests/media-rail-workflows.test.ts b/studio/frontend/tests/media-rail-workflows.test.ts
index d4da8e0e28c..09d14a41e69 100644
--- a/studio/frontend/tests/media-rail-workflows.test.ts
+++ b/studio/frontend/tests/media-rail-workflows.test.ts
@@ -65,6 +65,7 @@ test("the rail flyout lists every workflow and greys out what the model cannot d
test("a row with a flyout drops its label tooltip, every other row keeps it", () => {
const nav = block(SIDEBAR, "function NavItem({", "const WORKFLOW_UNAVAILABLE");
- assert.match(nav, /tooltip=\{flyout \? undefined : \(tooltip \?\? label\)\}/);
+ assert.match(nav, /tooltip=\{flyout \? undefined : rowTooltip\}/);
+ assert.match(nav, /: \(tooltip \?\? label\);/);
assert.match(nav, /\{flyout \? flyout\(row\) : row\}/);
});