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: say Pin in model menus, and drop the border on sidebar right-click submenus (#12414)

Michael Hanfa0e02561cdd
diff --git a/studio/frontend/src/components/ui/context-menu.tsx b/studio/frontend/src/components/ui/context-menu.tsx
index 1fd0767893d..52598e0f03b 100644
--- a/studio/frontend/src/components/ui/context-menu.tsx
+++ b/studio/frontend/src/components/ui/context-menu.tsx
@@ -159,7 +159,7 @@ function ContextMenuSubContent({
collisionPadding={useWindowChromeCollisionPadding(collisionPadding)}
// Capped and scrolled like ContextMenuContent, so a long list stays reachable.
className={cn(
- "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground min-w-32 max-w-[calc(100vw-32px)] rounded-md border p-1 shadow-lg duration-100 z-50 origin-(--radix-context-menu-content-transform-origin) max-h-(--radix-context-menu-content-available-height) overflow-x-hidden overflow-y-auto",
+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground min-w-32 max-w-[calc(100vw-32px)] rounded-md p-1 shadow-lg duration-100 z-50 origin-(--radix-context-menu-content-transform-origin) max-h-(--radix-context-menu-content-available-height) overflow-x-hidden overflow-y-auto",
className,
)}
{...props}
diff --git a/studio/frontend/src/features/hub/catalog/gguf-download-card.tsx b/studio/frontend/src/features/hub/catalog/gguf-download-card.tsx
index 5b845f47299..c996256f61a 100644
--- a/studio/frontend/src/features/hub/catalog/gguf-download-card.tsx
+++ b/studio/frontend/src/features/hub/catalog/gguf-download-card.tsx
@@ -417,7 +417,7 @@ export function QuantOptionsMenu({
strokeWidth={1.75}
className="size-icon"
/>
- <span>{pinned ? "Unpin" : "Pin to top"}</span>
+ <span>{pinned ? "Unpin" : "Pin"}</span>
</DropdownMenuItem>
)}
{downloaded && (
diff --git a/studio/frontend/src/features/hub/catalog/models-catalog-lists.tsx b/studio/frontend/src/features/hub/catalog/models-catalog-lists.tsx
index c743fc8585a..5b387610bf7 100644
--- a/studio/frontend/src/features/hub/catalog/models-catalog-lists.tsx
+++ b/studio/frontend/src/features/hub/catalog/models-catalog-lists.tsx
@@ -322,7 +322,7 @@ export function DownloadedList({
...cachedRows.map((row) => ({ variant: "cached" as const, row })),
...localRows.map((row) => ({ variant: "local" as const, row })),
];
- // Pinned rows order by pin recency, not the active sort, so "Pin to top" lands where expected.
+ // Pinned rows order by pin recency, not the active sort, so a new pin lands on top.
const rank = makePinRank(pinnedIds);
const pinRank = (item: InventoryItem) =>
item.row.repoId ? rank(pinKey(item.row.repoId)) : Number.MAX_SAFE_INTEGER;
diff --git a/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx b/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx
index 178291159a8..ea845025c28 100644
--- a/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx
+++ b/studio/frontend/src/features/hub/catalog/models-catalog-rows.tsx
@@ -737,7 +737,7 @@ export const InventoryRow = memo(function InventoryRow({
? undefined
: {
pinned: rowPinned,
- pinLabel: "Pin to top",
+ pinLabel: "Pin",
unpinLabel: "Unpin",
onToggle: () => togglePinned(deletableRepoId),
}
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx
index 179b7bb2a67..e8186ce2da0 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx
@@ -2449,7 +2449,7 @@ function GgufVariantExpander({
allowPin && v.downloaded
? {
pinned: pinnedKeys.includes(pinKey(repoId, v.quant)),
- pinLabel: "Pin to top",
+ pinLabel: "Pin",
unpinLabel: "Unpin",
onToggle: () => togglePinnedQuant(repoId, v.quant),
}
@@ -5856,7 +5856,7 @@ export function HubModelPicker({
ariaLabel={`More options for ${model.name}`}
pin={{
pinned: isPinned,
- pinLabel: "Pin to top",
+ pinLabel: "Pin",
unpinLabel: "Unpin",
onToggle: () => togglePinnedConnected(model.id),
}}
@@ -6005,7 +6005,7 @@ export function HubModelPicker({
cachePath={{ repoId: entry.repoId, variant: entry.quant }}
pin={{
pinned: true,
- pinLabel: "Pin to top",
+ pinLabel: "Pin",
unpinLabel: "Unpin",
onToggle: () => togglePinned(entry.repoId, entry.quant),
}}
@@ -6146,7 +6146,7 @@ export function HubModelPicker({
cachePath={{ repoId: c.repo_id, variant: variant.quant }}
pin={{
pinned: isPinned,
- pinLabel: "Pin to top",
+ pinLabel: "Pin",
unpinLabel: "Unpin",
onToggle: () => togglePinned(c.repo_id, variant.quant),
}}
@@ -6409,7 +6409,7 @@ export function HubModelPicker({
cachePath={{ repoId: c.repo_id }}
pin={{
pinned: pinnedSet.has(pinKey(c.repo_id)),
- pinLabel: "Pin to top",
+ pinLabel: "Pin",
unpinLabel: "Unpin",
onToggle: () => togglePinned(c.repo_id),
}}
@@ -8319,7 +8319,7 @@ function FineTunedRows({
ariaLabel={`More options for ${adapter.name}`}
pin={{
pinned: pinnedKeys.includes(pinKey(adapter.id)),
- pinLabel: "Pin to top",
+ pinLabel: "Pin",
unpinLabel: "Unpin",
onToggle: () => togglePinned(adapter.id),
}}
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/pinned-connected-models.ts b/studio/frontend/src/features/model-picker/components/model-selector/pinned-connected-models.ts
index 4d0d9f6d7a6..ef9c5f07579 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/pinned-connected-models.ts
+++ b/studio/frontend/src/features/model-picker/components/model-selector/pinned-connected-models.ts
@@ -155,7 +155,7 @@ export const usePinnedConnectedModelsStore = create<PinnedConnectedModelsState>(
// turns an unpin into a pin and writes back what the user was removing.
const unpinning = state.pinned.includes(modelId);
const without = base.filter((id) => id !== modelId);
- // Newest first, as On Device does, so "Pin to top" lands on top of the pinned group.
+ // Newest first, as On Device does, so a new pin lands on top of the pinned group.
const next = unpinning ? without : [modelId, ...without];
writePinned(next, unpinning ? null : modelId);
return { pinned: next };
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/pinned-models.ts b/studio/frontend/src/features/model-picker/components/model-selector/pinned-models.ts
index 0c667d24841..8922b64951b 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/pinned-models.ts
+++ b/studio/frontend/src/features/model-picker/components/model-selector/pinned-models.ts
@@ -129,7 +129,7 @@ export const usePinnedModelsStore = create<PinnedModelsState>((set) => ({
togglePinned: (repoId, quant) =>
set((state) => {
const key = pinKey(repoId, quant);
- // Newest pin first, so "Pin to top" literally lands on top of the pinned group rather than under earlier pins.
+ // Newest pin first, so a new pin lands on top of the pinned group rather than under earlier pins.
const next = state.pinned.includes(key)
? state.pinned.filter((id) => id !== key)
: [key, ...state.pinned];