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.

Chat UI polish: template editor reset, circular action button hovers (#6151)

Michael Hanc689dc586a46
diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsx
index 575fd20a06a..7baa69571c9 100644
--- a/studio/frontend/src/components/app-sidebar.tsx
+++ b/studio/frontend/src/components/app-sidebar.tsx
@@ -1169,7 +1169,7 @@ export function AppSidebar() {
}
}}
>
- <DialogContent className="menu-flat-destructive corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-md">
+ <DialogContent className="menu-flat-destructive corner-squircle dialog-soft-surface sm:max-w-md">
<DialogHeader>
<DialogTitle>
{confirmingDelete?.kind === "run"
@@ -1249,7 +1249,7 @@ export function AppSidebar() {
if (!open) setRenamingTarget(null);
}}
>
- <DialogContent className="corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-md">
+ <DialogContent className="corner-squircle dialog-soft-surface sm:max-w-md">
<DialogHeader>
<DialogTitle>
{renamingTarget?.kind === "run"
@@ -1314,7 +1314,7 @@ export function AppSidebar() {
}
}}
>
- <DialogContent className="corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-md">
+ <DialogContent className="corner-squircle dialog-soft-surface sm:max-w-md">
<DialogHeader>
<DialogTitle>
{projectCreateMoveTarget ? "Move to new project" : "New project"}
diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsx
index 0a165724d00..84e16540795 100644
--- a/studio/frontend/src/components/assistant-ui/thread.tsx
+++ b/studio/frontend/src/components/assistant-ui/thread.tsx
@@ -785,7 +785,7 @@ const ThreadWelcome: FC<{
return (
<div className="aui-thread-welcome-root mx-auto my-auto flex w-full max-w-(--thread-max-width) grow flex-col">
- <div className="aui-thread-welcome-center flex w-full grow flex-col items-center justify-start pt-[28.5vh]">
+ <div className="aui-thread-welcome-center flex w-full grow flex-col items-center justify-start pt-[27.5vh]">
<div className="aui-thread-welcome-message flex w-full flex-col justify-center gap-9 px-4">
{/* Center the greeting (sloth + title) over the composer. */}
<div className="flex flex-row items-center justify-center gap-[15px]">
@@ -1767,6 +1767,7 @@ const WebSearchToggle: FC = () => {
}
}}
className="composer-pill-btn"
+ data-pill-label="Search"
data-active={toolsEnabled && !disabled ? "true" : "false"}
aria-label={toolsEnabled ? "Disable web search" : "Enable web search"}
>
@@ -1802,6 +1803,7 @@ const CodeToolsToggle: FC = () => {
disabled={disabled}
onClick={() => setCodeToolsEnabled(!codeToolsEnabled)}
className="composer-pill-btn"
+ data-pill-label="Code"
data-active={codeToolsEnabled && !disabled ? "true" : "false"}
aria-label={
codeToolsEnabled ? "Disable code execution" : "Enable code execution"
@@ -1843,6 +1845,7 @@ const ImagesToggle: FC = () => {
disabled={disabled}
onClick={() => setImageToolsEnabled(!imageToolsEnabled)}
className="composer-pill-btn"
+ data-pill-label="Images"
data-active={imageToolsEnabled && !disabled ? "true" : "false"}
aria-label={
imageToolsEnabled
@@ -1869,6 +1872,7 @@ const ArtifactsToggle: FC = () => {
type="button"
onClick={() => setArtifactsEnabled(false)}
className="composer-pill-btn"
+ data-pill-label="Canvas"
data-active="true"
aria-label="Disable canvas"
>
@@ -2256,11 +2260,7 @@ const ComposerToolsMenu: FC<{ side?: "top" | "bottom" }> = ({
<MoreHorizontalIcon className="size-4" />
More
</DropdownMenuSubTrigger>
- <DropdownMenuSubContent className="w-[200px]">
- <DropdownMenuItem onSelect={() => startCompare()}>
- <Columns2Icon />
- Compare chat
- </DropdownMenuItem>
+ <DropdownMenuSubContent className="unsloth-plus-menu w-[200px]">
<DropdownMenuSub>
<DropdownMenuSubTrigger>
<HugeiconsIcon icon={Bookmark02Icon} strokeWidth={2} />
@@ -2284,6 +2284,10 @@ const ComposerToolsMenu: FC<{ side?: "top" | "bottom" }> = ({
</DropdownMenuItem>
</DropdownMenuSubContent>
</DropdownMenuSub>
+ <DropdownMenuItem onSelect={() => startCompare()}>
+ <Columns2Icon />
+ Compare chat
+ </DropdownMenuItem>
<DropdownMenuSub>
<DropdownMenuSubTrigger
disabled={!activeThreadId || messageCount === 0}
@@ -2634,7 +2638,7 @@ const AssistantActionBar: FC = () => {
return (
<ActionBarPrimitive.Root
hideWhenRunning={true}
- className="aui-assistant-action-bar-root col-start-3 row-start-2 flex items-center gap-1 text-chat-icon-fg [&_button:not([data-slot=message-timing-trigger])]:size-8 [&_button]:!rounded-[10px] [&_button:hover]:bg-chat-icon-bg-hover [&_button:hover]:text-chat-icon-fg-hover"
+ className="aui-assistant-action-bar-root col-start-3 row-start-2 flex items-center gap-1 text-chat-icon-fg [&_button:not([data-slot=message-timing-trigger])]:size-8 [&_button]:!rounded-full [&_button:hover]:bg-chat-icon-bg-hover [&_button:hover]:text-chat-icon-fg-hover"
>
<CopyButton />
<ActionBarPrimitive.Reload asChild={true}>
@@ -2714,7 +2718,7 @@ const UserActionBar: FC = () => {
return (
<ActionBarPrimitive.Root
autohide="always"
- className="aui-user-action-bar-root flex gap-1 text-chat-icon-fg [&_button]:size-8 [&_button]:!rounded-[10px] [&_button:hover]:bg-chat-icon-bg-hover [&_button:hover]:text-chat-icon-fg-hover"
+ className="aui-user-action-bar-root flex gap-1 text-chat-icon-fg [&_button]:size-8 [&_button]:!rounded-full [&_button:hover]:bg-chat-icon-bg-hover [&_button:hover]:text-chat-icon-fg-hover"
>
<CopyButton />
<ActionBarPrimitive.Edit asChild={true}>
diff --git a/studio/frontend/src/features/chat/chat-settings-sheet.tsx b/studio/frontend/src/features/chat/chat-settings-sheet.tsx
index 96415c4da0b..0bd9d8eee61 100644
--- a/studio/frontend/src/features/chat/chat-settings-sheet.tsx
+++ b/studio/frontend/src/features/chat/chat-settings-sheet.tsx
@@ -323,6 +323,7 @@ function saveCollapsibleOpen(label: string, open: boolean) {
function CollapsibleSection({
label,
labelHref,
+ headerAction,
children,
defaultOpen = false,
first = false,
@@ -334,6 +335,12 @@ function CollapsibleSection({
* are siblings rather than an <a> nested in a <button> (invalid HTML).
*/
labelHref?: string;
+ /**
+ * Optional control rendered before the chevron (e.g. an edit icon). The
+ * label and chevron become sibling toggles so the action is not a button
+ * nested in a button.
+ */
+ headerAction?: ReactNode;
children?: ReactNode;
defaultOpen?: boolean;
first?: boolean;
@@ -383,6 +390,29 @@ function CollapsibleSection({
/>
</button>
</div>
+ ) : headerAction ? (
+ <div className={headerClasses}>
+ <button
+ type="button"
+ onClick={toggle}
+ className="flex min-w-0 flex-1 cursor-pointer items-center text-left leading-none transition-colors hover:text-nav-fg"
+ >
+ <span className="leading-none">{label}</span>
+ </button>
+ <span className="flex shrink-0 items-center gap-1">
+ {headerAction}
+ <button
+ type="button"
+ onClick={toggle}
+ aria-label={open ? `Collapse ${label}` : `Expand ${label}`}
+ className="flex shrink-0 cursor-pointer items-center leading-none transition-colors hover:text-nav-fg"
+ >
+ <ChevronDown
+ className={cn("size-3.5", open ? "rotate-0" : "-rotate-90")}
+ />
+ </button>
+ </span>
+ </div>
) : (
<button
type="button"
@@ -497,16 +527,12 @@ export function ChatSettingsPanel({
const specDirty = speculativeType !== loadedSpeculativeType;
const specDraftDirty = specDraftNMax !== loadedSpecDraftNMax;
const modelSettingsDirty = kvDirty || ctxDirty || specDirty || specDraftDirty;
- const chatTemplateOverride = useChatRuntimeStore(
- (s) => s.chatTemplateOverride,
- );
const loadedChatTemplateOverride = useChatRuntimeStore(
(s) => s.loadedChatTemplateOverride,
);
const setChatTemplateOverride = useChatRuntimeStore(
(s) => s.setChatTemplateOverride,
);
- const templateDirty = chatTemplateOverride !== loadedChatTemplateOverride;
const [presetNameInput, setPresetNameInput] = useState(activePreset);
const [systemPromptEditorOpen, setSystemPromptEditorOpen] = useState(false);
const [systemPromptDraft, setSystemPromptDraft] = useState("");
@@ -972,7 +998,7 @@ export function ChatSettingsPanel({
</>
)}
<ChatTemplateFields />
- {(modelSettingsDirty || templateDirty) && (
+ {modelSettingsDirty && (
<div className="flex flex-wrap gap-1.5 pt-1">
<Button
type="button"
@@ -1223,13 +1249,41 @@ export function ChatSettingsPanel({
</CollapsibleSection>
) : null}
- <CollapsibleSection label="System Prompt" defaultOpen={true}>
+ <CollapsibleSection
+ label="System Prompt"
+ defaultOpen={true}
+ headerAction={
+ <Tooltip>
+ <TooltipPrimitive.Trigger asChild>
+ <button
+ type="button"
+ onClick={openSystemPromptEditor}
+ className="nav-icon-btn text-nav-icon-idle hover:bg-panel-surface-hover hover:text-black dark:hover:text-white"
+ aria-label="Edit system prompt"
+ >
+ <HugeiconsIcon
+ icon={Edit03Icon}
+ strokeWidth={1.75}
+ className="size-3"
+ />
+ </button>
+ </TooltipPrimitive.Trigger>
+ <TooltipContent
+ side="top"
+ sideOffset={6}
+ className="tooltip-compact"
+ >
+ Edit prompt
+ </TooltipContent>
+ </Tooltip>
+ }
+ >
<button
type="button"
onClick={openSystemPromptEditor}
aria-label="Edit system prompt"
className={cn(
- "panel-text-surface mt-1 flex w-full h-20 overflow-hidden cursor-pointer items-start px-3.5 py-2.5 text-left text-[13px] font-medium leading-relaxed corner-squircle focus-visible:outline-none focus-visible:border-ring focus-visible:ring-[1px] focus-visible:ring-ring/40",
+ "panel-text-surface -mt-1 flex w-full h-20 overflow-hidden cursor-pointer items-start px-3.5 py-2.5 text-left text-[13px] font-medium leading-relaxed corner-squircle focus-visible:outline-none focus-visible:border-ring focus-visible:ring-[1px] focus-visible:ring-ring/40",
params.systemPrompt
? "text-nav-fg"
: "text-muted-foreground",
@@ -1384,7 +1438,7 @@ export function ChatSettingsPanel({
}}
>
<DialogContent
- className="corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-3xl"
+ className="corner-squircle dialog-soft-surface sm:max-w-3xl"
overlayClassName="bg-background/35 supports-backdrop-filter:backdrop-blur-[1px]"
>
<DialogHeader>
@@ -1407,7 +1461,7 @@ export function ChatSettingsPanel({
onChange={(event) => setSystemPromptDraft(event.target.value)}
placeholder="You are a helpful assistant..."
fieldSizing="fixed"
- className="min-h-[24rem] max-h-[50vh] overflow-y-auto text-sm leading-6 corner-squircle focus-visible:border-input focus-visible:ring-0"
+ className="min-h-[24rem] max-h-[50vh] overflow-y-auto border-0 text-sm leading-6 corner-squircle focus-visible:ring-0"
rows={14}
/>
</div>
@@ -1415,20 +1469,31 @@ export function ChatSettingsPanel({
<Button
type="button"
variant="ghost"
- onClick={() => {
- setSystemPromptDraft(params.systemPrompt);
- setSystemPromptEditorOpen(false);
- }}
+ onClick={() => setSystemPromptDraft("")}
+ disabled={systemPromptDraft.length === 0}
+ className="text-muted-foreground"
>
- Cancel
- </Button>
- <Button
- type="button"
- onClick={saveSystemPromptEditor}
- disabled={!systemPromptEditorDirty}
- >
- Save
+ Reset
</Button>
+ <div className="flex flex-wrap gap-2">
+ <Button
+ type="button"
+ variant="ghost"
+ onClick={() => {
+ setSystemPromptDraft(params.systemPrompt);
+ setSystemPromptEditorOpen(false);
+ }}
+ >
+ Cancel
+ </Button>
+ <Button
+ type="button"
+ onClick={saveSystemPromptEditor}
+ disabled={!systemPromptEditorDirty}
+ >
+ Save
+ </Button>
+ </div>
</DialogFooter>
</DialogContent>
</Dialog>
@@ -1556,15 +1621,19 @@ function ChatTemplateFields() {
setEditorOpen(true);
};
const saveEditor = () => {
- setOverride(
- draft.trim().length === 0 || draft === defaultTemplate ? null : draft,
- );
+ const cleared = draft.trim().length === 0 || draft === defaultTemplate;
+ setOverride(cleared ? null : draft);
setEditorOpen(false);
+ toast.success(
+ cleared
+ ? "Chat template reset to default. It applies on the next model reload."
+ : "Chat template saved. It applies on the next model reload.",
+ );
};
return (
<>
- <div className="flex items-center justify-between gap-2">
+ <div className="-mb-1.5 flex items-center justify-between gap-2">
<button
type="button"
onClick={openEditor}
@@ -1609,7 +1678,7 @@ function ChatTemplateFields() {
<HugeiconsIcon
icon={Edit03Icon}
strokeWidth={1.75}
- className="size-3.5"
+ className="size-3"
/>
</button>
</TooltipPrimitive.Trigger>
@@ -1625,7 +1694,7 @@ function ChatTemplateFields() {
</div>
<Dialog open={editorOpen} onOpenChange={setEditorOpen}>
<DialogContent
- className="corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-3xl"
+ className="corner-squircle dialog-soft-surface sm:max-w-3xl"
overlayClassName="bg-background/35 supports-backdrop-filter:backdrop-blur-[1px]"
>
<DialogHeader>
@@ -1646,7 +1715,7 @@ function ChatTemplateFields() {
value={draft}
onChange={(event) => setDraft(event.target.value)}
fieldSizing="fixed"
- className="min-h-[24rem] max-h-[50vh] overflow-y-auto font-mono text-xs leading-5 corner-squircle focus-visible:border-input focus-visible:ring-0"
+ className="min-h-[24rem] max-h-[50vh] overflow-y-auto border-0 font-mono text-xs leading-5 corner-squircle focus-visible:ring-0"
rows={14}
spellCheck={false}
/>
@@ -1655,13 +1724,24 @@ function ChatTemplateFields() {
<Button
type="button"
variant="ghost"
- onClick={() => setEditorOpen(false)}
+ onClick={() => setDraft(defaultTemplate)}
+ disabled={draft === defaultTemplate}
+ className="text-muted-foreground"
>
- Cancel
- </Button>
- <Button type="button" onClick={saveEditor} disabled={!draftDirty}>
- Save
+ Reset
</Button>
+ <div className="flex flex-wrap gap-2">
+ <Button
+ type="button"
+ variant="ghost"
+ onClick={() => setEditorOpen(false)}
+ >
+ Cancel
+ </Button>
+ <Button type="button" onClick={saveEditor} disabled={!draftDirty}>
+ Save
+ </Button>
+ </div>
</DialogFooter>
</DialogContent>
</Dialog>
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 38b0983e10a..880129ac6c9 100644
--- a/studio/frontend/src/features/chat/components/new-project-dialog.tsx
+++ b/studio/frontend/src/features/chat/components/new-project-dialog.tsx
@@ -56,7 +56,7 @@ export function NewProjectDialog({
onOpenChange(next);
}}
>
- <DialogContent className="corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-md">
+ <DialogContent className="corner-squircle dialog-soft-surface sm:max-w-md">
<DialogHeader>
<DialogTitle>New project</DialogTitle>
</DialogHeader>
diff --git a/studio/frontend/src/features/chat/mcp-composer-button.tsx b/studio/frontend/src/features/chat/mcp-composer-button.tsx
index e0f024a40ea..aecfe9b4302 100644
--- a/studio/frontend/src/features/chat/mcp-composer-button.tsx
+++ b/studio/frontend/src/features/chat/mcp-composer-button.tsx
@@ -246,17 +246,24 @@ export function McpComposerButton({
<button
type="button"
className="composer-pill-btn"
+ data-pill-label="MCP"
data-active={active ? "true" : "false"}
aria-label="MCP servers"
>
{/* Icon doubles as an off switch: hover swaps to an X; clicking
- it turns MCP off without opening the menu. */}
+ it turns MCP off without opening the menu. In compact
+ icon-only mode the glyph is the whole button, so clicks fall
+ through to the trigger and open the menu instead. */}
<span
role="button"
aria-label="Turn off MCP"
tabIndex={-1}
- onPointerDown={(e) => e.stopPropagation()}
+ onPointerDown={(e) => {
+ if (e.currentTarget.closest('[data-pill-compact="true"]')) return;
+ e.stopPropagation();
+ }}
onClick={(e) => {
+ if (e.currentTarget.closest('[data-pill-compact="true"]')) return;
e.stopPropagation();
setMcpEnabledForChat(false);
}}
diff --git a/studio/frontend/src/features/chat/projects-page.tsx b/studio/frontend/src/features/chat/projects-page.tsx
index a9ce03fa471..724cd0a7556 100644
--- a/studio/frontend/src/features/chat/projects-page.tsx
+++ b/studio/frontend/src/features/chat/projects-page.tsx
@@ -501,7 +501,7 @@ export function ProjectsPage() {
if (!open) setCreating(false);
}}
>
- <DialogContent className="corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-md">
+ <DialogContent className="corner-squircle dialog-soft-surface sm:max-w-md">
<DialogHeader>
<DialogTitle>New project</DialogTitle>
</DialogHeader>
@@ -538,7 +538,7 @@ export function ProjectsPage() {
if (!open) setRenaming(null);
}}
>
- <DialogContent className="corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-md">
+ <DialogContent className="corner-squircle dialog-soft-surface sm:max-w-md">
<DialogHeader>
<DialogTitle>Rename project</DialogTitle>
</DialogHeader>
@@ -574,7 +574,7 @@ export function ProjectsPage() {
{/* Import destination picker */}
<Dialog open={importFile !== null} onOpenChange={(open) => { if (!open) setImportFile(null); }}>
- <DialogContent className="corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-md">
+ <DialogContent className="corner-squircle dialog-soft-surface sm:max-w-md">
<DialogHeader>
<DialogTitle>Import chats</DialogTitle>
</DialogHeader>
@@ -609,7 +609,7 @@ export function ProjectsPage() {
if (!open) setDeleting(null);
}}
>
- <DialogContent className="menu-flat-destructive corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-md">
+ <DialogContent className="menu-flat-destructive corner-squircle dialog-soft-surface sm:max-w-md">
<DialogHeader>
<DialogTitle>Delete project</DialogTitle>
</DialogHeader>
diff --git a/studio/frontend/src/features/chat/shared-composer.tsx b/studio/frontend/src/features/chat/shared-composer.tsx
index fe71adf4d7d..74ab4a1b9e1 100644
--- a/studio/frontend/src/features/chat/shared-composer.tsx
+++ b/studio/frontend/src/features/chat/shared-composer.tsx
@@ -1567,6 +1567,7 @@ export function SharedComposer({
}
}}
className="composer-pill-btn"
+ data-pill-label="Search"
data-active={toolsEnabled && !searchDisabled ? "true" : "false"}
aria-label={
toolsEnabled ? "Disable web search" : "Enable web search"
@@ -1582,6 +1583,7 @@ export function SharedComposer({
disabled={codeDisabled}
onClick={() => setCodeToolsEnabled(!codeToolsEnabled)}
className="composer-pill-btn"
+ data-pill-label="Code"
data-active={codeToolsEnabled && !codeDisabled ? "true" : "false"}
aria-label={
codeToolsEnabled
@@ -1604,6 +1606,7 @@ export function SharedComposer({
disabled={imageDisabled}
onClick={() => setImageToolsEnabled(!imageToolsEnabled)}
className="composer-pill-btn"
+ data-pill-label="Images"
data-active={
imageToolsEnabled && !imageDisabled ? "true" : "false"
}
@@ -1630,6 +1633,7 @@ export function SharedComposer({
disabled={webFetchDisabled}
onClick={() => setWebFetchToolsEnabled(!webFetchToolsEnabled)}
className="composer-pill-btn"
+ data-pill-label="Fetch"
data-active={
webFetchToolsEnabled && !webFetchDisabled ? "true" : "false"
}
@@ -1648,6 +1652,7 @@ export function SharedComposer({
type="button"
onClick={() => setArtifactsEnabled(false)}
className="composer-pill-btn"
+ data-pill-label="Canvas"
data-active="true"
aria-label="Disable canvas"
>
diff --git a/studio/frontend/src/features/chat/thread-sidebar.tsx b/studio/frontend/src/features/chat/thread-sidebar.tsx
index 2b255c6c14b..0d35facb2a4 100644
--- a/studio/frontend/src/features/chat/thread-sidebar.tsx
+++ b/studio/frontend/src/features/chat/thread-sidebar.tsx
@@ -331,7 +331,7 @@ export function ThreadSidebar({
{/* Rename dialog */}
<Dialog open={renamingItem !== null} onOpenChange={(open) => { if (!open) setRenamingItem(null); }}>
- <DialogContent className="corner-squircle border border-border/60 bg-background/98 shadow-none sm:max-w-sm">
+ <DialogContent className="corner-squircle dialog-soft-surface sm:max-w-sm">
<DialogHeader>
<DialogTitle>Rename chat</DialogTitle>
</DialogHeader>
diff --git a/studio/frontend/src/features/rag/components/knowledge-base-composer-button.tsx b/studio/frontend/src/features/rag/components/knowledge-base-composer-button.tsx
index e040d1842a8..e3c9c9b41f5 100644
--- a/studio/frontend/src/features/rag/components/knowledge-base-composer-button.tsx
+++ b/studio/frontend/src/features/rag/components/knowledge-base-composer-button.tsx
@@ -100,17 +100,24 @@ export function KnowledgeBaseComposerButton({
<button
type="button"
className="composer-pill-btn"
+ data-pill-label="RAG"
data-active={ragDisabled ? "false" : "true"}
aria-label="Retrieval source"
>
{/* Icon doubles as an off switch: hover swaps to an X; clicking it
- turns RAG off without opening the menu. */}
+ turns RAG off without opening the menu. In compact icon-only
+ mode the glyph is the whole button, so clicks fall through to
+ the trigger and open the menu instead. */}
<span
role="button"
aria-label="Turn off retrieval"
tabIndex={-1}
- onPointerDown={(e) => e.stopPropagation()}
+ onPointerDown={(e) => {
+ if (e.currentTarget.closest('[data-pill-compact="true"]')) return;
+ e.stopPropagation();
+ }}
onClick={(e) => {
+ if (e.currentTarget.closest('[data-pill-compact="true"]')) return;
e.stopPropagation();
setRagEnabled(false);
}}
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index 34e4241ae28..0aa9ac01524 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -524,7 +524,7 @@
}
.nav-icon-btn {
- @apply inline-flex h-7 w-7 items-center justify-center rounded-[10px] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring;
+ @apply inline-flex h-7 w-7 items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring;
}
/* Standard icon size — drives every nav/menu/action-bar icon
@@ -544,31 +544,26 @@
.sidebar-nav-btn {
color: var(--nav-fg);
}
+ /* Gemini-style: hovering or opening the row action (3 dots) shows only
+ the action's circle; the row highlights only when hovering the row
+ itself. */
.sidebar-nav-btn:hover,
.sidebar-nav-btn[data-active="true"],
.sidebar-nav-btn[data-state="open"],
- .group\/project-item:hover .sidebar-nav-btn,
- .group\/project-item:has(.sidebar-row-action[data-state="open"]) .sidebar-nav-btn,
- .group\/project-chat-item:hover .sidebar-nav-btn,
- .group\/project-chat-item:has(.sidebar-row-action[data-state="open"]) .sidebar-nav-btn,
- .group\/recent-item:hover .sidebar-nav-btn,
- .group\/recent-item:has(.sidebar-row-action[data-state="open"]) .sidebar-nav-btn,
- .group\/run-item:hover .sidebar-nav-btn,
- .group\/run-item:has(.sidebar-row-action[data-state="open"]) .sidebar-nav-btn {
+ .group\/project-item:hover:not(:has(.sidebar-row-action:hover)) .sidebar-nav-btn,
+ .group\/project-chat-item:hover:not(:has(.sidebar-row-action:hover)) .sidebar-nav-btn,
+ .group\/recent-item:hover:not(:has(.sidebar-row-action:hover)) .sidebar-nav-btn,
+ .group\/run-item:hover:not(:has(.sidebar-row-action:hover)) .sidebar-nav-btn {
background-color: var(--nav-surface-hover) !important;
color: #000 !important;
}
.dark .sidebar-nav-btn:hover,
.dark .sidebar-nav-btn[data-active="true"],
.dark .sidebar-nav-btn[data-state="open"],
- .dark .group\/project-item:hover .sidebar-nav-btn,
- .dark .group\/project-item:has(.sidebar-row-action[data-state="open"]) .sidebar-nav-btn,
- .dark .group\/project-chat-item:hover .sidebar-nav-btn,
- .dark .group\/project-chat-item:has(.sidebar-row-action[data-state="open"]) .sidebar-nav-btn,
- .dark .group\/recent-item:hover .sidebar-nav-btn,
- .dark .group\/recent-item:has(.sidebar-row-action[data-state="open"]) .sidebar-nav-btn,
- .dark .group\/run-item:hover .sidebar-nav-btn,
- .dark .group\/run-item:has(.sidebar-row-action[data-state="open"]) .sidebar-nav-btn {
+ .dark .group\/project-item:hover:not(:has(.sidebar-row-action:hover)) .sidebar-nav-btn,
+ .dark .group\/project-chat-item:hover:not(:has(.sidebar-row-action:hover)) .sidebar-nav-btn,
+ .dark .group\/recent-item:hover:not(:has(.sidebar-row-action:hover)) .sidebar-nav-btn,
+ .dark .group\/run-item:hover:not(:has(.sidebar-row-action:hover)) .sidebar-nav-btn {
color: #fff !important;
}
@@ -579,19 +574,21 @@
@apply opacity-100 pointer-events-auto;
}
.sidebar-row-action-glyph {
- @apply inline-flex size-6 items-center justify-center rounded-[10px] text-sidebar-foreground/55;
+ @apply inline-flex size-6 items-center justify-center rounded-full text-sidebar-foreground/55;
}
/* Branch picker chevron buttons sit beside action bar icon buttons
- (size-8, rounded-[10px]). Height + radius match for visual
+ (size-8, rounded-full). Height + radius match for visual
alignment, but width is tighter so the small chevron glyph reads
as a compact control rather than a full-size icon button. */
.aui-branch-chevron-btn {
- @apply inline-flex h-8 w-6 cursor-pointer items-center justify-center rounded-[10px] p-0 text-chat-icon-fg transition-colors hover:bg-chat-icon-bg-hover hover:text-chat-icon-fg-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:bg-transparent;
+ @apply inline-flex h-8 w-6 cursor-pointer items-center justify-center rounded-full p-0 text-chat-icon-fg transition-colors hover:bg-chat-icon-bg-hover hover:text-chat-icon-fg-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:bg-transparent;
}
.sidebar-row-action:hover .sidebar-row-action-glyph,
.sidebar-row-action[data-state="open"] .sidebar-row-action-glyph {
- @apply bg-nav-surface-hover text-nav-fg;
+ @apply text-nav-fg;
+ /* A step darker than the row hover so the circle reads on top of it. */
+ background-color: color-mix(in srgb, var(--foreground) 11%, transparent);
}
.dark .sidebar-row-action:hover .sidebar-row-action-glyph,
.dark .sidebar-row-action[data-state="open"] .sidebar-row-action-glyph {
@@ -752,7 +749,13 @@
visually anchored to its trigger rather than reading as a much
larger floating pill. */
.tooltip-compact {
- @apply rounded-[10px] border-transparent bg-black px-2 py-1.5 text-[11px] font-medium leading-snug text-white shadow-md;
+ @apply rounded-full border-transparent bg-black px-2.5 py-1.5 text-[11px] font-medium leading-snug text-white shadow-md;
+ }
+
+ /* Dialog popups: borderless; chatbox shadow in light, flat card
+ surface in dark. */
+ .dialog-soft-surface {
+ @apply border-0 ring-0 bg-background/98 shadow-[0_2px_8px_-2px_rgba(0,0,0,0.16)] dark:bg-card dark:shadow-none;
}
/* Rich tooltip — used for the context-usage and token-counter
@@ -1023,6 +1026,12 @@
@apply flex cursor-pointer items-center gap-1.5 rounded-full py-1.5 pl-2 pr-2.5 text-[14px] font-medium text-muted-foreground/70 transition-colors hover:bg-primary/10 dark:hover:bg-white/[0.1] disabled:cursor-not-allowed disabled:opacity-40;
}
+ /* Caret pills (RAG, MCP): the chevron carries its own whitespace, so the
+ trailing padding is tightened to keep the hover pill balanced. */
+ .composer-pill-btn:has(.composer-pill-caret) {
+ @apply pr-1.5;
+ }
+
/* Icon-only (compact) pills drop their label, so make the button a square
and center the glyph; the rounded-full hover highlight then reads as a
circle around the icon rather than a wide rounded rectangle. */
@@ -1068,6 +1077,32 @@
@apply size-[15px] bg-transparent p-0 dark:bg-transparent;
}
+ /* Compact pills hide their labels, so surface the name as a hover
+ tooltip styled like .tooltip-compact. */
+ [data-pill-compact="true"]
+ .composer-pill-btn:not([data-keep-label])[data-pill-label] {
+ position: relative;
+ }
+ [data-pill-compact="true"]
+ .composer-pill-btn:not([data-keep-label])[data-pill-label]:hover::after {
+ content: attr(data-pill-label);
+ @apply pointer-events-none absolute bottom-[calc(100%+6px)] left-1/2 z-50 -translate-x-1/2 rounded-full bg-black px-2.5 py-1.5 text-[11px] font-medium leading-snug whitespace-nowrap text-white shadow-md;
+ }
+
+ /* Compact caret pills (RAG, MCP) open their menu on click instead of
+ toggling off, so keep the icon and skip the X swap. */
+ [data-pill-compact="true"]
+ .composer-pill-btn:not([data-keep-label]):has(.composer-pill-caret)[data-active="true"]:hover
+ .composer-pill-glyph
+ > :not(.composer-pill-x) {
+ opacity: 1;
+ }
+ [data-pill-compact="true"]
+ .composer-pill-btn:not([data-keep-label]):has(.composer-pill-caret)
+ .composer-pill-x {
+ display: none;
+ }
+
/* Hovering an active pill swaps the icon for an X (click to turn off). */
.composer-pill-btn[data-active="true"]:hover .composer-pill-glyph > :not(.composer-pill-x),
.unsloth-thinking-pill[data-active="true"]:hover .composer-pill-glyph > :not(.composer-pill-x) {