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: revamp the logs tab (#11508)

Maheswar Kumar870a4f706397
diff --git a/studio/frontend/src/features/settings/settings-search.ts b/studio/frontend/src/features/settings/settings-search.ts
index 289455cb40d..64e409b9faf 100644
--- a/studio/frontend/src/features/settings/settings-search.ts
+++ b/studio/frontend/src/features/settings/settings-search.ts
@@ -246,7 +246,6 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {
"settings.debugging.logSection",
"settings.debugging.source",
"settings.debugging.path",
- "settings.debugging.refreshSection",
"settings.debugging.mode",
"settings.debugging.keywords",
],
diff --git a/studio/frontend/src/features/settings/tabs/debugging-tab.tsx b/studio/frontend/src/features/settings/tabs/debugging-tab.tsx
index a05a1978dc0..c7e16e425ab 100644
--- a/studio/frontend/src/features/settings/tabs/debugging-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/debugging-tab.tsx
@@ -2,12 +2,45 @@
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import { Button } from "@/components/ui/button";
+import {
+ InputGroup,
+ InputGroupAddon,
+ InputGroupInput,
+} from "@/components/ui/input-group";
+import {
+ Select,
+ SelectContent,
+ SelectGroup,
+ SelectItem,
+ SelectLabel,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
import { useCopyFeedback } from "@/features/hub/hooks/use-copy-feedback";
+import { formatBytes } from "@/features/hub";
import { useT } from "@/i18n";
import { isTauri } from "@/lib/api-base";
import { stripAnsi } from "@/lib/strip-ansi";
import { toast } from "@/lib/toast";
-import { Tick02Icon } from "@hugeicons/core-free-icons";
+import { cn } from "@/lib/utils";
+import {
+ Alert02Icon,
+ ArrowDownDoubleIcon,
+ Copy01Icon,
+ Download01Icon,
+ FolderOpenIcon,
+ InformationCircleIcon,
+ RefreshIcon,
+ Search01Icon,
+ Shield01Icon,
+ TextWrapIcon,
+ Tick02Icon,
+} from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import {
@@ -44,6 +77,9 @@ const MODES: RefreshMode[] = ["live", "3s", "manual"];
// Slower than the poll: a directory walk rather than a tail read.
const SOURCE_RESCAN_MS = 10_000;
+// how close to the bottom the pane must be scrolled for auto-follow to stay on
+const FOLLOW_THRESHOLD_PX = 40;
+
function readStoredMode(): RefreshMode {
if (typeof window === "undefined") return DEFAULT_REFRESH_MODE;
try {
@@ -55,6 +91,49 @@ function readStoredMode(): RefreshMode {
}
}
+function groupByFamily(
+ sources: DebugLogSource[],
+): { family: string; sources: DebugLogSource[] }[] {
+ const groups = new Map<string, DebugLogSource[]>();
+ for (const source of sources) {
+ const group = groups.get(source.family);
+ if (group) group.push(source);
+ else groups.set(source.family, [source]);
+ }
+ return [...groups].map(([family, members]) => ({ family, sources: members }));
+}
+
+function NoticeStrip({
+ tone,
+ children,
+ testId,
+}: {
+ tone: "warning" | "info";
+ children: string;
+ testId?: string;
+}) {
+ return (
+ <p
+ data-testid={testId}
+ className={cn(
+ "flex items-start gap-2 text-xs leading-snug",
+ tone === "warning"
+ ? "text-amber-600 dark:text-amber-400"
+ : "text-muted-foreground",
+ )}
+ >
+ {tone === "warning" ? (
+ <HugeiconsIcon
+ strokeWidth={1.75}
+ icon={Alert02Icon}
+ className="mt-px size-3.5 shrink-0"
+ />
+ ) : null}
+ {children}
+ </p>
+ );
+}
+
export function DebuggingTab() {
const t = useT();
const [sources, setSources] = useState<DebugLogSource[]>([]);
@@ -77,7 +156,13 @@ export function DebuggingTab() {
// not lock out "Show in folder", which is how the user reaches the result.
const [exporting, setExporting] = useState(false);
const [revealing, setRevealing] = useState(false);
+ const [filter, setFilter] = useState("");
+ const [wrap, setWrap] = useState(true);
+ // mirrors pinnedRef for the jump-to-latest button; the ref stays the source of
+ // truth so the scroll handler does not re-render the pane on every line
+ const [following, setFollowing] = useState(true);
const { copied, copy } = useCopyFeedback();
+ const { copied: pathCopied, copy: copyPath } = useCopyFeedback();
// In a ref as well as state: the poll loop must not restart per line arrived.
const cursorRef = useRef<string | null>(null);
@@ -265,23 +350,47 @@ export function DebuggingTab() {
};
}, [mode, poll, rescanSourcesIfStale]);
- const text = useMemo(
- () => stripAnsi(buffer.lines.join("\n")),
- [buffer.lines],
+ // stripped once per line so the filter matches exactly what the pane shows
+ const plainLines = useMemo(() => buffer.lines.map(stripAnsi), [buffer.lines]);
+ const trimmedFilter = filter.trim().toLowerCase();
+ const visibleLines = useMemo(
+ () =>
+ trimmedFilter
+ ? plainLines.filter((line) =>
+ line.toLowerCase().includes(trimmedFilter),
+ )
+ : plainLines,
+ [plainLines, trimmedFilter],
);
+ const text = useMemo(() => visibleLines.join("\n"), [visibleLines]);
+
+ const scrollToBottom = useCallback(() => {
+ const pane = paneRef.current;
+ if (!pane) return;
+ pane.scrollTop = pane.scrollHeight;
+ pinnedRef.current = true;
+ setFollowing(true);
+ }, []);
+
+ // wrap changes the scroll height without changing the text, so it re-pins too
useEffect(() => {
const pane = paneRef.current;
if (pane && pinnedRef.current) pane.scrollTop = pane.scrollHeight;
- }, [text]);
+ }, [text, wrap]);
const onScroll = useCallback(() => {
const pane = paneRef.current;
if (!pane) return;
// Stop chasing the bottom once the user scrolls up, so a traceback stays
// readable while the app keeps logging.
- pinnedRef.current =
- pane.scrollHeight - pane.scrollTop - pane.clientHeight < 40;
+ const pinned =
+ pane.scrollHeight - pane.scrollTop - pane.clientHeight <
+ FOLLOW_THRESHOLD_PX;
+ if (pinned !== pinnedRef.current) {
+ pinnedRef.current = pinned;
+ setFollowing(pinned);
+ }
}, []);
const revealLogsFolder = useCallback(async () => {
@@ -343,6 +452,18 @@ export function DebuggingTab() {
}
}, [t]);
+ const groupedSources = useMemo(() => groupByFamily(sources), [sources]);
+ // the selected file's path, else the log root the footer falls back to showing
+ const shownPath = realpath ?? logRoot;
+ const modeLabel = (candidate: RefreshMode) =>
+ t(
+ candidate === "live"
+ ? "settings.debugging.modeLive"
+ : candidate === "3s"
+ ? "settings.debugging.modeInterval"
+ : "settings.debugging.modeManual",
+ );
+
return (
<div className="flex flex-col gap-6">
<SettingsSection
@@ -350,66 +471,79 @@ export function DebuggingTab() {
description={t("settings.debugging.sourceHint")}
>
<SettingsRow label={t("settings.debugging.source")}>
- <select
- data-testid="debug-log-source"
- className="max-w-[22rem] rounded-md border border-border/60 bg-background px-2 py-1 text-xs"
+ <Select
value={sourceId ?? ""}
- onChange={(event) => setSourceId(event.target.value || null)}
+ onValueChange={(value) => setSourceId(value || null)}
+ disabled={sources.length === 0}
>
- {sources.map((source) => (
- <option key={source.id} value={source.id}>
- {source.family} / {source.label}
- {source.isCurrent ? " *" : ""}
- </option>
- ))}
- </select>
- </SettingsRow>
- <SettingsRow label={t("settings.debugging.path")} alignTop={true}>
- <div className="flex items-center gap-2">
- <code className="max-w-[22rem] truncate text-ui-11 text-muted-foreground">
- {realpath ?? "-"}
- </code>
- <Button
+ <SelectTrigger
size="sm"
- variant="ghost"
- disabled={!realpath}
- onClick={() => realpath && copy(realpath)}
+ data-testid="debug-log-source"
+ aria-label={t("settings.debugging.source")}
+ className="max-w-[22rem] font-mono text-ui-12"
>
- {copied ? (
- <HugeiconsIcon icon={Tick02Icon} className="size-3.5" />
- ) : (
- t("settings.debugging.pathCopy")
- )}
- </Button>
- </div>
+ <SelectValue placeholder={t("settings.debugging.missing")} />
+ </SelectTrigger>
+ <SelectContent align="end">
+ {groupedSources.map((group) => (
+ <SelectGroup key={group.family}>
+ <SelectLabel className="font-mono uppercase tracking-wide text-ui-10">
+ {group.family}
+ </SelectLabel>
+ {group.sources.map((source) => (
+ <SelectItem
+ key={source.id}
+ value={source.id}
+ className="font-mono text-ui-12"
+ >
+ <span className="flex items-center gap-2">
+ <span>{source.label}</span>
+ {source.isCurrent ? (
+ <span className="rounded-full bg-primary/10 px-1.5 py-px font-sans text-ui-10 font-medium text-primary">
+ {t("settings.debugging.currentSession")}
+ </span>
+ ) : null}
+ <span className="font-sans text-ui-10 text-muted-foreground tabular-nums">
+ {formatBytes(source.sizeBytes)}
+ </span>
+ </span>
+ </SelectItem>
+ ))}
+ </SelectGroup>
+ ))}
+ </SelectContent>
+ </Select>
</SettingsRow>
- </SettingsSection>
-
- <SettingsSection title={t("settings.debugging.refreshSection")}>
<SettingsRow label={t("settings.debugging.mode")}>
<div className="flex items-center gap-2">
- <div className="flex overflow-hidden rounded-md border border-border/60">
- {MODES.map((candidate) => (
- <button
- key={candidate}
- type="button"
- data-testid={`debug-log-mode-${candidate}`}
- onClick={() => setMode(candidate)}
- className={
- candidate === mode
- ? "bg-primary px-2 py-1 text-ui-11 text-primary-foreground"
- : "px-2 py-1 text-ui-11 text-muted-foreground"
- }
- >
- {t(
- candidate === "live"
- ? "settings.debugging.modeLive"
- : candidate === "3s"
- ? "settings.debugging.modeInterval"
- : "settings.debugging.modeManual",
- )}
- </button>
- ))}
+ <div
+ role="radiogroup"
+ aria-label={t("settings.debugging.mode")}
+ className="hub-tab-toggle inline-flex h-8 items-center rounded-full"
+ >
+ {MODES.map((candidate) => {
+ const active = candidate === mode;
+ return (
+ <button
+ key={candidate}
+ type="button"
+ role="radio"
+ data-testid={`debug-log-mode-${candidate}`}
+ aria-checked={active}
+ onClick={() => setMode(candidate)}
+ className={cn(
+ "relative flex h-8 items-center rounded-full px-3 text-xs font-medium transition-colors",
+ active
+ ? "hub-tab-toggle-pill text-foreground"
+ : "text-muted-foreground hover:text-foreground",
+ )}
+ >
+ <span className="relative z-10">
+ {modeLabel(candidate)}
+ </span>
+ </button>
+ );
+ })}
</div>
<Button
size="sm"
@@ -420,54 +554,196 @@ export function DebuggingTab() {
void poll();
}}
>
+ <HugeiconsIcon strokeWidth={1.75} icon={RefreshIcon} />
{t("settings.debugging.refreshNow")}
</Button>
</div>
</SettingsRow>
</SettingsSection>
- <div className="flex flex-col gap-2">
- {notice ? (
- <p className="text-xs text-amber-500" data-testid="debug-log-notice">
- {notice}
- </p>
- ) : null}
- {dropped ? (
- <p className="text-xs text-amber-500">
- {t("settings.debugging.droppedNotice")}
- </p>
- ) : null}
- {morePending ? (
- <p className="text-xs text-muted-foreground">
- {t("settings.debugging.morePending")}
- </p>
- ) : null}
- {staleSession ? (
- <p className="text-xs text-amber-500">
- {t("settings.debugging.staleSession")}
- </p>
+ <div
+ data-settings-label={t("settings.debugging.path")}
+ className="flex flex-col gap-3"
+ >
+ <div className="flex flex-wrap items-center gap-2">
+ <InputGroup className="h-8 min-w-48 flex-1">
+ <InputGroupAddon align="inline-start">
+ <HugeiconsIcon
+ icon={Search01Icon}
+ strokeWidth={2}
+ className="size-3.5 text-muted-foreground"
+ />
+ </InputGroupAddon>
+ <InputGroupInput
+ type="search"
+ value={filter}
+ onChange={(event) => setFilter(event.target.value)}
+ placeholder={t("settings.debugging.filterPlaceholder")}
+ aria-label={t("settings.debugging.filterPlaceholder")}
+ data-testid="debug-log-filter"
+ className="text-sm"
+ />
+ </InputGroup>
+ <div className="ml-auto flex items-center gap-2">
+ <span
+ className="text-xs text-muted-foreground tabular-nums"
+ data-testid="debug-log-line-count"
+ >
+ {trimmedFilter
+ ? t("settings.debugging.filteredLineCount", {
+ shown: visibleLines.length,
+ total: buffer.lines.length,
+ })
+ : t("settings.debugging.lineCount", {
+ count: buffer.lines.length,
+ })}
+ </span>
+ {/* a failed read is explained by the notice below; a live chip beside it would contradict it */}
+ {notice ? null : (
+ <span
+ className={cn(
+ "inline-flex h-5 items-center gap-1.5 rounded-full px-2 text-xs font-medium",
+ staleSession
+ ? "bg-amber-500/10 text-amber-600 dark:text-amber-400"
+ : mode === "manual"
+ ? "bg-muted text-muted-foreground"
+ : "bg-primary/10 text-primary",
+ )}
+ >
+ <span
+ className={cn(
+ "size-1.5 rounded-full bg-current",
+ !staleSession &&
+ mode !== "manual" &&
+ "motion-safe:animate-pulse",
+ )}
+ />
+ {staleSession
+ ? t("settings.debugging.statusStale")
+ : mode === "manual"
+ ? t("settings.debugging.statusPaused")
+ : t("settings.debugging.statusLive")}
+ </span>
+ )}
+ <Tooltip>
+ <TooltipTrigger asChild={true}>
+ <Button
+ size="icon-sm"
+ variant="ghost"
+ aria-pressed={wrap}
+ aria-label={t("settings.debugging.wrapLines")}
+ onClick={() => setWrap((previous) => !previous)}
+ className={cn(
+ wrap ? "bg-muted text-foreground" : "text-muted-foreground",
+ )}
+ >
+ <HugeiconsIcon strokeWidth={1.75} icon={TextWrapIcon} />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>
+ {t("settings.debugging.wrapLines")}
+ </TooltipContent>
+ </Tooltip>
+ </div>
+ </div>
+
+ {notice || dropped || staleSession || morePending ? (
+ <div className="flex flex-col gap-1.5">
+ {notice ? (
+ <NoticeStrip tone="warning" testId="debug-log-notice">
+ {notice}
+ </NoticeStrip>
+ ) : null}
+ {dropped ? (
+ <NoticeStrip tone="warning">
+ {t("settings.debugging.droppedNotice")}
+ </NoticeStrip>
+ ) : null}
+ {staleSession ? (
+ <NoticeStrip tone="warning">
+ {t("settings.debugging.staleSession")}
+ </NoticeStrip>
+ ) : null}
+ {morePending ? (
+ <NoticeStrip tone="info">
+ {t("settings.debugging.morePending")}
+ </NoticeStrip>
+ ) : null}
+ </div>
) : null}
- {/* One text surface, not an element per line: this repaints on every
- poll and 1000 nodes per tick is what makes a log pane feel broken. */}
- <pre
- ref={paneRef}
- onScroll={onScroll}
- data-testid="debug-log-pane"
- className="h-72 w-full overflow-auto [overflow-anchor:none] whitespace-pre-wrap break-words rounded-lg border border-border/40 bg-black/85 p-3 font-mono text-ui-11 leading-[1.45] text-emerald-200/90"
- >
- {text || t("settings.debugging.empty")}
- </pre>
- <div className="flex items-center justify-between gap-2">
- <p className="text-xs text-muted-foreground">
- {t("settings.debugging.privacyNote")}
- </p>
- <div className="flex flex-wrap items-center justify-end gap-2">
+
+ <div className="relative">
+ {/* One text surface, not an element per line: this repaints on every
+ poll and 1000 nodes per tick is what makes a log pane feel broken. */}
+ <pre
+ ref={paneRef}
+ onScroll={onScroll}
+ data-testid="debug-log-pane"
+ className={cn(
+ "h-[min(26rem,45vh)] w-full overflow-auto [overflow-anchor:none] rounded-xl border border-border/60 bg-muted/20 px-3.5 py-3 font-mono text-ui-11 leading-[1.55] text-foreground/90 dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.04*var(--contrast-wash-gain,1)))]",
+ wrap ? "whitespace-pre-wrap break-words" : "whitespace-pre",
+ !text && "text-muted-foreground",
+ )}
+ >
+ {text ||
+ (trimmedFilter && buffer.lines.length > 0
+ ? t("settings.debugging.noMatches")
+ : t("settings.debugging.empty"))}
+ </pre>
+ {!following && text ? (
+ <Button
+ size="xs"
+ variant="dark"
+ onClick={scrollToBottom}
+ data-testid="debug-log-jump-to-latest"
+ className="absolute right-3 bottom-3 rounded-full shadow-md"
+ >
+ <HugeiconsIcon strokeWidth={1.75} icon={ArrowDownDoubleIcon} />
+ {t("settings.debugging.jumpToLatest")}
+ </Button>
+ ) : null}
+ </div>
+
+ <div className="flex flex-wrap items-center justify-between gap-x-4 gap-y-2">
+ <div className="flex min-w-0 flex-1 basis-48 items-center gap-1">
+ <code
+ className="min-w-0 truncate font-mono text-ui-11 text-muted-foreground"
+ title={shownPath ?? undefined}
+ >
+ {shownPath ?? "-"}
+ </code>
+ <Tooltip>
+ <TooltipTrigger asChild={true}>
+ <Button
+ size="icon-xs"
+ variant="ghost"
+ aria-label={t("settings.debugging.pathCopy")}
+ disabled={!shownPath}
+ onClick={() => shownPath && copyPath(shownPath)}
+ className="text-muted-foreground"
+ >
+ <HugeiconsIcon
+ strokeWidth={1.75}
+ icon={pathCopied ? Tick02Icon : Copy01Icon}
+ />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>
+ {t("settings.debugging.pathCopy")}
+ </TooltipContent>
+ </Tooltip>
+ </div>
+ <div className="flex shrink-0 flex-wrap items-center justify-end gap-1">
<Button
size="sm"
variant="ghost"
onClick={() => copy(text)}
disabled={!text}
>
+ <HugeiconsIcon
+ strokeWidth={1.75}
+ icon={copied ? Tick02Icon : Copy01Icon}
+ />
{t("settings.debugging.copyVisible")}
</Button>
<Button
@@ -478,10 +754,30 @@ export function DebuggingTab() {
disabled={exporting}
onClick={() => void downloadAllLogs()}
>
+ <HugeiconsIcon strokeWidth={1.75} icon={Download01Icon} />
{exporting
? t("settings.debugging.downloadingAllLogs")
: t("settings.debugging.downloadAllLogs")}
</Button>
+ <Tooltip>
+ <TooltipTrigger asChild={true}>
+ <button
+ type="button"
+ data-testid="debug-log-export-note"
+ aria-label={t("settings.debugging.exportMaskedNote")}
+ className="flex size-8 shrink-0 cursor-help items-center justify-center rounded-full text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
+ >
+ <HugeiconsIcon
+ strokeWidth={1.75}
+ icon={InformationCircleIcon}
+ className="size-[var(--ui-icon-size-sm)]"
+ />
+ </button>
+ </TooltipTrigger>
+ <TooltipContent className="max-w-[300px] text-ui-11 leading-snug">
+ {t("settings.debugging.exportMaskedNote")}
+ </TooltipContent>
+ </Tooltip>
{isTauri ? (
<Button
size="sm"
@@ -491,16 +787,20 @@ export function DebuggingTab() {
disabled={revealing}
onClick={() => void revealLogsFolder()}
>
+ <HugeiconsIcon strokeWidth={1.75} icon={FolderOpenIcon} />
{t("settings.debugging.openLogsFolder")}
</Button>
) : null}
</div>
</div>
- <p
- className="text-xs text-muted-foreground"
- data-testid="debug-log-export-note"
- >
- {t("settings.debugging.exportMaskedNote")}
+
+ <p className="flex items-center gap-2 text-xs text-muted-foreground">
+ <HugeiconsIcon
+ strokeWidth={1.75}
+ icon={Shield01Icon}
+ className="size-3.5 shrink-0"
+ />
+ {t("settings.debugging.privacyNote")}
</p>
</div>
</div>
diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.ts
index 303cff020b2..25ddc02079e 100644
--- a/studio/frontend/src/i18n/locales/ar.ts
+++ b/studio/frontend/src/i18n/locales/ar.ts
@@ -569,7 +569,16 @@ export const ar = {
sourceHint: "تكتب مشغّلات النماذج سجلاتها الخاصة، لذا غالبًا ما يكون سبب فشل التحميل أو التوليد موضّحًا فيها لا في سجل الخادم.",
path: "الموقع",
pathCopy: "نسخ المسار",
- refreshSection: "التحديث",
+ currentSession: "الحالي",
+ statusLive: "مباشر",
+ statusPaused: "متوقف مؤقتًا",
+ statusStale: "قديم",
+ filterPlaceholder: "تصفية الأسطر",
+ lineCount: "{count} سطر",
+ filteredLineCount: "{shown} من {total} سطر",
+ wrapLines: "التفاف الأسطر",
+ jumpToLatest: "الانتقال إلى الأحدث",
+ noMatches: "لا توجد أسطر تطابق عامل التصفية.",
mode: "الوضع",
modeLive: "مباشر",
modeInterval: "كل 3 ثوانٍ",
diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.ts
index ad5a7895249..c2d07611293 100644
--- a/studio/frontend/src/i18n/locales/de.ts
+++ b/studio/frontend/src/i18n/locales/de.ts
@@ -573,7 +573,16 @@ export const de = {
sourceHint: "Die Modell-Runner schreiben eigene Protokolle. Ein fehlgeschlagener Ladevorgang oder eine fehlgeschlagene Generierung wird deshalb oft dort erklärt und nicht im Server-Protokoll.",
path: "Speicherort",
pathCopy: "Pfad kopieren",
- refreshSection: "Aktualisierung",
+ currentSession: "Aktuell",
+ statusLive: "Live",
+ statusPaused: "Pausiert",
+ statusStale: "Veraltet",
+ filterPlaceholder: "Zeilen filtern",
+ lineCount: "{count} Zeilen",
+ filteredLineCount: "{shown} von {total} Zeilen",
+ wrapLines: "Zeilen umbrechen",
+ jumpToLatest: "Zum Ende springen",
+ noMatches: "Keine Zeilen passen zum Filter.",
mode: "Modus",
modeLive: "Live",
modeInterval: "Alle 3 Sekunden",
diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.ts
index a3be87924bd..2ab63548c75 100644
--- a/studio/frontend/src/i18n/locales/en.ts
+++ b/studio/frontend/src/i18n/locales/en.ts
@@ -574,7 +574,16 @@ export const en = {
sourceHint: "The model runners write their own logs, so a failed load or generation is often explained there rather than in the server log.",
path: "Location",
pathCopy: "Copy path",
- refreshSection: "Refresh",
+ currentSession: "Current",
+ statusLive: "Live",
+ statusPaused: "Paused",
+ statusStale: "Stale",
+ filterPlaceholder: "Filter lines",
+ lineCount: "{count} lines",
+ filteredLineCount: "{shown} of {total} lines",
+ wrapLines: "Wrap lines",
+ jumpToLatest: "Jump to latest",
+ noMatches: "No lines match the filter.",
mode: "Mode",
modeLive: "Live",
modeInterval: "Every 3 seconds",
diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.ts
index d8c0cbbdc5a..976f84ef0d2 100644
--- a/studio/frontend/src/i18n/locales/es.ts
+++ b/studio/frontend/src/i18n/locales/es.ts
@@ -572,7 +572,16 @@ export const es = {
sourceHint: "Los ejecutores de modelos escriben sus propios registros, así que un fallo al cargar o al generar suele explicarse ahí y no en el registro del servidor.",
path: "Ubicación",
pathCopy: "Copiar ruta",
- refreshSection: "Actualización",
+ currentSession: "Actual",
+ statusLive: "En vivo",
+ statusPaused: "En pausa",
+ statusStale: "Obsoleto",
+ filterPlaceholder: "Filtrar líneas",
+ lineCount: "{count} líneas",
+ filteredLineCount: "{shown} de {total} líneas",
+ wrapLines: "Ajustar líneas",
+ jumpToLatest: "Ir al final",
+ noMatches: "Ninguna línea coincide con el filtro.",
mode: "Modo",
modeLive: "En vivo",
modeInterval: "Cada 3 segundos",
diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.ts
index 10a830dcbb3..3f99ac814d9 100644
--- a/studio/frontend/src/i18n/locales/fr.ts
+++ b/studio/frontend/src/i18n/locales/fr.ts
@@ -573,7 +573,16 @@ export const fr = {
sourceHint: "Les exécuteurs de modèles écrivent leurs propres journaux : un chargement ou une génération en échec y est donc souvent expliqué plutôt que dans le journal du serveur.",
path: "Emplacement",
pathCopy: "Copier le chemin",
- refreshSection: "Actualisation",
+ currentSession: "Actuel",
+ statusLive: "En direct",
+ statusPaused: "En pause",
+ statusStale: "Obsolète",
+ filterPlaceholder: "Filtrer les lignes",
+ lineCount: "{count} lignes",
+ filteredLineCount: "{shown} sur {total} lignes",
+ wrapLines: "Retour à la ligne",
+ jumpToLatest: "Aller à la fin",
+ noMatches: "Aucune ligne ne correspond au filtre.",
mode: "Mode",
modeLive: "En direct",
modeInterval: "Toutes les 3 secondes",
diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.ts
index daeacca2e34..17afdb3f5b4 100644
--- a/studio/frontend/src/i18n/locales/hi.ts
+++ b/studio/frontend/src/i18n/locales/hi.ts
@@ -572,7 +572,16 @@ export const hi = {
sourceHint: "मॉडल रनर अपने अलग लॉग लिखते हैं, इसलिए लोड या जनरेशन विफल होने का कारण अक्सर सर्वर लॉग के बजाय वहीं मिलता है।",
path: "स्थान",
pathCopy: "पथ कॉपी करें",
- refreshSection: "रिफ़्रेश",
+ currentSession: "वर्तमान",
+ statusLive: "लाइव",
+ statusPaused: "रुका हुआ",
+ statusStale: "पुराना",
+ filterPlaceholder: "पंक्तियाँ फ़िल्टर करें",
+ lineCount: "{count} पंक्तियाँ",
+ filteredLineCount: "{total} में से {shown} पंक्तियाँ",
+ wrapLines: "पंक्तियाँ रैप करें",
+ jumpToLatest: "नवीनतम पर जाएँ",
+ noMatches: "फ़िल्टर से कोई पंक्ति मेल नहीं खाती।",
mode: "मोड",
modeLive: "लाइव",
modeInterval: "हर 3 सेकंड",
diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.ts
index d5869e5b578..bdaed25eedf 100644
--- a/studio/frontend/src/i18n/locales/it.ts
+++ b/studio/frontend/src/i18n/locales/it.ts
@@ -537,7 +537,16 @@ export const it = {
sourceHint: "I runner dei modelli scrivono i propri log, quindi un caricamento o una generazione non riusciti sono spesso spiegati lì anziché nel log del server.",
path: "Posizione",
pathCopy: "Copia il percorso",
- refreshSection: "Aggiornamento",
+ currentSession: "Attuale",
+ statusLive: "In diretta",
+ statusPaused: "In pausa",
+ statusStale: "Obsoleto",
+ filterPlaceholder: "Filtra righe",
+ lineCount: "{count} righe",
+ filteredLineCount: "{shown} di {total} righe",
+ wrapLines: "Righe a capo",
+ jumpToLatest: "Vai alla fine",
+ noMatches: "Nessuna riga corrisponde al filtro.",
mode: "Modalità",
modeLive: "In tempo reale",
modeInterval: "Ogni 3 secondi",
diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.ts
index a0e7520fec1..bcd578acf5a 100644
--- a/studio/frontend/src/i18n/locales/ja.ts
+++ b/studio/frontend/src/i18n/locales/ja.ts
@@ -571,7 +571,16 @@ export const ja = {
sourceHint: "モデルランナーはそれぞれ独自のログを書き出すため、読み込みや生成の失敗の理由は、サーバーログではなくそちらに記録されていることがよくあります。",
path: "場所",
pathCopy: "パスをコピー",
- refreshSection: "更新",
+ currentSession: "現在",
+ statusLive: "ライブ",
+ statusPaused: "一時停止",
+ statusStale: "古い",
+ filterPlaceholder: "行を絞り込む",
+ lineCount: "{count} 行",
+ filteredLineCount: "{total} 行中 {shown} 行",
+ wrapLines: "行を折り返す",
+ jumpToLatest: "最新へ移動",
+ noMatches: "フィルターに一致する行はありません。",
mode: "モード",
modeLive: "ライブ",
modeInterval: "3 秒ごと",
diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.ts
index 1a5084c62c1..d8e58558962 100644
--- a/studio/frontend/src/i18n/locales/ko.ts
+++ b/studio/frontend/src/i18n/locales/ko.ts
@@ -569,7 +569,16 @@ export const ko = {
sourceHint: "모델 러너는 각자 자체 로그를 기록하므로, 로드나 생성이 실패한 이유는 서버 로그가 아니라 그쪽에 남아 있는 경우가 많습니다.",
path: "위치",
pathCopy: "경로 복사",
- refreshSection: "새로 고침",
+ currentSession: "현재",
+ statusLive: "실시간",
+ statusPaused: "일시 중지",
+ statusStale: "오래됨",
+ filterPlaceholder: "줄 필터",
+ lineCount: "{count}줄",
+ filteredLineCount: "{total}줄 중 {shown}줄",
+ wrapLines: "줄 바꿈",
+ jumpToLatest: "최신으로 이동",
+ noMatches: "필터와 일치하는 줄이 없습니다.",
mode: "모드",
modeLive: "실시간",
modeInterval: "3초마다",
diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.ts
index c380f226691..bfa737ea368 100644
--- a/studio/frontend/src/i18n/locales/pt-br.ts
+++ b/studio/frontend/src/i18n/locales/pt-br.ts
@@ -571,7 +571,16 @@ export const ptBR = {
sourceHint: "Os executores de modelos gravam os próprios logs, então uma falha ao carregar ou ao gerar costuma ser explicada ali, e não no log do servidor.",
path: "Local",
pathCopy: "Copiar caminho",
- refreshSection: "Atualização",
+ currentSession: "Atual",
+ statusLive: "Ao vivo",
+ statusPaused: "Pausado",
+ statusStale: "Desatualizado",
+ filterPlaceholder: "Filtrar linhas",
+ lineCount: "{count} linhas",
+ filteredLineCount: "{shown} de {total} linhas",
+ wrapLines: "Quebrar linhas",
+ jumpToLatest: "Ir para o fim",
+ noMatches: "Nenhuma linha corresponde ao filtro.",
mode: "Modo",
modeLive: "Ao vivo",
modeInterval: "A cada 3 segundos",
diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.ts
index e8936d00c69..285d2a7c753 100644
--- a/studio/frontend/src/i18n/locales/ru.ts
+++ b/studio/frontend/src/i18n/locales/ru.ts
@@ -571,7 +571,16 @@ export const ru = {
sourceHint: "Средства запуска моделей ведут собственные журналы, поэтому причина неудачной загрузки или генерации чаще всего указана именно в них, а не в журнале сервера.",
path: "Расположение",
pathCopy: "Копировать путь",
- refreshSection: "Обновление",
+ currentSession: "Текущий",
+ statusLive: "В реальном времени",
+ statusPaused: "Пауза",
+ statusStale: "Устарел",
+ filterPlaceholder: "Фильтр строк",
+ lineCount: "Строк: {count}",
+ filteredLineCount: "{shown} из {total} строк",
+ wrapLines: "Перенос строк",
+ jumpToLatest: "К последним",
+ noMatches: "Ни одна строка не соответствует фильтру.",
mode: "Режим",
modeLive: "В реальном времени",
modeInterval: "Каждые 3 секунды",
diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.ts
index f8e4fb0c5bd..b5d398a36aa 100644
--- a/studio/frontend/src/i18n/locales/zh-CN.ts
+++ b/studio/frontend/src/i18n/locales/zh-CN.ts
@@ -567,7 +567,16 @@ export const zhCN = {
sourceHint: "模型运行器会各自写入日志,因此加载或生成失败的原因通常记录在那里,而不是服务器日志中。",
path: "位置",
pathCopy: "复制路径",
- refreshSection: "刷新",
+ currentSession: "当前",
+ statusLive: "实时",
+ statusPaused: "已暂停",
+ statusStale: "已过期",
+ filterPlaceholder: "筛选行",
+ lineCount: "{count} 行",
+ filteredLineCount: "共 {total} 行,显示 {shown} 行",
+ wrapLines: "自动换行",
+ jumpToLatest: "跳到最新",
+ noMatches: "没有与筛选条件匹配的行。",
mode: "模式",
modeLive: "实时",
modeInterval: "每 3 秒",
diff --git a/studio/frontend/tests/debug-log-export.test.ts b/studio/frontend/tests/debug-log-export.test.ts
index ba2b51ce5c3..0266c841cf5 100644
--- a/studio/frontend/tests/debug-log-export.test.ts
+++ b/studio/frontend/tests/debug-log-export.test.ts
@@ -143,6 +143,9 @@ function makeWorld(options: {
toasts.push({ kind: "error", title, options: opts }),
};
+ const passthrough = (props: { children?: React.ReactNode }) =>
+ React.createElement(React.Fragment, null, props.children);
+
const { DebuggingTab } = loadWithStubs<typeof DebuggingTabModule>(TAB_URL, {
react: React,
"react/jsx-runtime": jsxRuntime,
@@ -161,14 +164,38 @@ function makeWorld(options: {
);
},
},
+ // pass-through wrappers: the markup around the buttons is not under test
+ "@/components/ui/input-group": {
+ InputGroup: passthrough,
+ InputGroupAddon: passthrough,
+ InputGroupInput: () => null,
+ },
+ "@/components/ui/select": {
+ Select: passthrough,
+ SelectContent: passthrough,
+ SelectGroup: passthrough,
+ SelectItem: passthrough,
+ SelectLabel: passthrough,
+ SelectTrigger: passthrough,
+ SelectValue: () => null,
+ },
+ "@/components/ui/tooltip": {
+ Tooltip: passthrough,
+ TooltipContent: () => null,
+ TooltipTrigger: passthrough,
+ },
"@/features/hub/hooks/use-copy-feedback": {
useCopyFeedback: () => ({ copied: false, copy: async () => {} }),
},
+ "@/features/hub": { formatBytes: (bytes: number) => `${bytes} B` },
"@/i18n": { useT: () => t },
"@/lib/api-base": apiStubs["@/lib/api-base"],
"@/lib/strip-ansi": { stripAnsi: (value: string) => value },
"@/lib/toast": { toast },
- "@hugeicons/core-free-icons": { Tick02Icon: {} },
+ "@/lib/utils": {
+ cn: (...parts: unknown[]) => parts.filter(Boolean).join(" "),
+ },
+ "@hugeicons/core-free-icons": new Proxy({}, { get: () => ({}) }),
"@hugeicons/react": { HugeiconsIcon: () => null },
"../api/debug-logs": api,
"../components/settings-row": {