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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: open a skill when its row chevron is clicked (#12375)
Nilay6d2f8523ba14
diff --git a/studio/frontend/src/features/chat/components/chat-skills-dialog.tsx b/studio/frontend/src/features/chat/components/chat-skills-dialog.tsxindex abc75c9e69f..00d509f02a1 100644--- a/studio/frontend/src/features/chat/components/chat-skills-dialog.tsx+++ b/studio/frontend/src/features/chat/components/chat-skills-dialog.tsx@@ -720,11 +720,11 @@ function SkillRow({const t = useT();const usable = skill.valid && !skill.shadowed;const descriptionId = useId();- // The details button covers the row; the switch sits above it, not inside it.+ // The details button covers the row and the switch sits above it; only those two take pointer events.return (<divclassName={cn(- "group relative grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-10 gap-y-1.5 rounded-[14px] border border-border/60 bg-muted/20 px-5 py-4 transition-colors hover:bg-muted/50 dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.06*var(--contrast-wash-gain,1)))]",+ "group pointer-events-none relative grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-10 gap-y-1.5 rounded-[14px] border border-border/60 bg-muted/20 px-5 py-4 transition-colors hover:bg-muted/50 dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.06*var(--contrast-wash-gain,1)))]",skill.shadowed && "opacity-60",)}>@@ -734,7 +734,7 @@ function SkillRow({aria-label={skill.name}aria-describedby={descriptionId}title={(skill.valid ? skill.description : skill.error) ?? undefined}- className="absolute inset-0 cursor-pointer rounded-[14px] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"+ className="pointer-events-auto absolute inset-0 cursor-pointer rounded-[14px] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"/><div className="flex min-w-0 flex-wrap items-center gap-2"><span className="truncate font-medium text-ui-14">{skill.name}</span>@@ -744,7 +744,7 @@ function SkillRow({</div>{/* Lowercase text reads lower than its box, so the controls drop to its x-height. */}<Switch- className="translate-y-[0.11em] text-ui-14"+ className="pointer-events-auto translate-y-[0.11em] text-ui-14"checked={usable && skill.enabled}disabled={!usable || changing}aria-label={t(skill.enabled ? "skills.disable" : "skills.enable", { name: skill.name })}diff --git a/studio/frontend/tests/skills-row-click-target.test.ts b/studio/frontend/tests/skills-row-click-target.test.tsnew file mode 100644index 00000000000..474fce2efb1--- /dev/null+++ b/studio/frontend/tests/skills-row-click-target.test.ts@@ -0,0 +1,25 @@+// 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 DIALOG = readSrc("features/chat/components/chat-skills-dialog.tsx");++const SKILL_ROW = /\nfunction SkillRow\([\s\S]*?\n\}\n/;+const ROW_ROOT = /return \(\s*<div\s+className=\{cn\(\s*"([^"]*)"/;+const TAKES_POINTER = /<(\w+)\b([^<]*?)\bpointer-events-auto\b/g;+const CLICK_THROUGH = /(?:^|\s)pointer-events-none(?:\s|$)/;++test("only the details button and the switch take clicks in a skill row", () => {+ const row = SKILL_ROW.exec(DIALOG)?.[0];+ assert.ok(row, "SkillRow not found");+ assert.match(ROW_ROOT.exec(row)?.[1] ?? "", CLICK_THROUGH);++ const targets = [...row.matchAll(TAKES_POINTER)].map(([, tag, attrs]) =>+ tag === "button" && attrs.includes("onClick={onOpen}") ? "details" : tag,+ );+ assert.deepEqual(targets, ["details", "Switch"]);+});