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: matching Hugeicons permission icons, larger and top-aligned (#15944)

Michael Han548dd8ec8778
diff --git a/studio/frontend/src/features/chat/permission-mode-select.tsx b/studio/frontend/src/features/chat/permission-mode-select.tsx
index 9aa6683f8dc..3132dd2ec82 100644
--- a/studio/frontend/src/features/chat/permission-mode-select.tsx
+++ b/studio/frontend/src/features/chat/permission-mode-select.tsx
@@ -1,7 +1,6 @@
// 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 { Hand, type LucideProps, ShieldCheck } from "lucide-react";
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
import type { ComponentType } from "react";
import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
@@ -29,6 +28,7 @@ import {
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { ChevronDownStandardIcon, ChevronRightStandardIcon } from "@/lib/chevron-icons";
+import { HandIcon, ShieldCheckIcon } from "@/lib/hugeicons-derived";
import { ShieldAlertGlyph } from "@/lib/shield-alert-icon";
import { SparklesGlyph } from "@/lib/sparkles-icon";
import { openExternalLink } from "@/lib/open-link";
@@ -58,9 +58,26 @@ import {
useChatRuntimeStore,
} from "./stores/chat-runtime-store";
-/** The hand reads larger than the shields; scale keeps its box. */
-function ApprovalHandIcon({ className, ...props }: LucideProps) {
- return <Hand className={cn("scale-[0.92]", className)} {...props} />;
+type GlyphProps = { className?: string; strokeWidth?: number };
+
+function ApprovalHandIcon({ className, strokeWidth }: GlyphProps) {
+ return (
+ <HugeiconsIcon
+ icon={HandIcon}
+ className={className}
+ strokeWidth={strokeWidth}
+ />
+ );
+}
+
+function ShieldCheckGlyph({ className, strokeWidth }: GlyphProps) {
+ return (
+ <HugeiconsIcon
+ icon={ShieldCheckIcon}
+ className={className}
+ strokeWidth={strokeWidth}
+ />
+ );
}
/** Full access stays last: it disables approval prompts and the sandbox. */
@@ -80,7 +97,7 @@ export const PERMISSION_MODE_OPTIONS: readonly {
value: "auto",
label: "Approve for me",
description: "Only ask for actions that look risky",
- icon: ShieldCheck,
+ icon: ShieldCheckGlyph,
},
{
value: "off",
@@ -359,7 +376,13 @@ export function PermissionModeMenuItems({
option.value === "full" && "menu-item-full-access",
)}
>
- <option.icon className="mt-0.5 size-4 shrink-0" strokeWidth={2} />
+ <option.icon
+ className={cn(
+ "permission-mode-icon mt-[calc(0.14rem*var(--ui-font-scale,1))] size-[calc(var(--ui-icon-size)*1.15)] shrink-0",
+ option.value === "ask" && "scale-[0.94]",
+ )}
+ strokeWidth={2}
+ />
<span className="flex min-w-0 flex-1 flex-col gap-0.5">
<span className="text-ui-13 leading-tight">{option.label}</span>
<span className="text-xs font-normal leading-snug text-muted-foreground">
diff --git a/studio/frontend/src/features/settings/tabs/sandbox-tab.tsx b/studio/frontend/src/features/settings/tabs/sandbox-tab.tsx
index 406c308605a..2cecacfc013 100644
--- a/studio/frontend/src/features/settings/tabs/sandbox-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/sandbox-tab.tsx
@@ -230,7 +230,7 @@ function SelectedOptionDescription({ name, detail }: { name: string; detail: str
// Drops the edge-to-edge glyph to the label's cap line.
const ROW_ICON_CLASS =
- "me-1.5 mt-[calc(0.1875rem*var(--ui-font-scale,1))] size-[calc(20px*var(--ui-space-scale,1))]";
+ "me-1.5 mt-[calc(0.2rem*var(--ui-font-scale,1))] size-[calc(22px*var(--ui-space-scale,1))]";
/** Per account, so every account sees it; the OS sandbox sections below are the owner's. */
function PermissionsSection() {
@@ -258,7 +258,7 @@ function PermissionsSection() {
{choice.options.map((option) => (
<SettingsRow
key={option.value}
- icon={<option.icon className={ROW_ICON_CLASS} strokeWidth={1.75} />}
+ icon={<option.icon className={cn(ROW_ICON_CLASS, option.value === "ask" && "scale-[0.94]")} strokeWidth={1.75} />}
iconAlign="top"
label={t(`settings.general.permissions.names.${option.value}`)}
description={t(`settings.general.permissions.details.${option.value}`)}
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index 2a56a8d1768..b6cb5f7b5a3 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -4386,7 +4386,7 @@ html[data-chat-font] .aui-root {
[data-slot="context-menu-item"],
[data-slot="context-menu-sub-trigger"]
)
- svg:not(.unsloth-tick) {
+ svg:not(.unsloth-tick):not(.permission-mode-icon) {
width: var(--ui-icon-size) !important;
height: var(--ui-icon-size) !important;
}
diff --git a/studio/frontend/src/lib/hugeicons-derived.ts b/studio/frontend/src/lib/hugeicons-derived.ts
index e3c8326906f..0c1462495e7 100644
--- a/studio/frontend/src/lib/hugeicons-derived.ts
+++ b/studio/frontend/src/lib/hugeicons-derived.ts
@@ -148,3 +148,17 @@ export const FileSearchIcon: IconSvgElement = [
["path", { d: "M13.65 16.95L15.3 18.6M14.2 14.75C14.2 16.2688 12.9688 17.5 11.45 17.5C9.9312 17.5 8.7 16.2688 8.7 14.75C8.7 13.2312 9.9312 12 11.45 12C12.9688 12 14.2 13.2312 14.2 14.75Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "0" }],
["path", { d: "M13.1 1.55V2.1C13.1 5.2113 13.1 6.7669 14.0666 7.7335C15.0331 8.7 16.5888 8.7 19.7 8.7H20.25M20.8 10.5226V14.2C20.8 18.3483 20.8 20.4226 19.5112 21.7112C18.2226 23 16.1483 23 12 23C7.8516 23 5.7775 23 4.4887 21.7112C3.2 20.4226 3.2 18.3483 3.2 14.2V9.2014C3.2 5.6319 3.2 3.8471 4.1747 2.6383C4.3716 2.394 4.594 2.1716 4.8383 1.9747C6.0471 1 7.8319 1 11.4014 1C12.1775 1 12.5655 1 12.9209 1.1254C12.9948 1.1515 13.0672 1.1815 13.138 1.2153C13.478 1.3779 13.7523 1.6523 14.3011 2.2011L19.5112 7.4113C20.1472 8.0471 20.465 8.3651 20.6326 8.7694C20.8 9.1737 20.8 9.6233 20.8 10.5226Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "1" }],
];
+
+// Hugeicons "shield-check" (4.3.5) with "tick-02" at 55%.
+export const ShieldCheckIcon: IconSvgElement = [
+ ["path", { d: "M20.9922 11.1833V8.28029C20.9922 6.64029 20.9922 5.82028 20.5881 5.28529C20.184 4.75029 19.2703 4.49056 17.4429 3.9711C16.1944 3.6162 15.0938 3.18863 14.2145 2.79829C13.0156 2.2661 12.4161 2 11.9922 2C11.5682 2 10.9688 2.2661 9.7699 2.79829C8.89057 3.18863 7.79002 3.61619 6.54152 3.9711C4.71411 4.49056 3.80041 4.75029 3.3963 5.28529C2.99219 5.82028 2.99219 6.64029 2.99219 8.28029V11.1833C2.99219 16.8085 8.05496 20.1835 10.5861 21.5194C11.1932 21.8398 11.4968 22 11.9922 22C12.4876 22 12.7911 21.8398 13.3982 21.5194C15.9294 20.1835 20.9922 16.8085 20.9922 11.1833Z", stroke: "currentColor", strokeLinecap: "round", strokeWidth: "1.5", key: "0" }],
+ ["path", { d: "M8.15 12.3L10.075 14.225L15.85 8.175", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "1" }]
+];
+
+// Hugeicons "hand" (4.3.5).
+export const HandIcon: IconSvgElement = [
+ ["path", { d: "M18.5 11.5V8.75C18.5 7.7835 19.2835 7 20.25 7C21.2165 7 22 7.7835 22 8.75V14.8C22 18.7765 18.7764 22 14.8 22H12.0588M8 14L5.61507 11.2176C5.22468 10.7621 4.65476 10.5 4.05489 10.5H3.91898C2.85916 10.5 2 11.3592 2 12.419C2 12.7978 2.11214 13.1682 2.32229 13.4834L5.7812 18.6718C7.16738 20.7511 9.50102 22 12 22", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "0" }],
+ ["path", { d: "M18.5 8.5V5.75C18.5 4.7835 17.7165 4 16.75 4C15.7835 4 15 4.7835 15 5.75V10.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "1" }],
+ ["path", { d: "M15 10.5V3.75C15 2.7835 14.2165 2 13.25 2C12.2835 2 11.5 2.7835 11.5 3.75V10", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "2" }],
+ ["path", { d: "M11.5 10V5.75C11.5 4.7835 10.7165 4 9.75 4C8.7835 4 8 4.7835 8 5.75V14", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", key: "3" }]
+];
diff --git a/studio/frontend/src/lib/shield-alert-icon.tsx b/studio/frontend/src/lib/shield-alert-icon.tsx
index 543d0e23027..3fcb88379a2 100644
--- a/studio/frontend/src/lib/shield-alert-icon.tsx
+++ b/studio/frontend/src/lib/shield-alert-icon.tsx
@@ -1,7 +1,43 @@
// 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 { ShieldAlert } from "lucide-react";
+import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";
+
+// Hugeicons "Shield Alert", newer than the pinned free-icons package.
+export const ShieldAlertIcon: IconSvgElement = [
+ [
+ "path",
+ {
+ d: "M11.9922 8L11.9922 12",
+ stroke: "currentColor",
+ strokeLinecap: "round",
+ strokeLinejoin: "round",
+ strokeWidth: "1.5",
+ key: "0",
+ },
+ ],
+ [
+ "path",
+ {
+ d: "M12.1172 15.75L11.9922 15.75M12.2422 15.75C12.2422 15.8881 12.1303 16 11.9922 16C11.8541 16 11.7422 15.8881 11.7422 15.75C11.7422 15.6119 11.8541 15.5 11.9922 15.5C12.1303 15.5 12.2422 15.6119 12.2422 15.75Z",
+ stroke: "currentColor",
+ strokeLinecap: "round",
+ strokeLinejoin: "round",
+ strokeWidth: "1.5",
+ key: "1",
+ },
+ ],
+ [
+ "path",
+ {
+ d: "M20.9922 11.1835V8.28041C20.9922 6.64041 20.9922 5.82041 20.5881 5.28541C20.184 4.75042 19.2703 4.49068 17.4429 3.97122C16.1944 3.61632 15.0938 3.18875 14.2145 2.79841C13.0156 2.26622 12.4161 2.00012 11.9922 2.00012C11.5682 2.00012 10.9688 2.26622 9.7699 2.79841C8.89057 3.18875 7.79002 3.61632 6.54152 3.97122C4.71411 4.49068 3.80041 4.75042 3.3963 5.28541C2.99219 5.82041 2.99219 6.64041 2.99219 8.28041V11.1835C2.99219 16.8086 8.05496 20.1836 10.5861 21.5195C11.1932 21.8399 11.4968 22.0001 11.9922 22.0001C12.4876 22.0001 12.7911 21.8399 13.3982 21.5195C15.9294 20.1836 20.9922 16.8086 20.9922 11.1835Z",
+ stroke: "currentColor",
+ strokeLinecap: "round",
+ strokeWidth: "1.5",
+ key: "2",
+ },
+ ],
+];
export function ShieldAlertGlyph({
className,
@@ -10,5 +46,11 @@ export function ShieldAlertGlyph({
className?: string;
strokeWidth?: number;
}) {
- return <ShieldAlert className={className} strokeWidth={strokeWidth} />;
+ return (
+ <HugeiconsIcon
+ icon={ShieldAlertIcon}
+ className={className}
+ strokeWidth={strokeWidth}
+ />
+ );
}
diff --git a/studio/frontend/src/lib/sparkles-icon.tsx b/studio/frontend/src/lib/sparkles-icon.tsx
index 4dcf463c29d..6811d88ffdc 100644
--- a/studio/frontend/src/lib/sparkles-icon.tsx
+++ b/studio/frontend/src/lib/sparkles-icon.tsx
@@ -3,14 +3,14 @@
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";
-// Hugeicons "AI Security 03" (stroke-rounded).
+// Hugeicons "shield-check" outline with "sparkle" at 55%, raised 2%.
export const SparklesIcon: IconSvgElement = [
[
"path",
{
- d: "M11.6769 8.67348C11.8274 8.43697 12.1726 8.43697 12.3231 8.67348L12.7586 9.35767C13.2401 10.1143 13.8818 10.756 14.6384 11.2375L15.3226 11.6729C15.5591 11.8235 15.5591 12.1687 15.3226 12.3192L14.6384 12.7547C13.8818 13.2362 13.2401 13.8779 12.7586 14.6345L12.3231 15.3187C12.1726 15.5552 11.8274 15.5552 11.6769 15.3187L11.2414 14.6345C10.7599 13.8779 10.1182 13.2362 9.36157 12.7547L8.67738 12.3192C8.44087 12.1687 8.44087 11.8235 8.67738 11.6729L9.36157 11.2375C10.1182 10.756 10.7599 10.1143 11.2414 9.35767L11.6769 8.67348Z",
+ d: "M20.9922 11.1833V8.28029C20.9922 6.64029 20.9922 5.82028 20.5881 5.28529C20.184 4.75029 19.2703 4.49056 17.4429 3.9711C16.1944 3.6162 15.0938 3.18863 14.2145 2.79829C13.0156 2.2661 12.4161 2 11.9922 2C11.5682 2 10.9688 2.2661 9.7699 2.79829C8.89057 3.18863 7.79002 3.61619 6.54152 3.9711C4.71411 4.49056 3.80041 4.75029 3.3963 5.28529C2.99219 5.82028 2.99219 6.64029 2.99219 8.28029V11.1833C2.99219 16.8085 8.05496 20.1835 10.5861 21.5194C11.1932 21.8398 11.4968 22 11.9922 22C12.4876 22 12.7911 21.8398 13.3982 21.5194C15.9294 20.1835 20.9922 16.8085 20.9922 11.1833Z",
stroke: "currentColor",
- strokeLinejoin: "round",
+ strokeLinecap: "round",
strokeWidth: "1.5",
key: "0",
},
@@ -18,8 +18,9 @@ export const SparklesIcon: IconSvgElement = [
[
"path",
{
- d: "M3.9068 5.28387C6.87149 5.4984 8.78311 2.49713 12.0262 2.49713C15.2208 2.43341 16.784 5.32395 20.059 5.32395C21.8147 14.2606 18.1622 19.8743 12.053 21.4961C6.38992 20.15 2.13481 14.4788 3.9068 5.28387Z",
+ d: "M11.1903 8.8468C11.6192 8.0623 11.8337 7.67 11.9977 7.67C12.1617 7.67 12.3761 8.0623 12.8051 8.8468C13.2466 9.6543 13.8366 10.2512 14.6669 10.706C15.4528 11.1364 15.8457 11.3516 15.8457 11.5158C15.8457 11.6799 15.4525 11.8954 14.6661 12.3262C13.8594 12.7681 13.2631 13.3588 12.8088 14.19C12.3789 14.9766 12.1639 15.37 11.9999 15.37C11.8359 15.37 11.6207 14.9764 11.1903 14.1892C10.7489 13.3816 10.1589 12.7847 9.3285 12.33C8.54 11.8981 8.1457 11.6822 8.1457 11.518C8.1457 11.3538 8.54 11.1379 9.3285 10.706C10.1589 10.2512 10.7489 9.6543 11.1903 8.8468Z",
stroke: "currentColor",
+ strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
key: "1",
diff --git a/studio/frontend/tests/account-permissions.test.ts b/studio/frontend/tests/account-permissions.test.ts
index e5086cb6b72..01a4ecfe1ba 100644
--- a/studio/frontend/tests/account-permissions.test.ts
+++ b/studio/frontend/tests/account-permissions.test.ts
@@ -87,9 +87,8 @@ function permissionUi(
},
"lucide-react": {
ChevronDown: "ChevronDown",
- Hand: "Hand",
- ShieldCheck: "ShieldCheck",
},
+ "@/lib/hugeicons-derived": { HandIcon: "HandIcon", ShieldCheckIcon: "ShieldCheckIcon" },
"radix-ui": {
DropdownMenu: {
Item: "DropdownMenuPrimitive.Item",