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: preset and Inpaint icons, aligned preset save row, component file fields at select height (#15530)

Michael Hanff308d0025fc
diff --git a/studio/frontend/src/features/generation-presets/media-generation-preset-control.tsx b/studio/frontend/src/features/generation-presets/media-generation-preset-control.tsx
index c57b5b59b56..19a55df78f2 100644
--- a/studio/frontend/src/features/generation-presets/media-generation-preset-control.tsx
+++ b/studio/frontend/src/features/generation-presets/media-generation-preset-control.tsx
@@ -10,13 +10,13 @@ import {
} from "@/components/ui/popover";
import { ChevronDownStandardIcon } from "@/lib/chevron-icons";
import { cn } from "@/lib/utils";
-import { Delete02Icon } from "@hugeicons/core-free-icons";
-import { HugeiconsIcon } from "@hugeicons/react";
import {
- Bookmark,
- ClipboardPaste,
- ImageUp,
-} from "lucide-react";
+ ClipboardPasteIcon,
+ Delete02Icon,
+ Upload01Icon,
+} from "@hugeicons/core-free-icons";
+import { HugeiconsIcon } from "@hugeicons/react";
+import { Bookmark } from "lucide-react";
import { Fragment, useState } from "react";
import { DEFAULT_PRESET_NAME } from "./preset-policy";
import { Tick02Icon } from "@/lib/tick-icon";
@@ -191,10 +191,11 @@ export function MediaGenerationPresetControl({
})}
</div>
- <div className="shrink-0 border-t border-border/60 bg-muted/20 p-3">
+ {/* px-2 as the preset list, so the name field and Save meet the rows' hover edges. */}
+ <div className="shrink-0 border-t border-border/60 bg-muted/20 px-2 py-3">
<label
htmlFor={`${kind}-generation-preset-name`}
- className="mb-2 block text-xs font-medium"
+ className="mb-2 block px-1 text-xs font-medium"
>
Save current settings
</label>
@@ -235,7 +236,7 @@ export function MediaGenerationPresetControl({
}}
className="mt-3 flex h-8 w-full items-center justify-center gap-1.5 rounded-full text-xs text-muted-foreground transition-colors hover:bg-muted/70 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50"
>
- <ImageUp className="size-3.5" />
+ <HugeiconsIcon icon={Upload01Icon} strokeWidth={1.75} className="size-3.5" />
Load settings from an image
</button>
) : null}
@@ -249,7 +250,7 @@ export function MediaGenerationPresetControl({
}}
className="mt-1 flex h-8 w-full items-center justify-center gap-1.5 rounded-full text-xs text-muted-foreground transition-colors hover:bg-muted/70 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50"
>
- <ClipboardPaste className="size-3.5" />
+ <HugeiconsIcon icon={ClipboardPasteIcon} strokeWidth={1.75} className="size-3.5" />
Paste generation parameters
</button>
) : null}
diff --git a/studio/frontend/src/features/images/images-page.tsx b/studio/frontend/src/features/images/images-page.tsx
index aefa09f49a9..51c0dbe3784 100644
--- a/studio/frontend/src/features/images/images-page.tsx
+++ b/studio/frontend/src/features/images/images-page.tsx
@@ -952,14 +952,16 @@ function AdvancedTextField({
{hint && <InfoHint>{hint}</InfoHint>}
</span>
{multiline ? (
+ // One line at the selects' 36px that grows with each file. No resize grip or inner scrollbar: WebKit paints
+ // both square over the 18px corners.
<Textarea
aria-label={label}
- rows={2}
+ rows={1}
spellCheck={false}
placeholder={placeholder}
value={value}
onChange={(e) => onValueChange(e.target.value)}
- className="min-h-0 resize-y font-mono text-xs"
+ className="min-h-9 overflow-hidden rounded-[18px] py-[calc((var(--spacing)*9-2px-1lh)/2)] font-mono text-xs leading-5"
/>
) : (
<Input
@@ -968,7 +970,7 @@ function AdvancedTextField({
placeholder={placeholder}
value={value}
onChange={(e) => onValueChange(e.target.value)}
- className="h-8 font-mono text-xs"
+ className="h-9 font-mono text-xs"
/>
)}
</div>
diff --git a/studio/frontend/src/features/images/workflows.ts b/studio/frontend/src/features/images/workflows.ts
index 28fd38b56ab..afba68174f7 100644
--- a/studio/frontend/src/features/images/workflows.ts
+++ b/studio/frontend/src/features/images/workflows.ts
@@ -6,11 +6,12 @@ import {
Edit03Icon,
ImageUpload01Icon,
MagicWand01Icon,
- PaintBrush02Icon,
SparklesIcon,
ZoomInAreaIcon,
} from "@hugeicons/core-free-icons";
import type { IconSvgElement } from "@hugeicons/react";
+// Relative with .ts: the node tests import this file and cannot resolve @/.
+import { AiPaintbrushIcon } from "../../lib/ai-paintbrush-icon.ts";
export type WorkflowId =
| "create"
@@ -56,7 +57,7 @@ export const WORKFLOW_TABS: Array<{
{
id: "inpaint",
label: "Inpaint",
- icon: PaintBrush02Icon,
+ icon: AiPaintbrushIcon,
requires: "inpaint",
hint: "Regenerate a painted region",
},
diff --git a/studio/frontend/src/lib/ai-paintbrush-icon.ts b/studio/frontend/src/lib/ai-paintbrush-icon.ts
new file mode 100644
index 00000000000..8c6948db387
--- /dev/null
+++ b/studio/frontend/src/lib/ai-paintbrush-icon.ts
@@ -0,0 +1,41 @@
+// 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 { IconSvgElement } from "@hugeicons/react";
+
+// Hugeicons AiPaintbrushIcon (MIT, stroke rounded), added to core-free-icons after the 4.1 this pins.
+export const AiPaintbrushIcon: IconSvgElement = [
+ [
+ "path",
+ {
+ d: "M18.922 16.4224L21.4819 18.9835C21.8135 19.315 21.9997 19.7647 21.9997 20.2335C21.9997 21.2098 21.2083 22.0013 20.2319 22.0013C19.7631 22.0013 19.3135 21.815 18.9819 21.4835L16.4234 18.9238C16.1633 18.6636 15.7815 18.5672 15.4291 18.6728L12.1439 19.6572C11.4393 19.8684 10.6757 19.6757 10.1556 19.1556L9.35355 18.3536C9.12718 18.1272 9 17.8201 9 17.5C9 17.1799 9.12718 16.8728 9.35355 16.6464L16.6464 9.35355C16.8728 9.12718 17.1799 9 17.5 9C17.8201 9 18.1272 9.12718 18.3536 9.35355L19.1553 10.1553C19.6755 10.6755 19.8681 11.4395 19.6567 12.1442L18.6714 15.428C18.5657 15.7803 18.6619 16.1622 18.922 16.4224Z",
+ stroke: "currentColor",
+ strokeLinecap: "round",
+ strokeLinejoin: "round",
+ strokeWidth: "1.5",
+ key: "0",
+ },
+ ],
+ [
+ "path",
+ {
+ d: "M9.5 3.5L7.29289 5.70711C7.10536 5.89464 7 6.149 7 6.41421V9H4.53518C4.20083 9 3.8886 9.1671 3.70313 9.4453L3.21779 10.1733C3.07578 10.3863 3 10.6366 3 10.8926C3 11.2775 3.17094 11.6425 3.4666 11.8888L9 16.5",
+ stroke: "currentColor",
+ strokeLinecap: "round",
+ strokeLinejoin: "round",
+ strokeWidth: "1.5",
+ key: "1",
+ },
+ ],
+ [
+ "path",
+ {
+ d: "M15 2.75V4M15 4V5.25M15 4H14M15 4H16M17 4L16.1325 3.71082C15.7343 3.57811 15.4219 3.26568 15.2892 2.86754L15 2L14.7108 2.86754C14.5781 3.26568 14.2657 3.57811 13.8675 3.71082L13 4L13.8675 4.28918C14.2657 4.42189 14.5781 4.73432 14.7108 5.13246L15 6L15.2892 5.13246C15.4219 4.73432 15.7343 4.42189 16.1325 4.28918L17 4Z",
+ stroke: "currentColor",
+ strokeLinecap: "round",
+ strokeLinejoin: "round",
+ strokeWidth: "1.5",
+ key: "2",
+ },
+ ],
+];
diff --git a/studio/frontend/tests/presets-icons-fields.test.ts b/studio/frontend/tests/presets-icons-fields.test.ts
new file mode 100644
index 00000000000..1b3bec63353
--- /dev/null
+++ b/studio/frontend/tests/presets-icons-fields.test.ts
@@ -0,0 +1,54 @@
+// 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 { WORKFLOW_TABS } from "../src/features/images/workflows.ts";
+import { AiPaintbrushIcon } from "../src/lib/ai-paintbrush-icon.ts";
+import { readSrc } from "./helpers/kit.ts";
+
+const PRESETS = readSrc(
+ "features/generation-presets/media-generation-preset-control.tsx",
+);
+
+test("preset menu actions use Hugeicons' upload and clipboard-paste", () => {
+ assert.match(
+ PRESETS,
+ /<HugeiconsIcon icon=\{Upload01Icon\}[^>]*\/>\s*Load settings from an image/,
+ );
+ assert.match(
+ PRESETS,
+ /<HugeiconsIcon icon=\{ClipboardPasteIcon\}[^>]*\/>\s*Paste generation parameters/,
+ );
+ assert.doesNotMatch(PRESETS, /ImageUp|ClipboardPaste,/);
+});
+
+test("Inpaint uses the vendored AI paintbrush", () => {
+ assert.equal(
+ WORKFLOW_TABS.find((tab) => tab.id === "inpaint")?.icon,
+ AiPaintbrushIcon,
+ );
+ assert.equal(AiPaintbrushIcon.length, 3);
+});
+
+test("the save row shares the preset list's 8px sides", () => {
+ assert.match(PRESETS, /border-t border-border\/60 bg-muted\/20 px-2 py-3/);
+ assert.match(PRESETS, /className="mb-2 block px-1 text-xs font-medium"/);
+ assert.match(
+ PRESETS,
+ /max-h-48 min-h-0 overflow-y-auto overscroll-contain p-2/,
+ );
+});
+
+test("component file fields are the selects' 36px", () => {
+ const page = readSrc("features/images/images-page.tsx");
+ assert.match(
+ page,
+ /rows=\{1\}[\s\S]{0,200}className="min-h-9 overflow-hidden rounded-\[18px\] py-\[calc\(\(var\(--spacing\)\*9-2px-1lh\)\/2\)\] font-mono text-xs leading-5"/,
+ );
+ assert.match(
+ page,
+ /onChange=\{\(e\) => onValueChange\(e\.target\.value\)\}\s*className="h-9 font-mono text-xs"/,
+ );
+});