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: trim the composer "+" menu top level (#11314)

Michael Han8eaa2671ab3c
diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsx
index ca2860bf41c..391e6250d84 100644
--- a/studio/frontend/src/components/assistant-ui/thread.tsx
+++ b/studio/frontend/src/components/assistant-ui/thread.tsx
@@ -6201,6 +6201,8 @@ const ComposerToolsMenu: FC<{
const setRagEnabled = useChatRuntimeStore((s) => s.setRagEnabled);
// Shared gate so the menu row agrees with the RAG pill.
const ragDisabled = useRagToolDisabled();
+ // The permission pill is hidden while recording, so the menu carries it then.
+ const isDictating = useAuiState((s) => s.composer.dictation != null);
// Capability gating mirrors the visible pills so menu and pills agree on
// what a loaded model supports (a tool the backend drops must not look on).
const modelLoaded = useChatRuntimeStore(
@@ -6506,7 +6508,6 @@ const ComposerToolsMenu: FC<{
) : null}
</DropdownMenuItem>
) : null,
- bypassPermissions: <BypassPermissionsMenuItem />,
projects: (
<DropdownMenuSub>
<DropdownMenuSubTrigger>
@@ -6687,6 +6688,7 @@ const ComposerToolsMenu: FC<{
</DropdownMenuItem>
)}
<DropdownMenuSeparator />
+ {isDictating ? <BypassPermissionsMenuItem /> : null}
{pinnedPlusItems.map((id) => (
<Fragment key={id}>{plusMenuNodes[id]}</Fragment>
))}
diff --git a/studio/frontend/src/features/chat/bypass-permissions-menu-item.tsx b/studio/frontend/src/features/chat/bypass-permissions-menu-item.tsx
index 363d0939760..48edb937dd8 100644
--- a/studio/frontend/src/features/chat/bypass-permissions-menu-item.tsx
+++ b/studio/frontend/src/features/chat/bypass-permissions-menu-item.tsx
@@ -25,7 +25,8 @@ import {
PermissionModeMenuItems,
} from "./permission-mode-select";
-// Tool permissions entry for the composer "+" menu.
+// Dictation-only "+" menu fallback: the composer pill is the normal control, but it is hidden
+// while recording, so this is the sole way to reach permission mode then.
export function BypassPermissionsMenuItem() {
const permissionMode = useChatRuntimeStore((s) => s.permissionMode);
const setBypassConfirmOpen = useChatRuntimeStore(
@@ -44,8 +45,8 @@ export function BypassPermissionsMenuItem() {
</DropdownMenuSubTrigger>
<DropdownMenuSubContent className="unsloth-plus-menu w-[300px]">
<PermissionModeMenuItems
- // Defer past Radix's menu-close focus restoration: opening the dialog synchronously here lets the
- // dropdown grab focus back and breaks the dialog's focus trap.
+ // Defer past Radix's menu-close focus restoration, or the dropdown grabs focus back
+ // and breaks the dialog's focus trap.
onRequestFullAccess={() =>
setTimeout(() => setBypassConfirmOpen(true), 0)
}
diff --git a/studio/frontend/src/features/chat/shared-composer.tsx b/studio/frontend/src/features/chat/shared-composer.tsx
index 627c4c457b6..f127e532b27 100644
--- a/studio/frontend/src/features/chat/shared-composer.tsx
+++ b/studio/frontend/src/features/chat/shared-composer.tsx
@@ -116,7 +116,6 @@ import {
} from "./prompt-storage/prompt-storage-dialog";
import { listPromptEntries, type PromptEntry } from "./api/prompts-api";
import { McpComposerButton } from "./mcp-composer-button";
-import { BypassPermissionsMenuItem } from "./bypass-permissions-menu-item";
import { PermissionModeComposerPill } from "./permission-mode-select";
import { reasoningCapsFromLoad } from "./lib/apply-inference-status-to-store";
import { KnowledgeBaseComposerButton } from "@/features/rag/components/knowledge-base-composer-button";
@@ -2171,7 +2170,6 @@ export function SharedComposer({
) : null}
</DropdownMenuItem>
) : null,
- bypassPermissions: <BypassPermissionsMenuItem />,
projects: (
<DropdownMenuSub>
<DropdownMenuSubTrigger>
diff --git a/studio/frontend/src/features/chat/stores/plus-menu-prefs-store.ts b/studio/frontend/src/features/chat/stores/plus-menu-prefs-store.ts
index 73f0b0cd5c7..6dea9577c16 100644
--- a/studio/frontend/src/features/chat/stores/plus-menu-prefs-store.ts
+++ b/studio/frontend/src/features/chat/stores/plus-menu-prefs-store.ts
@@ -14,8 +14,7 @@ export type PlusMenuItemId =
| "compareChat"
| "exportChat"
| "canvas"
- | "projects"
- | "bypassPermissions";
+ | "projects";
// Canonical order used both for the pinned items at the top level and for the items that fall
// into the "More" overflow submenu.
@@ -28,22 +27,19 @@ export const PLUS_MENU_ORDER: PlusMenuItemId[] = [
"exportChat",
"canvas",
"projects",
- "bypassPermissions",
];
-// Defaults reproduce the historical layout: Chat with Files, MCP and Projects pinned to the top
-// level; everything else under "More".
+// Chat with Files, MCP and Skills sit at the top level; everything else lives under "More".
+// Projects is a workspace the user opts into, not a per-message attachment.
const DEFAULT_PINS: Record<PlusMenuItemId, boolean> = {
chatWithFiles: true,
mcp: true,
skills: true,
- projects: true,
+ projects: false,
savedPrompts: false,
compareChat: false,
exportChat: false,
canvas: false,
- // Lives under "More" by default; it is a rarely toggled, dangerous mode.
- bypassPermissions: false,
};
export const PLUS_MENU_PINS_STORAGE_KEY = "unsloth_plus_menu_pins";
@@ -77,7 +73,8 @@ export const usePlusMenuPrefsStore = create<PlusMenuPrefsState>()(
{
name: PLUS_MENU_PINS_STORAGE_KEY,
// Backfill any ids added in a later release so persisted state from an older version still
- // resolves every menu item.
+ // resolves every menu item. A retired id survives the spread but PLUS_MENU_ORDER no
+ // longer names it, so it is inert.
merge: (persisted, current) => {
const saved = persisted as Partial<PlusMenuPrefsState> | undefined;
return {
diff --git a/studio/frontend/src/features/settings/tabs/chat-tab.tsx b/studio/frontend/src/features/settings/tabs/chat-tab.tsx
index acc6d507dbb..2abbc2709b0 100644
--- a/studio/frontend/src/features/settings/tabs/chat-tab.tsx
+++ b/studio/frontend/src/features/settings/tabs/chat-tab.tsx
@@ -36,7 +36,6 @@ import {
Folder01Icon,
McpServerIcon,
PencilRulerIcon,
- ShieldBanIcon,
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import { Columns2Icon } from "lucide-react";
@@ -142,17 +141,6 @@ const PLUS_MENU_SETTINGS: {
/>
),
},
- {
- id: "bypassPermissions",
- labelKey: "settings.general.permissions.bypassLabel",
- icon: (
- <HugeiconsIcon
- icon={ShieldBanIcon}
- strokeWidth={2}
- className={PLUS_MENU_ICON_CLASS}
- />
- ),
- },
];
export function ChatTab() {