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 UI polish: projects, API page, audio inputs, settings layout (#15080)

Michael Han76e94d5650e4
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsx
index 1f29b76527f..9950b644009 100644
--- a/studio/frontend/src/components/app-sidebar.tsx
+++ b/studio/frontend/src/components/app-sidebar.tsx
@@ -5753,6 +5753,19 @@ export function AppSidebar() {
P: RowMenuParts,
) {
const isProjectPinned = pinnedProjectIdSet.has(project.id);
+ // Read in full: the sidebar holds one page per folder, and none while it is collapsed.
+ const archiveProjectChats = async () => {
+ let all: SidebarItem[];
+ try {
+ all = await readAllSidebarRows(sidebarRowQuery({ projectId: project.id }));
+ } catch (err) {
+ toast.error(translate("settings.data.failedToArchiveChats"), {
+ description: err instanceof Error ? err.message : undefined,
+ });
+ return;
+ }
+ await archiveChatItems(all);
+ };
return (
<>
<P.Item onSelect={() => openProject(project.id)}>
@@ -5769,11 +5782,16 @@ export function AppSidebar() {
<HugeiconsIcon icon={Settings02Icon} strokeWidth={1.75} className="size-icon" />
<span>Edit</span>
</P.Item>
+ <P.Separator />
{renderSectionSubmenu(P, {
target: { projectIds: [project.id] },
current: pinnedProjectIdSet.has(project.id) ? null : sectionByProjectId[project.id] ?? null,
anyFiled: !pinnedProjectIdSet.has(project.id) && Boolean(sectionByProjectId[project.id]),
})}
+ <P.Item onSelect={() => void archiveProjectChats()}>
+ <HugeiconsIcon icon={Archive03Icon} strokeWidth={1.75} className="size-icon" />
+ <span>Archive chats</span>
+ </P.Item>
<P.Separator />
<P.Item
variant="destructive"
diff --git a/studio/frontend/src/components/assistant-ui/user-message-time.tsx b/studio/frontend/src/components/assistant-ui/user-message-time.tsx
index 1b8ac7ecc38..580557ee4b0 100644
--- a/studio/frontend/src/components/assistant-ui/user-message-time.tsx
+++ b/studio/frontend/src/components/assistant-ui/user-message-time.tsx
@@ -27,29 +27,32 @@ export const UserMessageTime: FC = () => {
});
// A button only so the keyboard reaches the tooltip. Clicking does nothing, so the
// cursor stays an arrow, even with pointer cursors on.
+ // The spacer takes the slack, so the tooltip opens only over the time itself.
return (
- <Tooltip>
- <TooltipTrigger asChild={true}>
- <button
- type="button"
- aria-label={fullDate}
- className="aui-user-message-time-trigger mr-2 h-8 min-w-8 flex-1 cursor-default! self-center rounded-full text-right text-ui-11p5 text-muted-foreground tabular-nums"
- >
- <time
- dateTime={date.toISOString()}
- className="aui-user-message-time block truncate select-none"
+ <div className="mr-2 flex min-w-8 flex-1 justify-end self-center">
+ <Tooltip>
+ <TooltipTrigger asChild={true}>
+ <button
+ type="button"
+ aria-label={fullDate}
+ className="aui-user-message-time-trigger h-8 min-w-0 max-w-full cursor-default! rounded-full text-right text-ui-11p5 text-muted-foreground tabular-nums"
>
- {formatMessageDate(createdAt, Date.now(), locale, {
- // Today reads as just the time.
- today: (time) => time,
- yesterday: (time) => t("common.yesterdayAt", { time }),
- })}
- </time>
- </button>
- </TooltipTrigger>
- <TooltipContent side="top" align="end">
- {fullDate}
- </TooltipContent>
- </Tooltip>
+ <time
+ dateTime={date.toISOString()}
+ className="aui-user-message-time block truncate select-none"
+ >
+ {formatMessageDate(createdAt, Date.now(), locale, {
+ // Today reads as just the time.
+ today: (time) => time,
+ yesterday: (time) => t("common.yesterdayAt", { time }),
+ })}
+ </time>
+ </button>
+ </TooltipTrigger>
+ <TooltipContent side="top" align="end">
+ {fullDate}
+ </TooltipContent>
+ </Tooltip>
+ </div>
);
};
diff --git a/studio/frontend/src/components/ui/info-hint.tsx b/studio/frontend/src/components/ui/info-hint.tsx
index 0b016266d95..5dc32d045d5 100644
--- a/studio/frontend/src/components/ui/info-hint.tsx
+++ b/studio/frontend/src/components/ui/info-hint.tsx
@@ -1,7 +1,7 @@
// 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 type { ReactNode } from "react";
+import { type ReactNode, useState } from "react";
import {
Tooltip,
@@ -13,11 +13,25 @@ import { HugeiconsIcon } from "@hugeicons/react";
/** Small "i" affordance that reveals a styled tooltip on hover/focus. The
* standard inline help control across the settings UI. */
-export function InfoHint({ children }: { children: ReactNode }) {
+export function InfoHint({
+ children,
+ side = "top",
+ hoverOnly = false,
+}: {
+ children: ReactNode;
+ side?: "top" | "right" | "bottom" | "left";
+ /** Hover only, so a click cannot leave it open; pair it with sr-only text. */
+ hoverOnly?: boolean;
+}) {
+ const [hovered, setHovered] = useState(false);
return (
- <Tooltip>
+ <Tooltip
+ {...(hoverOnly ? { open: hovered, onOpenChange: () => {} } : {})}
+ >
<TooltipTrigger asChild>
<button
+ onPointerEnter={hoverOnly ? () => setHovered(true) : undefined}
+ onPointerLeave={hoverOnly ? () => setHovered(false) : undefined}
type="button"
data-slot="info-hint"
aria-label="More info"
@@ -31,7 +45,7 @@ export function InfoHint({ children }: { children: ReactNode }) {
</button>
</TooltipTrigger>
<TooltipContent
- side="top"
+ side={side}
align="center"
sideOffset={6}
collisionPadding={12}
diff --git a/studio/frontend/src/features/api-monitor/api-monitor-page.tsx b/studio/frontend/src/features/api-monitor/api-monitor-page.tsx
index 5515beba759..49d0f8fa5ab 100644
--- a/studio/frontend/src/features/api-monitor/api-monitor-page.tsx
+++ b/studio/frontend/src/features/api-monitor/api-monitor-page.tsx
@@ -1306,12 +1306,12 @@ export function ApiMonitorPage(): ReactElement {
);
return (
- <main className="mx-auto flex w-full max-w-6xl 3xl:max-w-[calc(1440px*var(--ui-space-scale,1))] 4xl:max-w-[calc(1760px*var(--ui-space-scale,1))] flex-col gap-5 px-6 pb-10 pt-12 max-sm:px-4 max-sm:pt-8 font-heading sm:px-10">
+ <main className="mx-auto flex w-full max-w-6xl 3xl:max-w-[calc(1440px*var(--ui-space-scale,1))] 4xl:max-w-[calc(1760px*var(--ui-space-scale,1))] flex-col gap-5 px-6 pb-10 pt-12 max-sm:px-4 max-sm:pt-8 sm:px-10">
<GuidedTour {...tour.tourProps} />
<header className="flex flex-wrap items-end justify-between gap-4">
<div className="flex min-w-0 flex-col gap-1">
<div className="flex flex-wrap items-center gap-3">
- <h1 className="text-ui-30 font-semibold leading-[1.04] tracking-[-0.028em] text-foreground sm:text-ui-34">
+ <h1 className="font-heading text-ui-30 font-semibold leading-[1.04] tracking-[-0.028em] text-foreground sm:text-ui-34">
API
</h1>
<span
@@ -1344,12 +1344,12 @@ export function ApiMonitorPage(): ReactElement {
size="icon"
onClick={openApiSettings}
aria-label="API settings"
- className="size-10 rounded-full text-muted-foreground hover:bg-[color-mix(in_oklab,var(--foreground)_calc(10%*var(--contrast-wash-gain,1)),transparent)] hover:text-foreground dark:hover:bg-[color-mix(in_oklab,var(--foreground)_calc(14%*var(--contrast-wash-gain,1)),transparent)]"
+ className="size-8 rounded-full text-muted-foreground hover:bg-[color-mix(in_oklab,var(--foreground)_calc(10%*var(--contrast-wash-gain,1)),transparent)] hover:text-foreground dark:hover:bg-[color-mix(in_oklab,var(--foreground)_calc(14%*var(--contrast-wash-gain,1)),transparent)]"
>
<HugeiconsIcon
icon={Settings02Icon}
strokeWidth={1.75}
- className="size-5"
+ className="size-[calc(18px*var(--ui-space-scale,1))]"
/>
</Button>
</ToolbarTooltip>
@@ -1376,7 +1376,8 @@ export function ApiMonitorPage(): ReactElement {
</span>
<div className="flex min-w-0 flex-col">
<span className="text-ui-11 text-muted-foreground">Base URL</span>
- <div className="group/copy flex min-w-0 items-center gap-1">
+ {/* h-5: at the copy button's 28px the chip sat below the text. */}
+ <div className="group/copy flex h-5 min-w-0 items-center gap-1">
<span className="truncate font-mono text-ui-13 text-foreground">
{baseUrl}
</span>
@@ -1486,15 +1487,18 @@ export function ApiMonitorPage(): ReactElement {
</div>
) : (
<dl className="flex flex-wrap items-center gap-x-6 gap-y-2">
- <Fact label="Model" className="group/copy max-w-full">
+ <Fact label="Model" className="max-w-full">
{served.length === 1 ? (
<>
- <span className="truncate font-mono">{served[0].name}</span>
- <CopyButton
- value={served[0].name}
- label="Copy model name"
- revealOnHover={true}
- />
+ {/* Its own reveal group: hovering settings or code must not show Copy. */}
+ <span className="group/copy flex min-w-0 items-center gap-1">
+ <span className="truncate font-mono">{served[0].name}</span>
+ <CopyButton
+ value={served[0].name}
+ label="Copy model name"
+ revealOnHover={true}
+ />
+ </span>
{settingsButton(served[0])}
{exampleButton(served[0])}
</>
@@ -1698,7 +1702,7 @@ export function ApiMonitorPage(): ReactElement {
void clear();
}}
aria-label="Clear log"
- className="rounded-full"
+ className="rounded-full text-red-500/80 hover:text-red-500 dark:text-red-400/80 dark:hover:text-red-400"
>
<HugeiconsIcon
icon={Delete02Icon}
diff --git a/studio/frontend/src/features/api-monitor/components/api-model-load-controls.tsx b/studio/frontend/src/features/api-monitor/components/api-model-load-controls.tsx
index e5e18050514..f748cb698b6 100644
--- a/studio/frontend/src/features/api-monitor/components/api-model-load-controls.tsx
+++ b/studio/frontend/src/features/api-monitor/components/api-model-load-controls.tsx
@@ -473,9 +473,8 @@ export function ApiModelLoadControls({
placeholder="Load model"
open={selectorOpen && !unloading}
onOpenChange={setSelectorOpen}
- // Select trigger spacing (px-3.5) and a clear gap before the chevron, not the chat
- // header's tucked-in one.
- className="h-9 max-w-full rounded-full px-3.5 sm:max-w-[calc(28rem*var(--ui-space-scale,1))] [&>span:last-child]:ml-1"
+ className="h-9 max-w-full rounded-full bg-background px-3.5 sm:max-w-[calc(28rem*var(--ui-space-scale,1))] dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.06*var(--contrast-wash-gain,1)))] dark:hover:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))] [&>span:last-child]:ml-1"
+ triggerLabelClassName="font-sans text-sm leading-none"
contentClassName="max-sm:max-w-[calc(100vw-3rem)]"
/>
<ToolbarTooltip label={reloadTitle(lastLoadLabel, Boolean(activeModel))}>
diff --git a/studio/frontend/src/features/audio/audio-page.tsx b/studio/frontend/src/features/audio/audio-page.tsx
index 252b370a2f1..5190c6e4b23 100644
--- a/studio/frontend/src/features/audio/audio-page.tsx
+++ b/studio/frontend/src/features/audio/audio-page.tsx
@@ -2171,7 +2171,7 @@ export function AudioPage({
</div>
{mode === "speak" ? (
/* The scroll mask provides the fade; leave the footer unpainted to avoid dark-mode banding. */
- <div className="relative z-10 flex shrink-0 justify-center px-10 pt-0.5 pb-4">
+ <div className="relative z-10 flex shrink-0 justify-center px-10 pt-0.5 pb-3">
{ttsWorkflow === "edit" ? (
<EditFooter
busy={busy}
@@ -2250,7 +2250,7 @@ export function AudioPage({
)}
</div>
) : (
- <div className="relative z-10 flex shrink-0 justify-center px-10 pt-0.5 pb-4">
+ <div className="relative z-10 flex shrink-0 justify-center px-10 pt-0.5 pb-3">
<TranscribeFooter
busy={busy}
blocker={transcribeBlocker}
diff --git a/studio/frontend/src/features/audio/components/audio-source-input.tsx b/studio/frontend/src/features/audio/components/audio-source-input.tsx
index dabd89cd6f9..0ee50d91a0f 100644
--- a/studio/frontend/src/features/audio/components/audio-source-input.tsx
+++ b/studio/frontend/src/features/audio/components/audio-source-input.tsx
@@ -3,7 +3,7 @@
import { Button } from "@/components/ui/button";
import { Progress } from "@/components/ui/progress";
-import { PillTabs } from "@/features/model-picker/components/model-selector/pill-tabs";
+import { InfoHint } from "@/components/ui/info-hint";
import {
nativeAttachmentIntentToFile,
registerNativeAttachmentPath,
@@ -77,6 +77,55 @@ export interface AudioSourceInputHandle {
markExpired: () => void;
}
+/** The Library header's tabs, flat: no track, a grey pill for the active one. */
+function SourceTabs({
+ tabs,
+ value,
+ onValueChange,
+ ariaLabel,
+ disabled,
+}: {
+ tabs: { value: string; label: string }[];
+ value: string;
+ onValueChange: (value: SourceTab) => void;
+ ariaLabel: string;
+ disabled: boolean;
+}) {
+ return (
+ <div role="tablist" aria-label={ariaLabel} className="flex flex-wrap gap-1">
+ {tabs.map((tab, index) => (
+ <button
+ key={tab.value}
+ type="button"
+ role="tab"
+ aria-selected={value === tab.value}
+ tabIndex={value === tab.value ? 0 : -1}
+ disabled={disabled}
+ onKeyDown={(event) => {
+ if (event.key !== "ArrowRight" && event.key !== "ArrowLeft") return;
+ event.preventDefault();
+ const step = event.key === "ArrowRight" ? 1 : -1;
+ const next = (index + step + tabs.length) % tabs.length;
+ onValueChange(tabs[next].value as SourceTab);
+ event.currentTarget.parentElement
+ ?.querySelectorAll<HTMLElement>('button[role="tab"]')
+ .item(next)
+ ?.focus();
+ }}
+ onClick={() => onValueChange(tab.value as SourceTab)}
+ className={cn(
+ "flex h-7 shrink-0 items-center rounded-full px-2.5 text-ui-12p5 text-foreground/80 transition-colors hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",
+ value === tab.value &&
+ "bg-[color-mix(in_srgb,var(--foreground)_7%,var(--background))] font-medium text-foreground dark:bg-[color-mix(in_srgb,var(--card),white_8%)]",
+ )}
+ >
+ {tab.label}
+ </button>
+ ))}
+ </div>
+ );
+}
+
function AlertLine({ children }: { children: ReactNode }) {
return (
<p
@@ -214,19 +263,17 @@ export function AudioSourceInput({
const file = event.dataTransfer.files?.[0];
if (file) void source.pickFile(file);
}}
- className={cn(
- "corner-squircle grid gap-3 rounded-2xl bg-card p-4 ring-1 outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-ring",
- dragging
- ? "bg-accent ring-[color-mix(in_oklab,var(--foreground)_calc(40%*var(--contrast-edge-gain,1)),transparent)]"
- : "ring-[color-mix(in_oklab,var(--foreground)_calc(10%*var(--contrast-edge-gain,1)),transparent)]",
- )}
+ className="grid gap-2.5 rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
<div className="flex items-center justify-between gap-2">
- <span
- id={`${id}-label`}
- className="text-ui-13 font-medium text-foreground"
- >
- {label}
+ <span className="flex items-center gap-1">
+ <span
+ id={`${id}-label`}
+ className="text-ui-13 font-medium text-foreground"
+ >
+ {label}
+ </span>
+ {hint ? <InfoHint>{hint}</InfoHint> : null}
</span>
{showSelected ? (
<Button
@@ -373,14 +420,11 @@ export function AudioSourceInput({
</div>
) : null}
{tabs.length > 1 ? (
- <PillTabs
+ <SourceTabs
ariaLabel={`${label} source`}
value={recording ? "record" : tab}
- onValueChange={(next) => setTab(next as SourceTab)}
+ onValueChange={setTab}
disabled={disabled || recording}
- fit={true}
- compact={true}
- className="[&>button]:px-3"
tabs={tabs}
/>
) : null}
@@ -389,11 +433,14 @@ export function AudioSourceInput({
type="button"
disabled={disabled}
onClick={() => fileRef.current?.click()}
- className="flex min-h-[calc(88px*var(--ui-space-scale,1))] flex-col items-center justify-center gap-1 rounded-md border border-dashed border-border px-3 text-ui-12 text-muted-foreground transition-colors hover:border-[color-mix(in_oklab,var(--foreground)_calc(30%*var(--contrast-edge-gain,1)),transparent)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
+ className={cn(
+ "flex min-h-[calc(72px*var(--ui-space-scale,1))] flex-col items-center justify-center gap-1 rounded-xl border border-dashed border-border px-3 text-ui-12 text-muted-foreground transition-colors hover:border-[color-mix(in_oklab,var(--foreground)_calc(30%*var(--contrast-edge-gain,1)),transparent)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
+ dragging &&
+ "border-[color-mix(in_oklab,var(--foreground)_calc(40%*var(--contrast-edge-gain,1)),transparent)] bg-accent text-foreground",
+ )}
>
<HugeiconsIcon icon={PlusSignIcon} className="size-5" />
- <span>Drop an audio file here, or choose one</span>
- {hint ? <span className="text-ui-11p5">{hint}</span> : null}
+ <span>Drop audio or choose a file</span>
</button>
) : null}
{tab === "record" || recording ? (
diff --git a/studio/frontend/src/features/audio/pages/clone-page.tsx b/studio/frontend/src/features/audio/pages/clone-page.tsx
index c29fbf83b76..02cff408bc4 100644
--- a/studio/frontend/src/features/audio/pages/clone-page.tsx
+++ b/studio/frontend/src/features/audio/pages/clone-page.tsx
@@ -5,7 +5,7 @@ import { Button } from "@/components/ui/button";
import { Textarea } from "@/components/ui/textarea";
import type { ModelOption } from "@/features/model-picker/components/model-selector/types";
import { toast } from "@/lib/toast";
-import { FloppyDiskIcon, SpeechToTextIcon } from "@hugeicons/core-free-icons";
+import { SpeechToTextIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { type ComponentProps, useState } from "react";
import type { AudioGalleryClip } from "../api";
@@ -267,11 +267,10 @@ export function CloneFooter({
<Button
type="button"
variant="outline"
- className="h-11 px-5"
+ className="h-10 px-4 text-ui-13"
disabled={!canSave}
onClick={() => setSaving(true)}
>
- <HugeiconsIcon icon={FloppyDiskIcon} className="size-4" />
Save voice…
</Button>
)
diff --git a/studio/frontend/src/features/audio/pages/convert-page.tsx b/studio/frontend/src/features/audio/pages/convert-page.tsx
index 505afb8d5a1..41dc5b0999c 100644
--- a/studio/frontend/src/features/audio/pages/convert-page.tsx
+++ b/studio/frontend/src/features/audio/pages/convert-page.tsx
@@ -322,7 +322,7 @@ export function ConvertFooter({
? (convert.switchNotice?.before ?? null)
: null;
return (
- <div className="flex w-full flex-col items-center gap-1.5">
+ <div className="flex w-full max-w-sm flex-col items-center gap-1.5">
<TtsFooter
{...props}
prompt="convert"
diff --git a/studio/frontend/src/features/audio/pages/transcribe-page.tsx b/studio/frontend/src/features/audio/pages/transcribe-page.tsx
index 3880c78888c..415eb473d13 100644
--- a/studio/frontend/src/features/audio/pages/transcribe-page.tsx
+++ b/studio/frontend/src/features/audio/pages/transcribe-page.tsx
@@ -55,7 +55,11 @@ import { transcribeLanguageFor } from "../transcribe-languages";
import type { TranscriptExportFormat } from "../transcript-export";
import { formatTimestamp } from "../transcript-model";
import type { TranscriptProgress } from "../transcript-stream";
-import { GenerateActions, type GenerateBlocker } from "./tts-workspace";
+import {
+ BlockerNote,
+ GenerateActions,
+ type GenerateBlocker,
+} from "./tts-workspace";
// Radix Select cannot hold an empty value, so "detect" travels as this.
const AUTO = "__auto__";
@@ -479,7 +483,7 @@ export function TranscribeFooter({
) : null}
<div className="flex flex-wrap items-center justify-center gap-2">
<Button
- className="relative z-10 mx-auto h-11 px-8 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100"
+ className="relative z-10 mx-auto h-10 px-7 text-ui-13 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100"
onClick={running ? onStop : onTranscribe}
disabled={running ? stopping : busy !== null || blocker !== null}
variant={running ? "destructive" : "dark"}
@@ -505,13 +509,14 @@ export function TranscribeFooter({
)}
</Button>
</div>
- {(blocker || notice) && !running ? (
+ {blocker && !running ? (
+ <BlockerNote id="transcribe-blocker" blocker={blocker} />
+ ) : notice && !running ? (
<p
- id={blocker ? "transcribe-blocker" : "transcribe-notice"}
+ id="transcribe-notice"
className="text-center text-ui-11p5 leading-snug text-muted-foreground"
>
- {blocker ? blocker.reason : notice}
- <GenerateActions actions={blocker?.actions} />
+ {notice}
</p>
) : null}
</div>
diff --git a/studio/frontend/src/features/audio/pages/tts-workspace.tsx b/studio/frontend/src/features/audio/pages/tts-workspace.tsx
index e4e3a4b7a62..3aacf765112 100644
--- a/studio/frontend/src/features/audio/pages/tts-workspace.tsx
+++ b/studio/frontend/src/features/audio/pages/tts-workspace.tsx
@@ -9,7 +9,13 @@ import {
} from "@/components/gallery-item-menu";
import { StripDropLine } from "@/components/gallery-strip-reorder";
import { Button } from "@/components/ui/button";
-import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
+import { InfoHint } from "@/components/ui/info-hint";
import { Progress } from "@/components/ui/progress";
import { Spinner } from "@/components/ui/spinner";
import { Textarea } from "@/components/ui/textarea";
@@ -88,6 +94,63 @@ export function GenerateActions({ actions }: { actions?: GenerateAction[] }) {
);
}
+/** Under Generate: first fix as a link, the reason on a hint (and sr-only), the rest in a menu. */
+export function BlockerNote({
+ id,
+ blocker,
+}: {
+ id: string;
+ blocker: GenerateBlocker;
+}) {
+ const [first, ...rest] = blocker.actions ?? [];
+ if (!first) {
+ return (
+ <p id={id} className="text-center text-ui-11p5 leading-snug text-muted-foreground">
+ {blocker.reason}
+ </p>
+ );
+ }
+ return (
+ <p
+ id={id}
+ className="flex flex-wrap items-center justify-center gap-x-1.5 text-ui-11p5 leading-snug text-muted-foreground"
+ >
+ <span className="sr-only">{blocker.reason}</span>
+ <Button
+ type="button"
+ variant="link"
+ className="h-auto p-0 text-ui-11p5 font-medium text-foreground"
+ onClick={first.onClick}
+ >
+ {first.label}
+ </Button>
+ {rest.length > 0 ? (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild={true}>
+ <Button
+ type="button"
+ variant="link"
+ className="h-auto p-0 text-ui-11p5 text-muted-foreground hover:text-foreground"
+ >
+ or a suggestion
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="center">
+ {rest.map((action) => (
+ <DropdownMenuItem key={action.label} onSelect={action.onClick}>
+ {action.label.charAt(0).toUpperCase() + action.label.slice(1)}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ ) : null}
+ <InfoHint side="right" hoverOnly={true}>
+ {blocker.reason}
+ </InfoHint>
+ </p>
+ );
+}
+
export function TtsRailFields({
musicGeneration,
prompt,
@@ -373,7 +436,7 @@ export function TtsFooter({
{secondaryAction}
<Button
className={cn(
- "relative z-10 mx-auto h-11 px-8 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100",
+ "relative z-10 h-10 px-7 text-ui-13 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100",
// Same Stop as Images: outline, neutral hover. Destructive is for deleting, not for stopping.
generationPresentation && "hover:bg-muted dark:hover:bg-muted",
)}
@@ -414,13 +477,7 @@ export function TtsFooter({
</Button>
</div>
{blocker && !generationPresentation ? (
- <p
- id="audio-generate-blocker"
- className="text-center text-ui-11p5 leading-snug text-muted-foreground"
- >
- {blocker.reason}
- <GenerateActions actions={blocker.actions} />
- </p>
+ <BlockerNote id="audio-generate-blocker" blocker={blocker} />
) : error && !generationPresentation ? (
<p
role="alert"
diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsx
index e29f41bb193..ce484201259 100644
--- a/studio/frontend/src/features/chat/chat-page.tsx
+++ b/studio/frontend/src/features/chat/chat-page.tsx
@@ -4836,14 +4836,9 @@ export function ChatPage({
onOpenChange={setProjectPickerOpen}
/>
{currentProject && activeThreadId ? (
- <>
- <span className="shrink-0" aria-hidden={true}>
- /
- </span>
- <span className="min-w-0 truncate">
- {currentChatTitle ?? "New chat"}
- </span>
- </>
+ <span className="min-w-0 truncate">
+ {currentChatTitle ?? "New chat"}
+ </span>
) : null}
</nav>
)}
diff --git a/studio/frontend/src/features/chat/chat-settings-sheet.tsx b/studio/frontend/src/features/chat/chat-settings-sheet.tsx
index 74bbb46dd31..3f9d7b9c90a 100644
--- a/studio/frontend/src/features/chat/chat-settings-sheet.tsx
+++ b/studio/frontend/src/features/chat/chat-settings-sheet.tsx
@@ -1352,15 +1352,8 @@ export function ChatSettingsPanel({
type="button"
onClick={() => savePresetWithName(presetNameInput)}
disabled={!(settingsHydrated && presetSaveState.canSubmit)}
- variant={
- presetSaveState.isSaveReady ? "default" : "outline"
- }
+ variant={presetSaveState.isSaveReady ? "default" : "outline"}
size="sm"
- className={cn(
- "h-9 w-auto px-4 rounded-full text-ui-13 font-medium tracking-nav",
- presetSaveState.isSaveReady &&
- "bg-secondary text-secondary-foreground hover:bg-secondary/80",
- )}
title={presetSaveState.title}
aria-label={presetSaveState.title}
>
@@ -1370,9 +1363,9 @@ export function ChatSettingsPanel({
type="button"
onClick={() => deletePreset(activePreset)}
disabled={!(settingsHydrated && activeCustomPreset)}
- variant="destructive"
+ variant="ghost"
size="sm"
- className="h-9 w-auto px-4 rounded-full text-ui-13 font-medium tracking-nav text-muted-foreground"
+ className="text-muted-foreground hover:text-destructive"
title={
activeCustomPreset
? activeBuiltinPreset
diff --git a/studio/frontend/src/features/chat/components/edit-project-dialog.tsx b/studio/frontend/src/features/chat/components/edit-project-dialog.tsx
index e20a70c513a..f765867458e 100644
--- a/studio/frontend/src/features/chat/components/edit-project-dialog.tsx
+++ b/studio/frontend/src/features/chat/components/edit-project-dialog.tsx
@@ -152,7 +152,7 @@ export function EditProjectDialog({
}}
>
<DialogContent
- className="corner-squircle dialog-soft-surface gap-5 sm:max-w-lg"
+ className="corner-squircle dialog-soft-surface grid-cols-[minmax(0,1fr)] gap-5 sm:max-w-xl"
{...nameImeHandlers}
// Enter saves from the name field, which a multi-line instructions box cannot do; the
// chord saves from either. The menus and confirmations inside portal out of here, so
@@ -179,19 +179,13 @@ export function EditProjectDialog({
</DialogHeader>
{/* The same name field the create dialog uses. */}
<div className="flex items-stretch overflow-hidden rounded-full border border-border bg-background transition-colors focus-within:border-ring has-[input:disabled]:opacity-50 dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.06*var(--contrast-wash-gain,1)))]">
- <span className="flex w-10 shrink-0 items-center justify-center pl-1 text-muted-foreground">
+ <span className="flex shrink-0 items-center pl-5 text-muted-foreground">
<HugeiconsIcon
icon={Folder02Icon}
strokeWidth={1.75}
className="size-5"
/>
</span>
- {/* The rule that separates the icon from the field. The container drops its border in
- dark mode, where --border goes with it, so the rule carries its own tint there. */}
- <span
- aria-hidden="true"
- className="my-3 w-px bg-border dark:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))]"
- />
<input
value={name}
onChange={(e) => setName(e.target.value)}
@@ -216,7 +210,7 @@ export function EditProjectDialog({
maxLength={120}
placeholder="Project name"
aria-label="Project name"
- className="min-w-0 flex-1 bg-transparent py-4 pr-4 pl-2.5 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed"
+ className="min-w-0 flex-1 bg-transparent py-4 pr-4 pl-3.5 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed"
/>
</div>
<div className="flex flex-col gap-1.5">
diff --git a/studio/frontend/src/features/chat/components/new-project-dialog.tsx b/studio/frontend/src/features/chat/components/new-project-dialog.tsx
index e8986a496cb..63bec9513ec 100644
--- a/studio/frontend/src/features/chat/components/new-project-dialog.tsx
+++ b/studio/frontend/src/features/chat/components/new-project-dialog.tsx
@@ -217,20 +217,18 @@ export function NewProjectDialog({
close();
}}
>
- <DialogContent className="corner-squircle dialog-soft-surface gap-5 sm:max-w-lg">
+ <DialogContent className="corner-squircle dialog-soft-surface grid-cols-[minmax(0,1fr)] gap-5 sm:max-w-xl">
<DialogHeader>
<DialogTitle className="text-ui-21">{title}</DialogTitle>
</DialogHeader>
- {/* Name field: folder glyph in its own cell, divided from the input. */}
<div className="flex items-stretch overflow-hidden rounded-full border border-border bg-background transition-colors focus-within:border-ring has-[input:disabled]:opacity-50 dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.06*var(--contrast-wash-gain,1)))]">
- <span className="flex w-10 shrink-0 items-center justify-center pl-1 text-muted-foreground">
+ <span className="flex shrink-0 items-center pl-5 text-muted-foreground">
<HugeiconsIcon
icon={Folder02Icon}
strokeWidth={1.75}
className="size-5"
/>
</span>
- <span aria-hidden="true" className="my-3 w-px bg-border" />
<input
value={name}
onChange={(e) => setName(e.target.value)}
@@ -252,7 +250,7 @@ export function NewProjectDialog({
maxLength={120}
placeholder="Project name"
aria-label="Project name"
- className="min-w-0 flex-1 bg-transparent py-4 pr-4 pl-2.5 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed"
+ className="min-w-0 flex-1 bg-transparent py-4 pr-4 pl-3.5 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed"
/>
</div>
<WorkingFolderPicker
diff --git a/studio/frontend/src/features/chat/components/project-switcher.tsx b/studio/frontend/src/features/chat/components/project-switcher.tsx
index c019152c69e..5be58a0d99f 100644
--- a/studio/frontend/src/features/chat/components/project-switcher.tsx
+++ b/studio/frontend/src/features/chat/components/project-switcher.tsx
@@ -70,7 +70,7 @@ export function ProjectSwitcher({
? "Loading project"
: "Pick a project"
}
- className="-mx-1 flex h-[calc(34px*var(--ui-space-scale,1))] shrink-0 items-center gap-2 rounded-full pl-3 pr-2.5 transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
+ className="-mx-1 flex h-[calc(34px*var(--ui-space-scale,1))] shrink-0 items-center gap-2 rounded-[10px] pl-3 pr-2.5 transition-colors hover:bg-nav-surface-hover data-[state=open]:bg-nav-surface-hover focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
>
<HugeiconsIcon
icon={Folder01Icon}
@@ -97,7 +97,7 @@ export function ProjectSwitcher({
side="bottom"
align="start"
sideOffset={0}
- className="unsloth-plus-menu ring-0 min-w-56 max-w-72 font-heading"
+ className="min-w-56 max-w-72"
>
{/* Scroll the list here, not the container, so the rounded corners on
the scrollbar side are not squared off. */}
diff --git a/studio/frontend/src/features/chat/components/working-folder-picker.tsx b/studio/frontend/src/features/chat/components/working-folder-picker.tsx
index 22d88067ad1..a20fb2d7377 100644
--- a/studio/frontend/src/features/chat/components/working-folder-picker.tsx
+++ b/studio/frontend/src/features/chat/components/working-folder-picker.tsx
@@ -69,7 +69,7 @@ export function WorkingFolderPicker({
<p className="text-ui-13 text-muted-foreground">
Where code and file tools run for every chat in this project.
</p>
- <div className="flex min-w-0 items-center gap-2 rounded-full border border-border px-3 py-2">
+ <div className="flex min-w-0 items-center gap-2 rounded-full border border-border py-2 pr-2 pl-5">
<span
className="min-w-0 flex-1 truncate text-sm"
title={value ?? undefined}
@@ -81,6 +81,7 @@ export function WorkingFolderPicker({
type="button"
variant="ghost"
size="sm"
+ className="shrink-0"
disabled={disabled || picking}
onClick={() => void change(false)}
>
@@ -89,12 +90,13 @@ export function WorkingFolderPicker({
)}
<Button
type="button"
- variant="outline"
+ variant="dark"
size="sm"
+ className="shrink-0"
disabled={!available || disabled || picking}
onClick={() => void change(true)}
>
- {picking ? "Choosing…" : value ? "Change…" : "Choose folder…"}
+ {picking ? "Choosing…" : value ? "Change folder" : "Choose folder"}
</Button>
</div>
{(needsReselect || !available) && (
diff --git a/studio/frontend/src/features/chat/projects-page.tsx b/studio/frontend/src/features/chat/projects-page.tsx
index 1a827b40c56..9e85b517dc9 100644
--- a/studio/frontend/src/features/chat/projects-page.tsx
+++ b/studio/frontend/src/features/chat/projects-page.tsx
@@ -723,11 +723,6 @@ export function ProjectsPage() {
</div>
) : visibleProjects.length === 0 ? (
<div className="mt-16 flex flex-col items-center justify-center gap-2 text-center text-muted-foreground">
- <p className="text-sm">
- {projects.length === 0
- ? "No projects yet."
- : "No projects match your search."}
- </p>
{projects.length === 0 ? (
<>
<p className="max-w-sm text-sm">
@@ -739,14 +734,17 @@ export function ProjectsPage() {
className="mt-2 border-none bg-background shadow-[0_2px_8px_-2px_rgba(0,0,0,0.16)] dark:bg-card dark:shadow-none"
onClick={() => setCreating(true)}
>
- <HugeiconsIcon icon={PlusSignIcon} strokeWidth={1.75} className="size-icon" />
+ <HugeiconsIcon icon={Folder02Icon} strokeWidth={1.75} className="size-icon" />
Create your first project
</Button>
</>
) : (
- <Button variant="ghost" size="sm" onClick={() => setQuery("")}>
- Clear search
- </Button>
+ <>
+ <p className="text-sm">No projects match your search.</p>
+ <Button variant="ghost" size="sm" onClick={() => setQuery("")}>
+ Clear search
+ </Button>
+ </>
)}
</div>
) : (
diff --git a/studio/frontend/src/features/hub/hub.css b/studio/frontend/src/features/hub/hub.css
index fdc76ec910c..01b709ee329 100644
--- a/studio/frontend/src/features/hub/hub.css
+++ b/studio/frontend/src/features/hub/hub.css
@@ -800,6 +800,13 @@
background-color: color-mix(in srgb, var(--foreground) calc(5% * var(--contrast-wash-gain, 1)), var(--background));
}
+ /* Code box pills sit on the box, not the page: flat grey. */
+ html:not(.dark) .example-pills .hub-tab-toggle-pill,
+ html:not(.dark) .example-pills .hub-tab-toggle-pill:hover {
+ background-color: color-mix(in srgb, var(--foreground) calc(7% * var(--contrast-wash-gain, 1)), var(--background));
+ box-shadow: none;
+ }
+
/* The selected segment takes --accent, the app's one selection colour, so it
reads like every other lit row. As its own wash it was scaled by the wash
gain, which falls much further than the token does: at the bottom of the
diff --git a/studio/frontend/src/features/images/images-page.tsx b/studio/frontend/src/features/images/images-page.tsx
index 6b21c4c1efd..bd48692834b 100644
--- a/studio/frontend/src/features/images/images-page.tsx
+++ b/studio/frontend/src/features/images/images-page.tsx
@@ -24,7 +24,6 @@ import {
ArrowLeftRightIcon,
ArrowUpDownIcon,
Delete02Icon,
- DiceFaces03Icon,
Download01Icon,
Edit03Icon,
FolderAddIcon,
@@ -37,6 +36,7 @@ import {
SparklesIcon,
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";
+import { History as HistoryIcon, Shuffle } from "lucide-react";
import { MessageCircleIcon, TestTubeOutlineIcon } from "@/lib/hugeicons-derived";
import { MediaViewer } from "@/components/media-viewer";
import { shortPrompt } from "@/lib/prompt-text";
@@ -182,7 +182,6 @@ import { getHfToken, hfApiToken } from "@/features/hub/stores/hf-token-store";
import { formatBytes, formatEta } from "@/features/hub/lib/format";
import { OnDeviceFoldersDialog } from "@/features/hub/catalog/on-device-folders-dialog";
import { generatePhaseLabel, sameGenerateProgress } from "@/lib/media-generate-phase";
-import { Recycle } from "lucide-react";
import { NegativePromptField, PROMPT_BOX_CLASS } from "@/components/negative-prompt-field";
import {
ASPECT_RATIOS,
@@ -5209,12 +5208,11 @@ export function ImagesPage({
type="button"
variant="secondary"
size="sm"
- className="w-full"
+ className="w-fit self-start"
disabled={!initImage}
onClick={() => setReferenceImages((prev) => [...prev, ""])}
>
- <HugeiconsIcon icon={PlusSignIcon} className="size-3.5" />
- Add image {numberOf(referenceImages.length)}
+ Add image
</Button>
)}
</>
@@ -7262,30 +7260,31 @@ export function ImagesPage({
hint="Leave empty for a fresh random seed each run."
className="pt-2"
>
- <div className="flex items-center gap-1.5">
+ <div className="flex items-center gap-2">
<Input
placeholder="Random if empty"
value={seed}
onChange={(e) => setSeed(e.target.value)}
className="flex-1"
/>
+ <div className="flex shrink-0 items-center">
<Button
type="button"
variant="ghost"
size="icon"
- className="size-8 shrink-0"
+ className="size-9 rounded-full text-muted-foreground hover:text-foreground"
aria-label="Random seed"
title="Random seed each run"
disabled={seed === ""}
onClick={() => setSeed("")}
>
- <HugeiconsIcon icon={DiceFaces03Icon} className="size-4" />
+ <Shuffle className="size-4" strokeWidth={1.5} />
</Button>
<Button
type="button"
variant="ghost"
size="icon"
- className="size-8 shrink-0"
+ className="size-9 rounded-full text-muted-foreground hover:text-foreground"
aria-label="Reuse last seed"
title={lastSeed === null ? "No image generated yet" : `Reuse last seed (${lastSeed})`}
disabled={lastSeed === null}
@@ -7293,8 +7292,9 @@ export function ImagesPage({
if (lastSeed !== null) setSeed(String(lastSeed));
}}
>
- <Recycle className="size-4" strokeWidth={1.5} />
+ <HistoryIcon className="size-4" strokeWidth={1.5} />
</Button>
+ </div>
</div>
</Field>
@@ -7321,12 +7321,12 @@ export function ImagesPage({
</div>
{/* The scroll mask provides the fade; leave the footer unpainted to avoid dark-mode banding. */}
- <div className="relative z-10 flex shrink-0 flex-wrap justify-center gap-2 px-4 pt-0.5 pb-4">
+ <div className="relative z-10 flex shrink-0 flex-wrap justify-center gap-2 px-4 pt-0.5 pb-3">
{busy === "generating" ? (
/* Replaces Generate while a run is in flight. Every workflow funnels through the same
handler, so one control stops all of them. */
<Button
- className="relative z-10 h-11 px-8 hover:bg-muted dark:hover:bg-muted"
+ className="relative z-10 h-10 px-7 text-ui-13 hover:bg-muted dark:hover:bg-muted"
variant="outline"
onClick={handleCancelGenerate}
>
@@ -7336,7 +7336,7 @@ export function ImagesPage({
) : (
<>
<Button variant="dark"
- className="relative z-10 h-11 px-8 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100"
+ className="relative z-10 h-10 px-7 text-ui-13 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100"
onClick={handleGenerateWithRecall}
disabled={busy !== null || !imagePresets.hydrated || (!status?.loaded && !rememberedModel && !external)}
>
@@ -7348,7 +7348,7 @@ export function ImagesPage({
{/* A disabled button gets no pointer events; the span keeps the reason reachable. */}
<span className="relative z-10 inline-flex">
<Button
- className="h-11 px-5"
+ className="h-10 px-4 text-ui-13"
variant="secondary"
disabled={busy !== null || varyBlocked !== null}
onClick={handleVary}
@@ -7371,7 +7371,7 @@ export function ImagesPage({
<Tooltip>
<TooltipTrigger asChild={true}>
<Button
- className="relative z-10 h-11 px-5"
+ className="relative z-10 h-10 px-4 text-ui-13"
variant="secondary"
disabled={busy !== null}
onClick={handleReapply}
diff --git a/studio/frontend/src/features/model-picker/components/inference-engines.tsx b/studio/frontend/src/features/model-picker/components/inference-engines.tsx
index 83c36666358..69b028e2b60 100644
--- a/studio/frontend/src/features/model-picker/components/inference-engines.tsx
+++ b/studio/frontend/src/features/model-picker/components/inference-engines.tsx
@@ -268,11 +268,8 @@ export function InferenceEnginesSection() {
const engineNote = (engine: EngineStatus) =>
engine.unsupported_reason ||
(isOwner || engine.installed ? undefined : t("managedEngines.ownerRequired"));
- return (
- <SettingsSection
- title={t("managedEngines.title")}
- description={t("managedEngines.description")}
- >
+ const rows = (
+ <>
{error && <p role="alert">{error}</p>}
{engines.map((engine) => (
<SettingsRow
@@ -283,6 +280,14 @@ export function InferenceEnginesSection() {
<EngineInstall engine={engine} management={true} />
</SettingsRow>
))}
+ </>
+ );
+ return (
+ <SettingsSection
+ title={t("managedEngines.title")}
+ description={t("managedEngines.description")}
+ >
+ {rows}
</SettingsSection>
);
}
diff --git a/studio/frontend/src/features/rag/components/linked-folders-manager.tsx b/studio/frontend/src/features/rag/components/linked-folders-manager.tsx
index 4c73a844220..47918dc1486 100644
--- a/studio/frontend/src/features/rag/components/linked-folders-manager.tsx
+++ b/studio/frontend/src/features/rag/components/linked-folders-manager.tsx
@@ -25,7 +25,7 @@ import { cn } from "@/lib/utils";
import { isTauri } from "@/lib/api-base";
import { SOURCE_FOLDER_DESCRIPTION, sourceFolderUnavailableMessage } from "./source-folder-copy";
import { RefreshGlyph } from "@/lib/refresh-icon";
-import { FolderSyncIcon, PlusSignIcon } from "@hugeicons/core-free-icons";
+import { FolderAddIcon, FolderSyncIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { MoreHorizontalIcon } from "lucide-react";
import { useState } from "react";
@@ -288,7 +288,10 @@ export function LinkedFoldersManager({
className="size-4 shrink-0 text-muted-foreground"
/>
<div className="min-w-0 flex-1">
- <span className="block truncate text-sm">
+ <span
+ className="block truncate text-sm"
+ title={folder.displayName}
+ >
{folder.displayName}
</span>
{detail ? (
@@ -338,7 +341,7 @@ export function LinkedFoldersManager({
<Spinner className="size-4 shrink-0" />
) : (
<HugeiconsIcon
- icon={PlusSignIcon}
+ icon={FolderAddIcon}
strokeWidth={1.75}
className="size-4 shrink-0 text-muted-foreground"
/>
@@ -390,7 +393,7 @@ export function LinkedFoldersManager({
{manager.mutating ? (
<Spinner className="size-3.5" />
) : (
- <HugeiconsIcon icon={FolderSyncIcon} strokeWidth={1.75} className="size-3.5" />
+ <HugeiconsIcon icon={FolderAddIcon} strokeWidth={1.75} className="size-3.5" />
)}
Add folder
</Button>
@@ -403,7 +406,10 @@ export function LinkedFoldersManager({
</div>
) : manager.folders.length === 0 ? (
<div className="rounded-lg border border-dashed px-4 py-5 text-center text-xs text-muted-foreground">
- No source folders.
+ {/* The unscoped list has no Add: a folder is linked to one project or knowledge base. */}
+ {scope
+ ? "No source folders."
+ : "No source folders. Link one from a project or knowledge base."}
</div>
) : (
<ul className="flex flex-col gap-1.5">
diff --git a/studio/frontend/src/features/rag/components/project-folder-picker.tsx b/studio/frontend/src/features/rag/components/project-folder-picker.tsx
index c0559c85d5f..4e8b9e2fb41 100644
--- a/studio/frontend/src/features/rag/components/project-folder-picker.tsx
+++ b/studio/frontend/src/features/rag/components/project-folder-picker.tsx
@@ -12,8 +12,8 @@ import { toast } from "@/lib/toast";
import { cn } from "@/lib/utils";
import {
Cancel01Icon,
+ FolderAddIcon,
FolderSyncIcon,
- PlusSignIcon,
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import {
@@ -99,7 +99,7 @@ export function ProjectFolderPicker({
}
return (
- <div className="space-y-2.5">
+ <div className="min-w-0 space-y-2.5">
<p className="text-ui-15 font-medium text-foreground">Source folders</p>
<div className={FOLDER_CARD_CLASS}>
{folders.map((folder) => (
@@ -109,7 +109,10 @@ export function ProjectFolderPicker({
strokeWidth={1.75}
className="size-4 shrink-0 text-muted-foreground"
/>
- <span className="min-w-0 flex-1 truncate text-sm">
+ <span
+ className="min-w-0 flex-1 truncate text-sm"
+ title={folder.displayName}
+ >
{folder.displayName}
</span>
<Button
@@ -148,7 +151,7 @@ export function ProjectFolderPicker({
<Spinner className="size-4 shrink-0" />
) : (
<HugeiconsIcon
- icon={PlusSignIcon}
+ icon={FolderAddIcon}
strokeWidth={1.75}
className="size-4 shrink-0 text-muted-foreground"
/>
diff --git a/studio/frontend/src/features/rag/components/project-sources-panel.tsx b/studio/frontend/src/features/rag/components/project-sources-panel.tsx
index 2bf14b1216b..0e511bc86d8 100644
--- a/studio/frontend/src/features/rag/components/project-sources-panel.tsx
+++ b/studio/frontend/src/features/rag/components/project-sources-panel.tsx
@@ -8,7 +8,7 @@ import { isTauri } from "@/lib/api-base";
import { MAX_FOLDER_FILES, openFolderPicker } from "@/lib/dropped-folders";
import { toast } from "@/lib/toast";
import { cn } from "@/lib/utils";
-import { PlusSignIcon } from "@hugeicons/core-free-icons";
+import { FolderAddIcon, PlusSignIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { useCallback, useMemo, useRef } from "react";
import {
@@ -167,7 +167,7 @@ export function ProjectSourcesPanel({ projectId }: { projectId: string }) {
onClick={pickFolder}
title="Upload every supported file in a folder. Linking a folder that stays in sync needs the desktop app."
>
- <HugeiconsIcon icon={PlusSignIcon} data-icon="inline-start" />
+ <HugeiconsIcon icon={FolderAddIcon} data-icon="inline-start" />
Add folder
</Button>
);
@@ -201,13 +201,6 @@ export function ProjectSourcesPanel({ projectId }: { projectId: string }) {
"border-wash-30 bg-wash-3 dark:border-wash-60 dark:bg-wash-5",
)}
>
- <span className="flex size-12 items-center justify-center rounded-full bg-muted text-muted-foreground">
- <HugeiconsIcon
- icon={PlusSignIcon}
- strokeWidth={1.75}
- className="size-6"
- />
- </span>
<div className="space-y-1">
<p className="text-ui-15 font-semibold text-foreground">
Give this project context
@@ -228,7 +221,6 @@ export function ProjectSourcesPanel({ projectId }: { projectId: string }) {
<HugeiconsIcon icon={PlusSignIcon} data-icon="inline-start" />
Add sources
</Button>
- {addFolderButton}
</div>
<p className="text-ui-11 text-muted-foreground">
{isTauri ? "Or drop files here" : "Or drop files or a folder here"}
diff --git a/studio/frontend/src/features/rag/components/retrieval-settings-section.tsx b/studio/frontend/src/features/rag/components/retrieval-settings-section.tsx
index 2dbea90bb19..acb234ffac3 100644
--- a/studio/frontend/src/features/rag/components/retrieval-settings-section.tsx
+++ b/studio/frontend/src/features/rag/components/retrieval-settings-section.tsx
@@ -1,6 +1,7 @@
// 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 { SegmentedControl } from "@/components/segmented-control";
import { InfoHint } from "@/components/ui/info-hint";
import {
Select,
@@ -11,9 +12,7 @@ import {
} from "@/components/ui/select";
import { Slider } from "@/components/ui/slider";
import { Switch } from "@/components/ui/switch";
-import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
import {
- type RagAutoInject,
type RagMode,
useChatRuntimeStore,
} from "@/features/chat/stores/chat-runtime-store";
@@ -153,29 +152,17 @@ export function RetrievalSettingsSection() {
Search attached documents before answering.
</span>
</div>
- <ToggleGroup
- type="single"
- variant="outline"
+ <SegmentedControl
value={ragAutoInject}
- onValueChange={(value) => {
- // Radix clears on re-click; ignore empty so one stays selected.
- if (value) {
- setRagAutoInject(value as RagAutoInject);
- }
- }}
- className="w-full"
- aria-label="Auto-retrieve documents"
- >
- <ToggleGroupItem value="auto" className="flex-1">
- Auto
- </ToggleGroupItem>
- <ToggleGroupItem value="on" className="flex-1">
- On
- </ToggleGroupItem>
- <ToggleGroupItem value="off" className="flex-1">
- Off
- </ToggleGroupItem>
- </ToggleGroup>
+ options={[
+ { value: "auto", label: "Auto" },
+ { value: "on", label: "On" },
+ { value: "off", label: "Off" },
+ ]}
+ onValueChange={setRagAutoInject}
+ ariaLabel="Auto-retrieve documents"
+ size="compact"
+ />
<SliderRow
label="Auto-retrieve threshold"
value={ragAutoInjectMinScore}
diff --git a/studio/frontend/src/features/settings/components/api-example-parts.tsx b/studio/frontend/src/features/settings/components/api-example-parts.tsx
index 516bfc201cc..e7637636a4b 100644
--- a/studio/frontend/src/features/settings/components/api-example-parts.tsx
+++ b/studio/frontend/src/features/settings/components/api-example-parts.tsx
@@ -123,7 +123,7 @@ export function ExampleToggle<T extends string>({
className={
toggle
? "hub-tab-toggle flex h-9 w-fit max-w-full min-w-0 items-center rounded-full"
- : "isolate flex min-w-0 flex-wrap items-center gap-0.5"
+ : "example-pills isolate flex min-w-0 flex-wrap items-center gap-0.5"
}
>
{options.map((option) => (
diff --git a/studio/frontend/src/features/settings/components/archived-chats-dialog.tsx b/studio/frontend/src/features/settings/components/archived-chats-dialog.tsx
index 416f26dadc5..c601fcde9d2 100644
--- a/studio/frontend/src/features/settings/components/archived-chats-dialog.tsx
+++ b/studio/frontend/src/features/settings/components/archived-chats-dialog.tsx
@@ -26,8 +26,14 @@ import {
} from "@/features/chat";
import { translate, useLocale, useT } from "@/i18n";
import { toast } from "@/lib/toast";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu";
import { Delete02Icon } from "@hugeicons/core-free-icons";
-import { MessageCircleIcon } from "@/lib/hugeicons-derived";
+import { MoreHorizontalIcon } from "lucide-react";
import { HugeiconsIcon } from "@hugeicons/react";
import { useNavigate, useRouterState } from "@tanstack/react-router";
import { useEffect, useMemo, useRef, useState } from "react";
@@ -245,6 +251,47 @@ export function ArchivedChatsView() {
<ChatLibraryGroups
items={filtered.slice(0, visibleCount)}
projects={projectNames}
+ groupActions={(group) => {
+ // Every match in the group, not only the rows shown so far.
+ const groupItems = filtered.filter(
+ (item) => (item.projectId ?? "") === group.id,
+ );
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild={true}>
+ <Button
+ variant="ghost"
+ size="icon-sm"
+ disabled={busy}
+ className="shrink-0 rounded-full text-muted-foreground"
+ aria-label={t("settings.data.library.groupActions", {
+ group: group.name,
+ })}
+ >
+ <MoreHorizontalIcon className="size-4" />
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ <DropdownMenuItem
+ onSelect={() => void run(groupItems, "restore")}
+ >
+ {group.id
+ ? t("settings.data.library.unarchiveAllInProject")
+ : t("settings.data.library.unarchiveAll")}
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ variant="destructive"
+ onSelect={() => requestDelete(groupItems, true)}
+ >
+ <HugeiconsIcon icon={Delete02Icon} className="size-4" />
+ {group.id
+ ? t("settings.data.library.deleteAllInProject")
+ : t("settings.data.deleteAllAction")}
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+ }}
>
{(item) => (
<LibraryRow
@@ -253,12 +300,6 @@ export function ArchivedChatsView() {
filters.sort === "updated" ? item.updatedAt : item.createdAt
}
onOpen={() => openChat(item)}
- leading={
- <HugeiconsIcon
- icon={MessageCircleIcon}
- className="size-4 shrink-0 text-muted-foreground"
- />
- }
actions={
<>
<Button
diff --git a/studio/frontend/src/features/settings/components/audio-api-examples.tsx b/studio/frontend/src/features/settings/components/audio-api-examples.tsx
index bac33469bc8..00b3dc2645e 100644
--- a/studio/frontend/src/features/settings/components/audio-api-examples.tsx
+++ b/studio/frontend/src/features/settings/components/audio-api-examples.tsx
@@ -14,6 +14,8 @@ import { usePlatformStore } from "@/config/env";
import { useT } from "@/i18n";
import type { TranslationKey } from "@/i18n";
import { isTauri } from "@/lib/api-base";
+import { AiSpeechIcon } from "@/lib/hugeicons-derived";
+import { HugeiconsIcon } from "@hugeicons/react";
import { useEffect, useMemo, useRef, useState } from "react";
import type {
KeylessApiAccessExposure,
@@ -245,7 +247,8 @@ export function AudioApiExamples({
className="flex min-w-0 max-w-full scroll-mt-6 flex-col gap-4"
>
<div className="flex flex-col gap-1">
- <h2 className="settings-heading text-sm font-semibold">
+ <h2 className="settings-heading flex items-center gap-2 text-base font-semibold font-heading">
+ <HugeiconsIcon icon={AiSpeechIcon} strokeWidth={1.75} className="size-[calc(18px*var(--ui-space-scale,1))] shrink-0 text-muted-foreground" />
{t("settings.apiKeys.audioApi.title")}
</h2>
<p className="text-xs leading-relaxed text-muted-foreground">
diff --git a/studio/frontend/src/features/settings/components/data-library-controls.tsx b/studio/frontend/src/features/settings/components/data-library-controls.tsx
index a771bb758c7..d8b366dd93b 100644
--- a/studio/frontend/src/features/settings/components/data-library-controls.tsx
+++ b/studio/frontend/src/features/settings/components/data-library-controls.tsx
@@ -4,7 +4,11 @@
import { useMemo, useState, type ReactNode } from "react";
import { useLocale, useT, type TranslationKey } from "@/i18n";
import { useLibraryProjectLabels } from "./use-library-project-labels";
-import { Folder01Icon, Search01Icon } from "@hugeicons/core-free-icons";
+import {
+ FilterHorizontalIcon,
+ Folder01Icon,
+ Search01Icon,
+} from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
@@ -102,6 +106,7 @@ export function LibraryToolbar({
className="h-10 gap-2 rounded-full"
aria-label={t("settings.data.library.filterSort")}
>
+ <HugeiconsIcon icon={FilterHorizontalIcon} className="size-4 shrink-0" />
{projects
? t(TYPE_LABELS[filters.type])
: filters.sort === "default"
@@ -256,10 +261,13 @@ export function ChatLibraryGroups<T extends LibraryItem>({
items,
projects,
children,
+ groupActions,
}: {
items: readonly T[];
projects: ReadonlyMap<string, string>;
children: (item: T) => ReactNode;
+ /** Trailing control on a group's heading, given the group's id ("" for no project) and name. */
+ groupActions?: (group: { id: string; name: string }) => ReactNode;
}) {
const t = useT();
const labels = useLibraryProjectLabels();
@@ -286,6 +294,7 @@ export function ChatLibraryGroups<T extends LibraryItem>({
{ count: group.items.length },
)}
</span>
+ {groupActions?.(group)}
</div>
<div className="divide-y divide-border/50 rounded-xl border border-border/60 px-3 sm:px-4">
{group.items.map((item) => (
diff --git a/studio/frontend/src/features/settings/components/developer-mode-section.tsx b/studio/frontend/src/features/settings/components/developer-mode-section.tsx
index 4efbf565cc9..37ad1370f08 100644
--- a/studio/frontend/src/features/settings/components/developer-mode-section.tsx
+++ b/studio/frontend/src/features/settings/components/developer-mode-section.tsx
@@ -11,6 +11,7 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { Switch } from "@/components/ui/switch";
+import { cn } from "@/lib/utils";
import { usePlatformStore } from "@/config/env";
import { refreshHardwareInfo } from "@/hooks/use-hardware-info";
import { useT } from "@/i18n";
@@ -107,20 +108,21 @@ export function DeveloperModeSection() {
<SettingsSection title={t("settings.general.developerMode.sectionTitle")}>
<SettingsRow
label={t("settings.general.developerMode.videoCpu")}
- description={t("settings.general.developerMode.videoCpuDescription")}
- below={
- note ? (
- <span
- data-testid="developer-mode-note"
- className={
- error
- ? "max-w-[calc(260px*var(--ui-space-scale,1))] text-right text-xs text-destructive"
- : "max-w-[calc(260px*var(--ui-space-scale,1))] text-right text-xs text-muted-foreground"
- }
- >
- {note}
- </span>
- ) : null
+ description={
+ <>
+ {t("settings.general.developerMode.videoCpuDescription")}
+ {note ? (
+ <span
+ data-testid="developer-mode-note"
+ className={cn(
+ "mt-1.5 block",
+ error ? "text-destructive" : "text-muted-foreground/80",
+ )}
+ >
+ {note}
+ </span>
+ ) : null}
+ </>
}
>
<Switch
diff --git a/studio/frontend/src/features/settings/components/lan-access-section.tsx b/studio/frontend/src/features/settings/components/lan-access-section.tsx
index 02488059bb4..31b4f6c04df 100644
--- a/studio/frontend/src/features/settings/components/lan-access-section.tsx
+++ b/studio/frontend/src/features/settings/components/lan-access-section.tsx
@@ -47,15 +47,13 @@ import {
validLanAccessPort,
} from "@/features/settings/api/lan-access-state";
import { isTauri } from "@/lib/api-base";
-import { copyToClipboard } from "@/lib/copy-to-clipboard";
-import { Tick02Icon } from "@/lib/tick-icon";
import { cn } from "@/lib/utils";
-import { Copy01Icon, QrCodeIcon, Wifi01Icon } from "@hugeicons/core-free-icons";
+import { QrCode01Icon, Wifi01Icon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { useCallback, useEffect, useId, useRef, useState } from "react";
import QRCode from "react-qr-code";
import { SettingsRow } from "./settings-row";
-import { LineBox } from "@/components/ui/line-box";
+import { UrlPill } from "./url-pill";
type LanAccessOperation = "start" | "stop" | "auto" | "port" | "addresses";
type PortMode = "automatic" | "custom";
@@ -98,44 +96,6 @@ function AccessStatus({ status }: { status: LanAccessStatus | null }) {
);
}
-function CopyLanUrlButton({ url, label }: { url: string; label: string }) {
- const [copied, setCopied] = useState(false);
- const text = copied ? "Copied" : label;
- const copyTimer = useRef<number | null>(null);
- useEffect(() => {
- return () => {
- if (copyTimer.current !== null) {
- window.clearTimeout(copyTimer.current);
- }
- };
- }, []);
- return (
- <Button
- type="button"
- size="sm"
- variant="outline"
- className="gap-1.5"
- aria-label={`${text} ${url}`}
- onClick={async () => {
- if (!(await copyToClipboard(url))) {
- return;
- }
- setCopied(true);
- if (copyTimer.current !== null) {
- window.clearTimeout(copyTimer.current);
- }
- copyTimer.current = window.setTimeout(() => setCopied(false), 1800);
- }}
- >
- <HugeiconsIcon
- icon={copied ? Tick02Icon : Copy01Icon}
- className="size-3.5"
- />
- {text}
- </Button>
- );
-}
-
function LanUrlQrButton({ url }: { url: string }) {
return (
<Dialog>
@@ -147,7 +107,7 @@ function LanUrlQrButton({ url }: { url: string }) {
className="gap-1.5"
aria-label={`Show QR code for ${url}`}
>
- <HugeiconsIcon icon={QrCodeIcon} className="size-3.5" />
+ <HugeiconsIcon icon={QrCode01Icon} className="size-3.5" />
QR
</Button>
</DialogTrigger>
@@ -191,15 +151,6 @@ function StatusMessage({
);
}
-function LanUrlActions({ url, copyLabel }: { url: string; copyLabel: string }) {
- return (
- <div className="flex shrink-0 items-center gap-2">
- <LanUrlQrButton url={url} />
- <CopyLanUrlButton url={url} label={copyLabel} />
- </div>
- );
-}
-
function LanUrlPanel({ status }: { status: LanAccessStatus | null }) {
if (!status || status.urls.length === 0) {
return null;
@@ -218,17 +169,13 @@ function LanUrlPanel({ status }: { status: LanAccessStatus | null }) {
<span className="text-sm font-medium text-foreground">
{single ? "Network address" : "Network addresses"}
</span>
- {single ? (
- <LanUrlActions url={status.urls[0]} copyLabel="Copy URL" />
- ) : null}
+ {single ? <LanUrlQrButton url={status.urls[0]} /> : null}
</div>
{status.urls.map((url) => (
<div key={url} className="flex flex-col gap-1">
<div className="flex items-center gap-2">
- <LineBox as="code" className="block w-full min-w-0 break-all border border-border bg-muted/40 px-3 py-2 font-mono text-xs text-foreground">
- {url}
- </LineBox>
- {single ? null : <LanUrlActions url={url} copyLabel="Copy" />}
+ <UrlPill url={url} className="w-full" />
+ {single ? null : <LanUrlQrButton url={url} />}
</div>
{stale.has(url) ? (
<span className="text-xs text-destructive leading-snug">
diff --git a/studio/frontend/src/features/settings/components/media-api-examples.tsx b/studio/frontend/src/features/settings/components/media-api-examples.tsx
index d337cfd9949..541d8a7fb74 100644
--- a/studio/frontend/src/features/settings/components/media-api-examples.tsx
+++ b/studio/frontend/src/features/settings/components/media-api-examples.tsx
@@ -4,6 +4,8 @@
import { usePlatformStore } from "@/config/env";
import { useT } from "@/i18n";
import { isTauri } from "@/lib/api-base";
+import { Image01Icon } from "@hugeicons/core-free-icons";
+import { HugeiconsIcon } from "@hugeicons/react";
import { useEffect, useMemo, useRef, useState } from "react";
import type {
KeylessApiAccessExposure,
@@ -156,7 +158,8 @@ export function MediaApiExamples({
className="flex min-w-0 max-w-full scroll-mt-6 flex-col gap-4"
>
<div className="flex flex-col gap-1">
- <h2 className="settings-heading text-sm font-semibold">
+ <h2 className="settings-heading flex items-center gap-2 text-base font-semibold font-heading">
+ <HugeiconsIcon icon={Image01Icon} strokeWidth={1.75} className="size-[calc(18px*var(--ui-space-scale,1))] shrink-0 text-muted-foreground" />
{t("settings.apiKeys.mediaApi.title")}
</h2>
<p className="text-xs leading-relaxed text-muted-foreground">
diff --git a/studio/frontend/src/features/settings/components/remote-access-section.tsx b/studio/frontend/src/features/settings/components/remote-access-section.tsx
index fbc3d02d77c..1f8315d694f 100644
--- a/studio/frontend/src/features/settings/components/remote-access-section.tsx
+++ b/studio/frontend/src/features/settings/components/remote-access-section.tsx
@@ -10,7 +10,6 @@ import {
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
-import { LineBox } from "@/components/ui/line-box";
import { Switch } from "@/components/ui/switch";
import { usePlatformStore } from "@/config/env";
import { useLoginMode } from "@/features/auth/account-session";
@@ -30,19 +29,14 @@ import {
remoteAccessStopDisconnectsOrigin,
} from "@/features/settings/api/remote-access-state";
import { isTauri } from "@/lib/api-base";
-import { copyToClipboard } from "@/lib/copy-to-clipboard";
-import { Tick02Icon } from "@/lib/tick-icon";
import { cn } from "@/lib/utils";
-import {
- Copy01Icon,
- HomeWifiIcon,
- QrCodeIcon,
-} from "@hugeicons/core-free-icons";
+import { HomeWifiIcon, QrCode01Icon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { useCallback, useEffect, useRef, useState } from "react";
import QRCode from "react-qr-code";
import { ChangePasswordDialog } from "./change-password-dialog";
import { SettingsRow } from "./settings-row";
+import { UrlPill } from "./url-pill";
type RemoteAccessOperation = "start" | "stop" | "auto";
@@ -89,48 +83,12 @@ function AccessStatus({ status }: { status: RemoteAccessStatus | null }) {
);
}
-function CopyRemoteUrlButton({ url }: { url: string }) {
- const [copied, setCopied] = useState(false);
- const copyTimer = useRef<number | null>(null);
- useEffect(() => {
- return () => {
- if (copyTimer.current !== null) {
- window.clearTimeout(copyTimer.current);
- }
- };
- }, []);
- return (
- <Button
- type="button"
- size="sm"
- variant="outline"
- className="gap-1.5"
- onClick={async () => {
- if (!(await copyToClipboard(url))) {
- return;
- }
- setCopied(true);
- if (copyTimer.current !== null) {
- window.clearTimeout(copyTimer.current);
- }
- copyTimer.current = window.setTimeout(() => setCopied(false), 1800);
- }}
- >
- <HugeiconsIcon
- icon={copied ? Tick02Icon : Copy01Icon}
- className="size-3.5"
- />
- {copied ? "Copied" : "Copy URL"}
- </Button>
- );
-}
-
function RemoteUrlQrButton({ url }: { url: string }) {
return (
<Dialog>
<DialogTrigger asChild={true}>
<Button type="button" size="sm" variant="outline" className="gap-1.5">
- <HugeiconsIcon icon={QrCodeIcon} className="size-3.5" />
+ <HugeiconsIcon icon={QrCode01Icon} className="size-3.5" />
QR
</Button>
</DialogTrigger>
@@ -183,17 +141,9 @@ function RemoteUrlPanel({ url }: { url: string | null }) {
<div className="flex flex-col gap-1.5 border-t border-border/60 p-4">
<div className="flex items-center justify-between gap-3">
<span className="text-sm font-medium text-foreground">Remote URL</span>
- <div className="flex items-center gap-2">
- <RemoteUrlQrButton url={url} />
- <CopyRemoteUrlButton url={url} />
- </div>
+ <RemoteUrlQrButton url={url} />
</div>
- <LineBox
- as="code"
- className="block w-full break-all border border-border bg-muted/40 px-3 py-2 font-mono text-xs text-foreground"
- >
- {url}
- </LineBox>
+ <UrlPill url={url} />
<span className="text-xs text-muted-foreground leading-snug">
{multi
? "Anyone with this URL reaches the sign-in page, and every account and API key works here. Signing in as the owner gives full control, including running code on this computer through tools."
diff --git a/studio/frontend/src/features/settings/components/url-pill.tsx b/studio/frontend/src/features/settings/components/url-pill.tsx
new file mode 100644
index 00000000000..d2d682d7bf6
--- /dev/null
+++ b/studio/frontend/src/features/settings/components/url-pill.tsx
@@ -0,0 +1,53 @@
+// 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 { LineBox } from "@/components/ui/line-box";
+import { copyToClipboard } from "@/lib/copy-to-clipboard";
+import { cn } from "@/lib/utils";
+import { Tick02Icon } from "@/lib/tick-icon";
+import { Copy01Icon } from "@hugeicons/core-free-icons";
+import { HugeiconsIcon } from "@hugeicons/react";
+import { useEffect, useRef, useState } from "react";
+
+export function UrlPill({ url, className }: { url: string; className?: string }) {
+ const [copied, setCopied] = useState(false);
+ const copyTimer = useRef<number | null>(null);
+ useEffect(() => {
+ return () => {
+ if (copyTimer.current !== null) {
+ window.clearTimeout(copyTimer.current);
+ }
+ };
+ }, []);
+ return (
+ <div className={cn("relative min-w-0", className)}>
+ <LineBox
+ as="code"
+ className="block w-full break-all border border-border bg-muted/40 py-2 pr-10 pl-3 font-mono text-xs text-foreground"
+ >
+ {url}
+ </LineBox>
+ <button
+ type="button"
+ aria-label={copied ? "Copied" : `Copy ${url}`}
+ title={copied ? "Copied" : "Copy URL"}
+ onClick={async () => {
+ if (!(await copyToClipboard(url))) {
+ return;
+ }
+ setCopied(true);
+ if (copyTimer.current !== null) {
+ window.clearTimeout(copyTimer.current);
+ }
+ copyTimer.current = window.setTimeout(() => setCopied(false), 1800);
+ }}
+ className="absolute top-1/2 right-1.5 flex size-6 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
+ >
+ <HugeiconsIcon
+ icon={copied ? Tick02Icon : Copy01Icon}
+ className={cn("size-3.5", copied && "text-control-accent")}
+ />
+ </button>
+ </div>
+ );
+}
diff --git a/studio/frontend/src/features/settings/components/usage-examples.tsx b/studio/frontend/src/features/settings/components/usage-examples.tsx
index 44d473b86d0..f51e507bb22 100644
--- a/studio/frontend/src/features/settings/components/usage-examples.tsx
+++ b/studio/frontend/src/features/settings/components/usage-examples.tsx
@@ -35,6 +35,7 @@ import {
BotIcon,
Copy01Icon,
InformationCircleIcon,
+ SourceCodeIcon,
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import {
@@ -833,12 +834,13 @@ export function UsageExamples({
return (
<section className="flex min-w-0 max-w-full flex-col gap-4">
- <h2 className="settings-heading text-sm font-semibold">
+ <h2 className="settings-heading flex items-center gap-2 text-base font-semibold font-heading">
+ <HugeiconsIcon icon={SourceCodeIcon} strokeWidth={1.75} className="size-[calc(18px*var(--ui-space-scale,1))] shrink-0 text-muted-foreground" />
{t("settings.apiKeys.usageExamples")}
</h2>
{/* No model-auto-switch row: ModelAutoSwitchSection renders that setting just below. */}
{cloudflareUrl ? (
- <div className="flex min-w-0 items-center justify-between gap-2 rounded-lg border border-border px-3 py-2">
+ <div className="flex min-w-0 items-center justify-between gap-2 rounded-full border border-border px-4 py-2">
<div className="flex shrink-0 items-center gap-1.5">
<Switch
size="sm"
@@ -927,10 +929,11 @@ export function UsageExamples({
onOsChange={setOs}
/>
<div className="flex min-w-0 flex-col gap-2.5 pt-2">
- <div className="flex h-5 items-center justify-between gap-3">
- <span className="text-xs font-medium text-foreground">
+ <div className="flex items-center justify-between gap-3">
+ <h2 className="settings-heading flex items-center gap-2 text-base font-semibold font-heading">
+ <HugeiconsIcon icon={BotIcon} strokeWidth={1.75} className="size-[calc(18px*var(--ui-space-scale,1))] shrink-0 text-muted-foreground" />
{t("settings.apiKeys.codingAgents")}
- </span>
+ </h2>
{/* Agents is owner-only (settings-tab-visibility.ts): other accounts would land
on General, so they get the agent's docs instead. The tab restores its agent
from this pref when it mounts. */}
@@ -943,7 +946,6 @@ export function UsageExamples({
}}
className="inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-ui-11 font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
>
- <HugeiconsIcon icon={BotIcon} className="size-3.5" />
{t("settings.apiKeys.openAgentsTab")}
<HugeiconsIcon icon={ChevronRightStandardIcon} className="size-3" />
</button>
@@ -979,7 +981,7 @@ export function UsageExamples({
>
<SelectTrigger
aria-label={t("settings.agents.agent")}
- className="w-full rounded-lg"
+ className="w-full rounded-full"
>
<SelectValue>
<span className="flex min-w-0 items-center gap-2">
@@ -1016,7 +1018,7 @@ export function UsageExamples({
</div>
<div className="relative min-w-0">
<code
- className="block min-w-0 whitespace-pre-wrap break-all rounded-lg border border-border bg-background/70 py-2.5 pr-9 pl-4 font-mono text-ui-11 leading-relaxed text-foreground dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.05*var(--contrast-wash-gain,1)))]"
+ className="block min-w-0 whitespace-pre-wrap break-all rounded-3xl border border-border bg-background/70 py-2.5 pr-10 pl-4 font-mono text-ui-11 leading-relaxed text-foreground dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.05*var(--contrast-wash-gain,1)))]"
data-reload-snapshot-sensitive={apiKey ? "" : undefined}
>
{agentCommand}
@@ -1024,7 +1026,7 @@ export function UsageExamples({
<button
type="button"
onClick={handleCopyAgent}
- className="absolute top-1.5 right-1.5 flex size-6 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
+ className="absolute top-1.5 right-2 flex size-6 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
aria-label={t("settings.apiKeys.copySnippet")}
>
<HugeiconsIcon
diff --git a/studio/frontend/src/features/settings/settings-search.ts b/studio/frontend/src/features/settings/settings-search.ts
index 6241f7aa748..7826c1c03c9 100644
--- a/studio/frontend/src/features/settings/settings-search.ts
+++ b/studio/frontend/src/features/settings/settings-search.ts
@@ -24,7 +24,6 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {
"settings.appearance.language.title",
"settings.appearance.language.label",
"settings.appearance.language.spellCheck",
- "settings.about.engines.title",
"settings.general.notifications.sectionTitle",
"settings.general.notifications.showLoadedModels",
"settings.general.notifications.updateReminders",
@@ -35,8 +34,6 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {
"settings.general.rag.embeddingModel",
"settings.general.helperLlm.sectionTitle",
"settings.general.helperLlm.preloadOnStartup",
- "settings.general.developerMode.sectionTitle",
- "settings.general.developerMode.videoCpu",
"settings.general.hub.sectionTitle",
"settings.general.hub.source",
"settings.general.hub.endpoint",
@@ -113,6 +110,9 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {
"settings.resources.environment.torch",
"settings.resources.environment.transformers",
"settings.resources.liveUpdates",
+ "settings.about.engines.title",
+ "settings.general.developerMode.sectionTitle",
+ "settings.general.developerMode.videoCpu",
],
chat: [
"settings.general.chatDefaults",
diff --git a/studio/frontend/src/features/settings/tabs/about-tab.tsx b/studio/frontend/src/features/settings/tabs/about-tab.tsx
index bd5882aaf28..21379937235 100644
--- a/studio/frontend/src/features/settings/tabs/about-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/about-tab.tsx
@@ -19,7 +19,9 @@ import {
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { useEffect, useRef, useState } from "react";
+import { InferenceEnginesSection } from "@/features/model-picker/components/inference-engines";
import { EngineVersionsSection } from "../components/engine-versions-section";
+import { StandaloneEnvironmentSection } from "./resources-tab";
import { SettingsRow } from "../components/settings-row";
import { SettingsSection } from "../components/settings-section";
import { StudioVersionSection } from "../components/studio-version-section";
@@ -174,6 +176,9 @@ export function AboutTab() {
<StudioVersionSection desktopAppVersion={desktopAppVersion} />
<EngineVersionsSection />
+ <InferenceEnginesSection />
+
+ <StandaloneEnvironmentSection />
<div ref={updateSectionRef} className="scroll-mt-5">
<SettingsSection title={t("settings.about.updates")}>
diff --git a/studio/frontend/src/features/settings/tabs/browser-agent-settings.tsx b/studio/frontend/src/features/settings/tabs/browser-agent-settings.tsx
index 853853eda67..aec2077e8b6 100644
--- a/studio/frontend/src/features/settings/tabs/browser-agent-settings.tsx
+++ b/studio/frontend/src/features/settings/tabs/browser-agent-settings.tsx
@@ -15,7 +15,7 @@ import {
} from "@/features/browser";
import { useT } from "@/i18n";
import { CursorInWindowIcon } from "@/lib/browser-use-icon";
-import { Add01Icon, ArrowUpRight01Icon, Cancel01Icon, PlusSignIcon } from "@hugeicons/core-free-icons";
+import { Add01Icon, Cancel01Icon, PlusSignIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { useState } from "react";
import { SettingsRow } from "../components/settings-row";
@@ -23,7 +23,7 @@ import { SettingsSection } from "../components/settings-section";
type Column = keyof SiteRule;
-const BROWSER_USE_DOCS_URL = "https://unsloth.ai/docs/basics/browser-use";
+export const BROWSER_USE_DOCS_URL = "https://unsloth.ai/docs/basics/browser-use";
function RuleSelect({
column,
@@ -72,8 +72,8 @@ function RuleSelect({
);
}
-// Each choice carries its own heading and wraps to the next line rather than cutting its label, at any text size.
-const CHOICES = "grid grid-cols-[repeat(auto-fit,minmax(calc(11.5rem*var(--ui-space-scale,1)),1fr))] gap-x-2 gap-y-2";
+// 2x2, not auto-fit: auto-fit left the fourth choice alone on its own row.
+const CHOICES = "grid grid-cols-1 gap-x-4 gap-y-3 @[30rem]/perms:grid-cols-2";
function PermissionsTable() {
const t = useT();
@@ -102,7 +102,7 @@ function PermissionsTable() {
};
const row = (name: string, rule: SiteRule, site: string | null) => (
- <div key={site ?? "default"} className="flex flex-col gap-1.5 border-b border-border/60 py-2.5 last:border-b-0">
+ <div key={site ?? "default"} className="flex flex-col gap-2.5 border-b border-border/60 py-4 first:pt-3 last:border-b-0 last:pb-3">
<div className="flex min-h-8 items-center gap-2">
<span className="min-w-0 flex-1 truncate text-sm font-medium text-foreground" title={name}>
{name}
@@ -121,8 +121,8 @@ function PermissionsTable() {
</div>
<div className={CHOICES}>
{columns.map(([column, title]) => (
- <div key={column} className="flex min-w-0 flex-col gap-1">
- <span className="text-xs text-muted-foreground">{title}</span>
+ <div key={column} className="flex min-w-0 flex-col gap-1.5">
+ <span className="px-1 text-xs text-muted-foreground">{title}</span>
<RuleSelect
column={column}
value={rule[column]}
@@ -151,7 +151,7 @@ function PermissionsTable() {
</Button>
}
>
- <div className="mt-2 flex flex-col rounded-xl border border-border/80 px-3 py-1">
+ <div className="@container/perms mt-2 flex flex-col rounded-2xl border border-border/80 px-4">
{row(t("browser.agentSettings.default"), permissions.defaults, null)}
{sites.map((site) => row(site, permissions.sites[site] ?? DEFAULT_AGENT_RULE, site))}
{draft !== null ? (
@@ -206,19 +206,6 @@ export function BrowserAgentSettings() {
<>
<SettingsSection
title={t("browser.agentSettings.title")}
- action={
- // title, not aria-label, so the accessible name stays the visible text (as the Sandbox tab's).
- <a
- href={BROWSER_USE_DOCS_URL}
- target="_blank"
- rel="noreferrer"
- title={t("browser.agentSettings.docsLabel")}
- className="inline-flex shrink-0 items-center gap-1 rounded px-1.5 py-0.5 text-ui-11 font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
- >
- {t("browser.agentSettings.docs")}
- <HugeiconsIcon icon={ArrowUpRight01Icon} className="size-3" />
- </a>
- }
>
<SettingsRow
icon={<HugeiconsIcon icon={CursorInWindowIcon} strokeWidth={1.75} className="me-1.5 size-7" />}
diff --git a/studio/frontend/src/features/settings/tabs/browser-tab.tsx b/studio/frontend/src/features/settings/tabs/browser-tab.tsx
index 156b25efad2..72b6d57f5f2 100644
--- a/studio/frontend/src/features/settings/tabs/browser-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/browser-tab.tsx
@@ -39,13 +39,13 @@ import { type TranslationKey, useLocale, useT } from "@/i18n";
import { isTauri } from "@/lib/api-base";
import { isDownloadCancelled } from "@/lib/native-files";
import { toast } from "@/lib/toast";
-import { Cancel01Icon } from "@hugeicons/core-free-icons";
+import { ArrowUpRight01Icon, Cancel01Icon, Delete02Icon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { useEffect, useMemo, useRef, useState } from "react";
import { SettingsRow } from "../components/settings-row";
import { SettingsSection } from "../components/settings-section";
import { useSettingsDialogStore } from "../stores/settings-dialog-store";
-import { BrowserAgentSettings } from "./browser-agent-settings";
+import { BROWSER_USE_DOCS_URL, BrowserAgentSettings } from "./browser-agent-settings";
const RETENTION_LABELS: Record<number, TranslationKey> = {
0: "browser.retention.forever",
@@ -229,7 +229,20 @@ export function BrowserTab() {
return (
<div className="settings-page">
<header className="flex flex-col gap-1">
- <h1 className="text-xl font-semibold font-heading">{t("browser.settingsTitle")}</h1>
+ <div className="flex min-w-0 items-baseline gap-2">
+ <h1 className="text-xl font-semibold font-heading">{t("browser.settingsTitle")}</h1>
+ {/* title, not aria-label, so the accessible name stays the visible text. */}
+ <a
+ href={BROWSER_USE_DOCS_URL}
+ target="_blank"
+ rel="noopener noreferrer"
+ title={t("browser.agentSettings.docsLabel")}
+ className="inline-flex shrink-0 items-center gap-1 rounded-full px-1.5 py-0.5 text-ui-11 font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
+ >
+ {t("browser.agentSettings.docs")}
+ <HugeiconsIcon icon={ArrowUpRight01Icon} className="size-3" />
+ </a>
+ </div>
</header>
<BrowserAgentSettings />
@@ -544,6 +557,7 @@ export function BrowserTab() {
)}
>
<Button variant="destructive" size="sm" onClick={() => setClearOpen(true)}>
+ <HugeiconsIcon icon={Delete02Icon} strokeWidth={1.75} data-icon="inline-start" />
{t("browser.menu.clearData")}
</Button>
</SettingsRow>
diff --git a/studio/frontend/src/features/settings/tabs/general-tab.tsx b/studio/frontend/src/features/settings/tabs/general-tab.tsx
index 5439d4e26aa..a34a7a3aef9 100644
--- a/studio/frontend/src/features/settings/tabs/general-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/general-tab.tsx
@@ -74,7 +74,6 @@ import {
import { DesktopInstallTypeControl } from "../components/full-install-dialog";
import { ChangePasswordDialog } from "../components/change-password-dialog";
import { DesktopRepairControl } from "../components/desktop-repair-control";
-import { DeveloperModeSection } from "../components/developer-mode-section";
import {
DesktopUpdateControl,
DesktopUpdateNote,
@@ -86,7 +85,6 @@ import {
TRANSPORT_MODE_STORAGE_KEY,
} from "@/features/hub";
import { DownloadTransportRow } from "../components/download-transport-row";
-import { EngineVersionsSection } from "../components/engine-versions-section";
import { HubSettingsSection } from "../components/hub-settings-section";
import { NotificationFrequencySelect } from "../components/notification-frequency-select";
import { SettingsRow } from "../components/settings-row";
@@ -647,79 +645,9 @@ export function GeneralTab() {
</SettingsRow>
</SettingsSection>
- {isTauri ? (
- <SettingsSection title={t("settings.general.startup.sectionTitle")}>
- <SettingsRow
- label={t("settings.general.startup.launchAtLogin")}
- description={t("settings.general.startup.launchAtLoginDescription")}
- below={
- launchAtLoginSetting.error ? (
- <span className="max-w-[calc(260px*var(--ui-space-scale,1))] text-right text-xs text-destructive">
- {launchAtLoginSetting.error}
- </span>
- ) : null
- }
- >
- <Switch
- checked={launchAtLoginSetting.value ?? false}
- disabled={
- launchAtLoginSetting.value === null || launchAtLoginSetting.saving
- }
- onCheckedChange={(enabled) => void launchAtLoginSetting.update(enabled)}
- />
- </SettingsRow>
-
- {closeToTraySetting.supported ? (
- <SettingsRow
- label={t("settings.general.startup.closeToTray")}
- description={t("settings.general.startup.closeToTrayDescription")}
- below={
- closeToTraySetting.error ? (
- <span className="max-w-[calc(260px*var(--ui-space-scale,1))] text-right text-xs text-destructive">
- {closeToTraySetting.error}
- </span>
- ) : null
- }
- >
- <Switch
- checked={closeToTraySetting.value ?? false}
- disabled={
- closeToTraySetting.value === null || closeToTraySetting.saving
- }
- onCheckedChange={(enabled) => void closeToTraySetting.update(enabled)}
- />
- </SettingsRow>
- ) : null}
-
- {trayIconSetting.supported ? (
- <SettingsRow
- label={t("settings.general.startup.menuBarIcon")}
- description={t("settings.general.startup.menuBarIconDescription")}
- >
- <div className="flex flex-col items-end gap-1">
- <Switch
- checked={trayIconSetting.value ?? false}
- disabled={
- trayIconSetting.value === null || trayIconSetting.saving
- }
- onCheckedChange={(enabled) => void trayIconSetting.update(enabled)}
- />
- {trayIconSetting.error ? (
- <span className="max-w-[calc(260px*var(--ui-space-scale,1))] text-right text-xs text-destructive">
- {trayIconSetting.error}
- </span>
- ) : null}
- </div>
- </SettingsRow>
- ) : null}
- </SettingsSection>
- ) : null}
-
{/* Owner-only like the installation-wide block below: its routes are. */}
{isOwner ? <DocumentsRagSection /> : null}
- <EngineVersionsSection />
-
<SettingsSection title={t("settings.general.notifications.sectionTitle")}>
<SettingsRow
label={t("settings.general.notifications.showLoadedModels")}
@@ -883,10 +811,77 @@ export function GeneralTab() {
</SettingsRow>
</SettingsSection>
- <DeveloperModeSection />
</>
) : null}
+ {isTauri ? (
+ <SettingsSection title={t("settings.general.startup.sectionTitle")}>
+ <SettingsRow
+ label={t("settings.general.startup.launchAtLogin")}
+ description={t("settings.general.startup.launchAtLoginDescription")}
+ below={
+ launchAtLoginSetting.error ? (
+ <span className="max-w-[calc(260px*var(--ui-space-scale,1))] text-right text-xs text-destructive">
+ {launchAtLoginSetting.error}
+ </span>
+ ) : null
+ }
+ >
+ <Switch
+ checked={launchAtLoginSetting.value ?? false}
+ disabled={
+ launchAtLoginSetting.value === null || launchAtLoginSetting.saving
+ }
+ onCheckedChange={(enabled) => void launchAtLoginSetting.update(enabled)}
+ />
+ </SettingsRow>
+
+ {closeToTraySetting.supported ? (
+ <SettingsRow
+ label={t("settings.general.startup.closeToTray")}
+ description={t("settings.general.startup.closeToTrayDescription")}
+ below={
+ closeToTraySetting.error ? (
+ <span className="max-w-[calc(260px*var(--ui-space-scale,1))] text-right text-xs text-destructive">
+ {closeToTraySetting.error}
+ </span>
+ ) : null
+ }
+ >
+ <Switch
+ checked={closeToTraySetting.value ?? false}
+ disabled={
+ closeToTraySetting.value === null || closeToTraySetting.saving
+ }
+ onCheckedChange={(enabled) => void closeToTraySetting.update(enabled)}
+ />
+ </SettingsRow>
+ ) : null}
+
+ {trayIconSetting.supported ? (
+ <SettingsRow
+ label={t("settings.general.startup.menuBarIcon")}
+ description={t("settings.general.startup.menuBarIconDescription")}
+ >
+ <div className="flex flex-col items-end gap-1">
+ <Switch
+ checked={trayIconSetting.value ?? false}
+ disabled={
+ trayIconSetting.value === null || trayIconSetting.saving
+ }
+ onCheckedChange={(enabled) => void trayIconSetting.update(enabled)}
+ />
+ {trayIconSetting.error ? (
+ <span className="max-w-[calc(260px*var(--ui-space-scale,1))] text-right text-xs text-destructive">
+ {trayIconSetting.error}
+ </span>
+ ) : null}
+ </div>
+ </SettingsRow>
+ ) : null}
+ </SettingsSection>
+ ) : null}
+
<SettingsSection
title={t("settings.general.resetPreferences.sectionTitle")}
>
diff --git a/studio/frontend/src/features/settings/tabs/resources-tab.tsx b/studio/frontend/src/features/settings/tabs/resources-tab.tsx
index 45ed66acbbc..880064b5643 100644
--- a/studio/frontend/src/features/settings/tabs/resources-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/resources-tab.tsx
@@ -34,6 +34,7 @@ import {
aggregateGpuMemoryTotalGb,
useSystemInfo,
type GpuDevice,
+ type SystemInfoResponse,
type SystemGpuInfo,
} from "@/hooks/use-system";
import { isTauri } from "@/lib/api-base";
@@ -50,7 +51,10 @@ import {
} from "../api/hugging-face-cache";
import { InferenceEnginesSection } from "@/features/model-picker/components/inference-engines";
import { useSettingsDialogStore } from "../stores/settings-dialog-store";
+import { useIsAccountOwner } from "@/features/auth";
import { CacheStorageRows } from "../components/cache-storage-rows";
+import { DeveloperModeSection } from "../components/developer-mode-section";
+import { EngineVersionsSection } from "../components/engine-versions-section";
import { LlamaBackendSection } from "../components/llama-backend-section";
import { ModelMemorySection } from "../components/model-memory-section";
import { SettingsRow } from "../components/settings-row";
@@ -267,6 +271,7 @@ type GpuPhysicalInventory = SystemGpuInfo & {
export function ResourcesTab() {
const t = useT();
+ const isOwner = useIsAccountOwner();
const liveUpdates = useSettingsPanelPrefsStore((s) => s.resourcesLiveUpdates);
const setLiveUpdates = useSettingsPanelPrefsStore(
(s) => s.setResourcesLiveUpdates,
@@ -1056,6 +1061,7 @@ export function ResourcesTab() {
{/* Below the GPU section it describes, above the memory settings that
apply to whichever backend is selected. */}
<LlamaBackendSection />
+ <EngineVersionsSection />
<InferenceEnginesSection />
<ModelMemorySection ref={modelMemoryRef} />
@@ -1175,38 +1181,70 @@ export function ResourcesTab() {
showModelHints={false}
/>
- <SettingsSection title={t("settings.resources.environment.title")}>
- <InfoRow
- label={t("settings.resources.environment.backend")}
- value={hostReading(backendLabel)}
- />
- <InfoRow
- label={t("settings.resources.environment.python")}
- value={systemInfo.python_version}
- />
- <InfoRow
- label={t("settings.resources.environment.torch")}
- value={hostReading(
- systemInfo.ml_packages.torch ??
- t("settings.resources.environment.notInstalled"),
- )}
- />
- <InfoRow
- label={t("settings.resources.environment.transformers")}
- value={hostReading(
- systemInfo.ml_packages.transformers ??
- t("settings.resources.environment.notInstalled"),
- )}
- />
- <InfoRow
- label={t("settings.resources.environment.uptime")}
- value={hostReading(formatUptime(systemInfo.uptime_seconds))}
- />
- <InfoRow
- label={t("settings.resources.environment.processMemory")}
- value={hostReading(formatMb(systemInfo.memory?.process_used_mb))}
- />
- </SettingsSection>
+ {isOwner ? <DeveloperModeSection /> : null}
+
+ <EnvironmentSection
+ systemInfo={systemInfo}
+ backendLabel={backendLabel}
+ />
</div>
);
}
+
+/** About renders this too, from its own system query. */
+export function EnvironmentSection({
+ systemInfo,
+ backendLabel,
+}: {
+ systemInfo: SystemInfoResponse;
+ backendLabel: string;
+}) {
+ const t = useT();
+ const unknownLabel = t("settings.resources.environment.unknown");
+ const hostReading = (value: string) =>
+ systemInfo.status !== "ready" ? unknownLabel : value;
+ return (
+ <SettingsSection title={t("settings.resources.environment.title")}>
+ <InfoRow
+ label={t("settings.resources.environment.backend")}
+ value={hostReading(backendLabel)}
+ />
+ <InfoRow
+ label={t("settings.resources.environment.python")}
+ value={systemInfo.python_version}
+ />
+ <InfoRow
+ label={t("settings.resources.environment.torch")}
+ value={hostReading(
+ systemInfo.ml_packages.torch ??
+ t("settings.resources.environment.notInstalled"),
+ )}
+ />
+ <InfoRow
+ label={t("settings.resources.environment.transformers")}
+ value={hostReading(
+ systemInfo.ml_packages.transformers ??
+ t("settings.resources.environment.notInstalled"),
+ )}
+ />
+ <InfoRow
+ label={t("settings.resources.environment.uptime")}
+ value={hostReading(formatUptime(systemInfo.uptime_seconds))}
+ />
+ <InfoRow
+ label={t("settings.resources.environment.processMemory")}
+ value={hostReading(formatMb(systemInfo.memory?.process_used_mb))}
+ />
+ </SettingsSection>
+ );
+}
+
+export function StandaloneEnvironmentSection() {
+ const systemInfo = useSystemInfo();
+ return (
+ <EnvironmentSection
+ systemInfo={systemInfo}
+ backendLabel={(systemInfo.device_backend ?? "cpu").toUpperCase()}
+ />
+ );
+}
diff --git a/studio/frontend/src/features/studio/wizard/training-wizard.tsx b/studio/frontend/src/features/studio/wizard/training-wizard.tsx
index 98c43be3d4e..4c64600a2fa 100644
--- a/studio/frontend/src/features/studio/wizard/training-wizard.tsx
+++ b/studio/frontend/src/features/studio/wizard/training-wizard.tsx
@@ -431,7 +431,7 @@ export function TrainingWizard({
title={t("studio.wizard.datasetTitle")}
description={t("studio.wizard.datasetDescription")}
icon={Database02Icon}
- chipTint="var(--chart-4)"
+ chipTint="var(--chart-1)"
dataTour="studio-dataset"
titleAction={<DatasetSourceToggleAction />}
>
@@ -442,7 +442,7 @@ export function TrainingWizard({
title={t("studio.wizard.paramsTitle")}
description={t("studio.wizard.paramsDescription")}
icon={Settings05Icon}
- chipTint="var(--chart-5)"
+ chipTint="var(--chart-1)"
dataTour="studio-params"
titleAction={
<ParamModeToggle mode={paramMode} onChange={onParamModeChange} />
@@ -455,7 +455,7 @@ export function TrainingWizard({
title={t("studio.wizard.configTitle")}
description={t("studio.wizard.configDescription")}
icon={FloppyDiskIcon}
- chipTint="var(--chart-3)"
+ chipTint="var(--chart-1)"
>
<ConfigActions />
</SectionBox>
diff --git a/studio/frontend/src/features/video/video-page.tsx b/studio/frontend/src/features/video/video-page.tsx
index fcac1586287..1a923cb852f 100644
--- a/studio/frontend/src/features/video/video-page.tsx
+++ b/studio/frontend/src/features/video/video-page.tsx
@@ -4605,11 +4605,11 @@ function VideoGenerator({
</div>
{/* The scroll mask provides the fade; leave the footer unpainted to avoid dark-mode banding. */}
- <div className="relative z-10 flex shrink-0 flex-wrap justify-center gap-2 px-4 pt-0.5 pb-4">
+ <div className="relative z-10 flex shrink-0 flex-wrap justify-center gap-2 px-4 pt-0.5 pb-3">
{busy === "generating" ? (
<Button
// Kept in step with the Images Stop control, which uses the same fill.
- className="relative z-10 h-11 px-8 hover:bg-muted dark:hover:bg-muted"
+ className="relative z-10 h-10 px-7 text-ui-13 hover:bg-muted dark:hover:bg-muted"
variant="outline"
onClick={handleCancelGenerate}
>
@@ -4620,7 +4620,7 @@ function VideoGenerator({
<>
<Button
variant="dark"
- className="relative z-10 h-11 px-8 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100"
+ className="relative z-10 h-10 px-7 text-ui-13 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100"
onClick={handleGenerate}
disabled={busy !== null || !status?.loaded}
>
@@ -4630,7 +4630,7 @@ function VideoGenerator({
<Tooltip>
<TooltipTrigger asChild={true}>
<Button
- className="relative z-10 h-11 px-5"
+ className="relative z-10 h-10 px-4 text-ui-13"
variant="secondary"
disabled={busy !== null}
onClick={handleReapply}
diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.ts
index 0ca062ced7f..a8bde8597f2 100644
--- a/studio/frontend/src/i18n/locales/ar.ts
+++ b/studio/frontend/src/i18n/locales/ar.ts
@@ -2980,6 +2980,9 @@ export const ar = {
searchAudio: "البحث في المقاطع الصوتية المؤرشفة",
unarchive: "إلغاء الأرشفة",
unarchiveAll: "إلغاء أرشفة الكل",
+ unarchiveAllInProject: "إلغاء أرشفة الكل في المشروع",
+ deleteAllInProject: "حذف الكل في المشروع",
+ groupActions: "إجراءات {group}",
unarchiveResults: "إلغاء أرشفة النتائج",
deleteResults: "حذف النتائج",
noChats: "لا توجد محادثات تطابق بحثك.",
diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.ts
index 59575ebc367..908ff12c176 100644
--- a/studio/frontend/src/i18n/locales/de.ts
+++ b/studio/frontend/src/i18n/locales/de.ts
@@ -3023,6 +3023,9 @@ export const de = {
searchAudio: "Archivierte Audiodateien suchen",
unarchive: "Aus Archiv wiederherstellen",
unarchiveAll: "Alle wiederherstellen",
+ unarchiveAllInProject: "Alle im Projekt wiederherstellen",
+ deleteAllInProject: "Alle im Projekt löschen",
+ groupActions: "Aktionen für {group}",
unarchiveResults: "Ergebnisse wiederherstellen",
deleteResults: "Ergebnisse löschen",
noChats: "Keine Chats entsprechen deiner Suche.",
diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.ts
index 9443d1ae0cf..9ca5d9f879b 100644
--- a/studio/frontend/src/i18n/locales/en.ts
+++ b/studio/frontend/src/i18n/locales/en.ts
@@ -504,8 +504,8 @@ export const en = {
dataHelp: "Spread requests across GPUs. Dense models must fit on each GPU; MoE models may share experts.",
tensorParallel: "Split layer computations across {count} GPUs.",
inUse: "Unload the model before repairing, restoring or removing its engine.",
- title: "Inference engines",
- description: "Optional engines for supported local text and vision models. Select an installed engine in the model's run settings. Experimental.",
+ title: "More engines",
+ description: "Extra engines for GPUs (Beta). They may run models faster, especially for batched inference. Install here, then choose in model's run settings.",
picker: "Inference engine",
precision: "Precision",
precisionAuto: "Model default",
@@ -3039,6 +3039,9 @@ export const en = {
searchAudio: "Search archived audio",
unarchive: "Unarchive",
unarchiveAll: "Unarchive all",
+ unarchiveAllInProject: "Unarchive all in project",
+ deleteAllInProject: "Delete all in project",
+ groupActions: "Actions for {group}",
unarchiveResults: "Unarchive results",
deleteResults: "Delete results",
noChats: "No chats match your search.",
diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.ts
index 9fc82aee40f..ccd52ee939a 100644
--- a/studio/frontend/src/i18n/locales/es.ts
+++ b/studio/frontend/src/i18n/locales/es.ts
@@ -3015,6 +3015,9 @@ export const es = {
searchAudio: "Buscar audio archivado",
unarchive: "Desarchivar",
unarchiveAll: "Desarchivar todo",
+ unarchiveAllInProject: "Desarchivar todo en el proyecto",
+ deleteAllInProject: "Eliminar todo en el proyecto",
+ groupActions: "Acciones de {group}",
unarchiveResults: "Desarchivar resultados",
deleteResults: "Eliminar resultados",
noChats: "Ningún chat coincide con tu búsqueda.",
diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.ts
index 8603c89e43e..c20bf4c3e2d 100644
--- a/studio/frontend/src/i18n/locales/fr.ts
+++ b/studio/frontend/src/i18n/locales/fr.ts
@@ -3021,6 +3021,9 @@ export const fr = {
searchAudio: "Rechercher des fichiers audio archivés",
unarchive: "Désarchiver",
unarchiveAll: "Tout désarchiver",
+ unarchiveAllInProject: "Tout désarchiver dans le projet",
+ deleteAllInProject: "Tout supprimer dans le projet",
+ groupActions: "Actions pour {group}",
unarchiveResults: "Désarchiver les résultats",
deleteResults: "Supprimer les résultats",
noChats: "Aucune discussion ne correspond à votre recherche.",
diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.ts
index 36588cffde8..9cf9f30aa84 100644
--- a/studio/frontend/src/i18n/locales/he.ts
+++ b/studio/frontend/src/i18n/locales/he.ts
@@ -3096,6 +3096,9 @@ export const he = {
searchAudio: "חיפוש קטעי אודיו בארכיון",
unarchive: "הוצא מהארכיון",
unarchiveAll: "הוצא הכול מהארכיון",
+ unarchiveAllInProject: "הוצא הכול מהארכיון בפרויקט",
+ deleteAllInProject: "מחק הכול בפרויקט",
+ groupActions: "פעולות עבור {group}",
unarchiveResults: "הוצא את התוצאות מהארכיון",
deleteResults: "מחק את התוצאות",
noChats: "אין צ'אטים התואמים לחיפוש.",
diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.ts
index eff99ca88e8..cbe02fcc023 100644
--- a/studio/frontend/src/i18n/locales/hi.ts
+++ b/studio/frontend/src/i18n/locales/hi.ts
@@ -2988,6 +2988,9 @@ export const hi = {
searchAudio: "संग्रहीत ऑडियो खोजें",
unarchive: "संग्रह से निकालें",
unarchiveAll: "सभी को संग्रह से निकालें",
+ unarchiveAllInProject: "प्रोजेक्ट में सभी को संग्रह से निकालें",
+ deleteAllInProject: "प्रोजेक्ट में सभी हटाएँ",
+ groupActions: "{group} के लिए कार्रवाइयाँ",
unarchiveResults: "परिणामों को संग्रह से निकालें",
deleteResults: "परिणाम मिटाएँ",
noChats: "आपकी खोज से मेल खाती कोई चैट नहीं है।",
diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.ts
index 6225cea2fb6..2ac53f8e50a 100644
--- a/studio/frontend/src/i18n/locales/it.ts
+++ b/studio/frontend/src/i18n/locales/it.ts
@@ -2924,6 +2924,9 @@ export const it = {
searchAudio: "Cerca audio archiviati",
unarchive: "Ripristina",
unarchiveAll: "Ripristina tutto",
+ unarchiveAllInProject: "Ripristina tutto nel progetto",
+ deleteAllInProject: "Elimina tutto nel progetto",
+ groupActions: "Azioni per {group}",
unarchiveResults: "Ripristina risultati",
deleteResults: "Elimina risultati",
noChats: "Nessuna chat corrisponde alla ricerca.",
diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.ts
index 8a6e124da84..d94ea59776d 100644
--- a/studio/frontend/src/i18n/locales/ja.ts
+++ b/studio/frontend/src/i18n/locales/ja.ts
@@ -2954,6 +2954,9 @@ export const ja = {
searchAudio: "アーカイブ済み音声を検索",
unarchive: "アーカイブ解除",
unarchiveAll: "すべてアーカイブ解除",
+ unarchiveAllInProject: "プロジェクト内をすべてアーカイブ解除",
+ deleteAllInProject: "プロジェクト内をすべて削除",
+ groupActions: "{group} の操作",
unarchiveResults: "検索結果のアーカイブを解除",
deleteResults: "検索結果を削除",
noChats: "検索に一致するチャットはありません。",
diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.ts
index 420882a0316..e9af73f8f06 100644
--- a/studio/frontend/src/i18n/locales/ko.ts
+++ b/studio/frontend/src/i18n/locales/ko.ts
@@ -2970,6 +2970,9 @@ export const ko = {
searchAudio: "보관된 오디오 검색",
unarchive: "보관 해제",
unarchiveAll: "모두 보관 해제",
+ unarchiveAllInProject: "프로젝트의 모든 항목 보관 해제",
+ deleteAllInProject: "프로젝트의 모든 항목 삭제",
+ groupActions: "{group} 작업",
unarchiveResults: "검색 결과 보관 해제",
deleteResults: "검색 결과 삭제",
noChats: "검색과 일치하는 채팅이 없습니다.",
diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.ts
index 9b051f00938..94990d124b5 100644
--- a/studio/frontend/src/i18n/locales/pt-br.ts
+++ b/studio/frontend/src/i18n/locales/pt-br.ts
@@ -2998,6 +2998,9 @@ export const ptBR = {
searchAudio: "Buscar áudios arquivados",
unarchive: "Desarquivar",
unarchiveAll: "Desarquivar tudo",
+ unarchiveAllInProject: "Desarquivar tudo no projeto",
+ deleteAllInProject: "Excluir tudo no projeto",
+ groupActions: "Ações de {group}",
unarchiveResults: "Desarquivar resultados",
deleteResults: "Excluir resultados",
noChats: "Nenhum chat corresponde à sua busca.",
diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.ts
index ec56b42ec78..f3dfe8dc52f 100644
--- a/studio/frontend/src/i18n/locales/ru.ts
+++ b/studio/frontend/src/i18n/locales/ru.ts
@@ -2994,6 +2994,9 @@ export const ru = {
searchAudio: "Поиск архивного аудио",
unarchive: "Разархивировать",
unarchiveAll: "Разархивировать всё",
+ unarchiveAllInProject: "Разархивировать всё в проекте",
+ deleteAllInProject: "Удалить всё в проекте",
+ groupActions: "Действия для {group}",
unarchiveResults: "Разархивировать результаты",
deleteResults: "Удалить результаты",
noChats: "Нет чатов, соответствующих запросу.",
diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.ts
index 44c8752b8d9..bc8c3704111 100644
--- a/studio/frontend/src/i18n/locales/sv.ts
+++ b/studio/frontend/src/i18n/locales/sv.ts
@@ -3186,6 +3186,9 @@ export const sv = {
searchAudio: "Sök arkiverat ljud",
unarchive: "Avarkivera",
unarchiveAll: "Avarkivera alla",
+ unarchiveAllInProject: "Avarkivera alla i projektet",
+ deleteAllInProject: "Ta bort alla i projektet",
+ groupActions: "Åtgärder för {group}",
unarchiveResults: "Avarkivera resultat",
deleteResults: "Ta bort resultat",
noChats: "Inga chattar matchar din sökning.",
diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.ts
index b86cdfbe06b..0197021f6cd 100644
--- a/studio/frontend/src/i18n/locales/zh-CN.ts
+++ b/studio/frontend/src/i18n/locales/zh-CN.ts
@@ -2932,6 +2932,9 @@ export const zhCN = {
searchAudio: "搜索已归档的音频",
unarchive: "取消归档",
unarchiveAll: "全部取消归档",
+ unarchiveAllInProject: "取消归档项目中的全部内容",
+ deleteAllInProject: "删除项目中的全部内容",
+ groupActions: "{group} 的操作",
unarchiveResults: "取消归档搜索结果",
deleteResults: "删除搜索结果",
noChats: "没有与搜索匹配的聊天。",
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index adc60b4cb13..49c1b10edd9 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -3119,6 +3119,11 @@ html[data-chat-font] .aui-root {
border-radius: calc(var(--radius-md) + 10px) !important;
}
+ /* Audio, Images and Video: 20px textareas and drop zones. */
+ [data-media-rail-root] {
+ --radius-xl: 20px;
+ }
+
/* The model picker keeps the corners it was designed with: the scale it had before the fixed
tiers (derived from a 1.25rem base) and its 1.25rem surface. */
.unsloth-model-selector-menu {
@@ -5003,11 +5008,14 @@ html[data-chat-font] .aui-root {
/* Loading toast keeps its own vertical padding from #7683. */
[data-sonner-toast][data-styled='true'].chat-model-load-toast {
display: flex !important;
- align-items: center !important;
gap: calc(12px * var(--ui-space-scale, 1)) !important;
padding-top: calc(16px * var(--ui-space-scale, 1)) !important;
padding-bottom: calc(18px * var(--ui-space-scale, 1)) !important;
}
+/* Only while loading: the finished toast keeps this class through the shared toast id. */
+[data-sonner-toast][data-styled='true'].chat-model-load-toast:not([data-type='success'], [data-type='warning'], [data-type='error'], [data-type='info']) {
+ align-items: center !important;
+}
[data-sonner-toast][data-styled='true'].chat-model-load-toast [data-content] {
flex: 1 1 auto;
diff --git a/studio/frontend/tests/audio-source-input.test.ts b/studio/frontend/tests/audio-source-input.test.ts
index 128a4782db5..dd23719a800 100644
--- a/studio/frontend/tests/audio-source-input.test.ts
+++ b/studio/frontend/tests/audio-source-input.test.ts
@@ -225,10 +225,7 @@ test("the whole card is the drop target, with every way in", () => {
for (const tab of ["Upload", "Record", "From history", "Saved voice"]) {
assert.ok(card.includes(`label: "${tab}"`), tab);
}
- assert.match(
- card,
- /corner-squircle grid gap-3 rounded-2xl bg-card p-4 ring-1/,
- );
+ assert.doesNotMatch(section, /bg-card|ring-1/);
assert.doesNotMatch(card, /shadow-/);
assert.ok(
hook.indexOf('void drawBlob("local", file)') <
diff --git a/studio/frontend/tests/audio-transcribe-rail.test.ts b/studio/frontend/tests/audio-transcribe-rail.test.ts
index 90717927f03..c1cbfc7c39f 100644
--- a/studio/frontend/tests/audio-transcribe-rail.test.ts
+++ b/studio/frontend/tests/audio-transcribe-rail.test.ts
@@ -35,7 +35,7 @@ test("both switches come from the model's capabilities, an always-on one reads a
test("the footer says why Transcribe is off, Stop replaces it, Mod+Enter runs it", () => {
assert.match(
rail,
- /id=\{blocker \? "transcribe-blocker" : "transcribe-notice"\}[\s\S]*?\{blocker \? blocker\.reason : notice\}\s*<GenerateActions actions=\{blocker\?\.actions\} \/>/,
+ /<BlockerNote id="transcribe-blocker" blocker=\{blocker\} \/>[\s\S]*?id="transcribe-notice"/,
);
assert.match(rail, /onClick=\{running \? onStop : onTranscribe\}/);
assert.match(
diff --git a/studio/frontend/tests/browser-docs-link.test.ts b/studio/frontend/tests/browser-docs-link.test.ts
index 0d9111d8f7f..d8dbe1b5527 100644
--- a/studio/frontend/tests/browser-docs-link.test.ts
+++ b/studio/frontend/tests/browser-docs-link.test.ts
@@ -9,7 +9,8 @@ import { readSrc } from "./helpers/kit.ts";
test("Settings > Browser > Browser use links to its docs page in a new tab", () => {
const settings = readSrc("features/settings/tabs/browser-agent-settings.tsx");
assert.match(settings, /BROWSER_USE_DOCS_URL = "https:\/\/unsloth\.ai\/docs\/basics\/browser-use"/);
- assert.match(settings, /href=\{BROWSER_USE_DOCS_URL\}\s+target="_blank"\s+rel="noreferrer"/);
+ const tab = readSrc("features/settings/tabs/browser-tab.tsx");
+ assert.match(tab, /href=\{BROWSER_USE_DOCS_URL\}\s+target="_blank"\s+rel="noopener noreferrer"/);
});
test("the browser suggests the docs at unsloth.ai/docs, separate from the home page", () => {
diff --git a/studio/frontend/tests/image-seed-inpaint-steps.test.ts b/studio/frontend/tests/image-seed-inpaint-steps.test.ts
index 295176b5c88..00cff3ec6e9 100644
--- a/studio/frontend/tests/image-seed-inpaint-steps.test.ts
+++ b/studio/frontend/tests/image-seed-inpaint-steps.test.ts
@@ -95,8 +95,9 @@ test("the Seed field has Random and Reuse last seed buttons", () => {
/const runSeed = lastSeedOf\(res\.images\);\n\s+if \(runSeed !== null\) setSessionSeed\(runSeed\);/,
);
// A HugeIcons glyph only this lazy page uses still lands in the eager icon chunk via the barrel
- // and pushed the startup budget over, so Reuse last seed draws lucide's Recycle.
- assert.match(page, /<Recycle className="size-4" strokeWidth=\{1\.5\} \/>/);
+ // and pushed the startup budget over, so both seed buttons draw lucide glyphs.
+ assert.match(page, /<Shuffle className="size-4" strokeWidth=\{1\.5\} \/>/);
+ assert.match(page, /<HistoryIcon className="size-4" strokeWidth=\{1\.5\} \/>/);
assert.doesNotMatch(page, /Recycle01Icon/);
});
diff --git a/studio/frontend/tests/sidebar-project-archive.test.ts b/studio/frontend/tests/sidebar-project-archive.test.ts
new file mode 100644
index 00000000000..de427d18630
--- /dev/null
+++ b/studio/frontend/tests/sidebar-project-archive.test.ts
@@ -0,0 +1,32 @@
+// 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 { readSrc } from "./helpers/kit.ts";
+
+const SIDEBAR = readSrc("components/app-sidebar.tsx");
+const menu = SIDEBAR.slice(
+ SIDEBAR.indexOf("function renderProjectRowMenuItems("),
+ SIDEBAR.indexOf("function renderProjectFolderRow("),
+);
+
+test("Archive chats reads every chat in the project, not the sidebar's loaded page", () => {
+ assert.match(
+ menu,
+ /await readAllSidebarRows\(sidebarRowQuery\(\{ projectId: project\.id \}\)\)/,
+ );
+ assert.match(menu, /await archiveChatItems\(all\);/);
+ assert.match(menu, /onSelect=\{\(\) => void archiveProjectChats\(\)\}/);
+ // A collapsed folder lists no rows, so gating on them would disable the item for a full project.
+ assert.doesNotMatch(menu, /listedChatsByProjectId/);
+ assert.doesNotMatch(menu, /disabled=\{projectChats/);
+});
+
+test("a failed read says so instead of archiving nothing silently", () => {
+ assert.match(
+ menu,
+ /catch \(err\) \{\s*toast\.error\(translate\("settings\.data\.failedToArchiveChats"\)/,
+ );
+});
diff --git a/studio/frontend/tests/video-cpu-developer-mode.test.ts b/studio/frontend/tests/video-cpu-developer-mode.test.ts
index b0e08d01523..54353ec53d2 100644
--- a/studio/frontend/tests/video-cpu-developer-mode.test.ts
+++ b/studio/frontend/tests/video-cpu-developer-mode.test.ts
@@ -77,13 +77,10 @@ test("the confirm dialog carries the issue's warning text verbatim", () => {
assert.match(section, /disabled=\{!settings \|\| saving \|\| envForced !== null\}/);
});
-test("the section is rendered for the owner only", () => {
- const tab = readSrc("features/settings/tabs/general-tab.tsx");
- const ownerBlock = tab.indexOf("{isOwner ? (");
- const section = tab.indexOf("<DeveloperModeSection />");
- assert.ok(ownerBlock >= 0 && section > ownerBlock, "DeveloperModeSection outside the owner block");
- const close = tab.indexOf(") : null}", ownerBlock);
- assert.ok(section < close, "DeveloperModeSection outside the owner block");
+test("the section is rendered for the owner only, on the System tab", () => {
+ const tab = readSrc("features/settings/tabs/resources-tab.tsx");
+ assert.match(tab, /\{isOwner \? <DeveloperModeSection \/> : null\}/);
+ assert.doesNotMatch(readSrc("features/settings/tabs/general-tab.tsx"), /DeveloperModeSection/);
});
test("the Video page keeps a CPU (experimental) warning up while the opt-in is in effect", () => {
diff --git a/tests/studio/test_desktop_reliability_frontend_contract.py b/tests/studio/test_desktop_reliability_frontend_contract.py
index 96a05692699..a0efc82117c 100644
--- a/tests/studio/test_desktop_reliability_frontend_contract.py
+++ b/tests/studio/test_desktop_reliability_frontend_contract.py
@@ -2020,7 +2020,7 @@ def test_audio_page_matches_the_image_rail_header_and_action_footer():
assert 'mode === "speak"' in layout
assert '"panel-scroll-fade-action"' in layout
assert '"panel-scroll-fade"' in layout
- assert "relative z-10 flex shrink-0 justify-center px-10 pt-0.5 pb-4" in layout
+ assert "relative z-10 flex shrink-0 justify-center px-10 pt-0.5 pb-3" in layout
assert "btn-float-action" not in layout
assert "absolute inset-x-0 bottom-0" not in layout
assert layout.count("p-6 px-10 @[50rem]:pt-[60px]") == 2
diff --git a/tests/studio/test_settings_compact_overflow_contract.py b/tests/studio/test_settings_compact_overflow_contract.py
index 27e82da80cc..1da76bdc11b 100644
--- a/tests/studio/test_settings_compact_overflow_contract.py
+++ b/tests/studio/test_settings_compact_overflow_contract.py
@@ -9,6 +9,7 @@ SETTINGS_DIALOG = REPO / "studio/frontend/src/features/settings/settings-dialog.
API_MONITOR_PAGE = REPO / "studio/frontend/src/features/api-monitor/api-monitor-page.tsx"
MONITOR_LINK = REPO / "studio/frontend/src/features/settings/components/monitor-link.tsx"
REMOTE_ACCESS = REPO / "studio/frontend/src/features/settings/components/remote-access-section.tsx"
+URL_PILL = REPO / "studio/frontend/src/features/settings/components/url-pill.tsx"
GENERAL_TAB = REPO / "studio/frontend/src/features/settings/tabs/general-tab.tsx"
SETTINGS = REPO / "studio/frontend/src/features/settings"
@@ -56,7 +57,9 @@ def test_remote_access_card_can_shrink():
source = REMOTE_ACCESS.read_text(encoding = "utf-8")
assert '<div className="flex min-w-0 items-start gap-3">' in source
assert '<div className="flex min-w-0 flex-col gap-0.5">' in source
- assert "block w-full break-all border" in source
+ # The URL box itself is the shared pill, which wraps rather than overflowing.
+ assert "<UrlPill url={url} />" in source
+ assert "block w-full break-all border" in URL_PILL.read_text(encoding = "utf-8")
assert "<RemoteUrlPanel url={status?.url ?? null} />" in source