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.

feat: disable navbar navigation while training is active

imagineer99064cd56a21de
diff --git a/studio/frontend/src/components/navbar.tsx b/studio/frontend/src/components/navbar.tsx
index 6a8fd5d7caa..2828cb61f8f 100644
--- a/studio/frontend/src/components/navbar.tsx
+++ b/studio/frontend/src/components/navbar.tsx
@@ -21,6 +21,7 @@ import {
ZapIcon,
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
+import { useTrainingRuntimeStore } from "@/features/training";
import { Link, useRouterState } from "@tanstack/react-router";
import { AnimatePresence, motion } from "motion/react";
import { useState } from "react";
@@ -35,6 +36,7 @@ const NAV_ITEMS = [
export function Navbar() {
const pathname = useRouterState({ select: (s) => s.location.pathname });
+ const isTrainingRunning = useTrainingRuntimeStore((s) => s.isTrainingRunning);
const [logoHovered, setLogoHovered] = useState(false);
const [mobileOpen, setMobileOpen] = useState(false);
@@ -95,7 +97,9 @@ export function Navbar() {
>
{NAV_ITEMS.map((item) => {
const active = pathname === item.href;
- if (!item.enabled) {
+ const disabledByTraining =
+ isTrainingRunning && item.href !== "/studio";
+ if (!item.enabled || disabledByTraining) {
return (
<span
key={item.href}
@@ -230,6 +234,18 @@ export function Navbar() {
<div className="mt-6 flex flex-col gap-2">
{NAV_ITEMS.filter((item) => item.enabled).map((item) => {
const active = pathname === item.href;
+ const disabledByTraining =
+ isTrainingRunning && item.href !== "/studio";
+ if (disabledByTraining) {
+ return (
+ <span
+ key={item.href}
+ className="rounded-md border border-border px-3 py-2 text-sm font-medium text-muted-foreground/40 cursor-not-allowed"
+ >
+ {item.label}
+ </span>
+ );
+ }
return (
<Link
key={item.href}