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: Library grid cards keep one icon position and use the full width (#12330)

Michael Hand0fbe58ba6c6
diff --git a/studio/frontend/src/features/library/chats/chats-items.tsx b/studio/frontend/src/features/library/chats/chats-items.tsx
index d5b4e53b8a8..ba42c709cf4 100644
--- a/studio/frontend/src/features/library/chats/chats-items.tsx
+++ b/studio/frontend/src/features/library/chats/chats-items.tsx
@@ -1787,14 +1787,15 @@ function FavoriteTile({
FILE_CARD_SURFACE,
)}
>
- <div className="flex aspect-square flex-col px-5 pb-3.5 pt-5">
- <p className="line-clamp-2 break-words pr-7 font-medium text-ui-14 leading-snug text-foreground">
+ {/* Same layout as the file cards. */}
+ <div className="grid aspect-square grid-cols-[minmax(0,1fr)] grid-rows-[auto_1fr_auto] px-5 pt-5 pb-3.5">
+ <p className="line-clamp-2 min-h-[2.75em] break-words font-medium text-ui-13p5 leading-snug text-foreground">
{title}
</p>
- <div className="flex flex-1 items-center justify-center text-foreground">
+ <div className="flex items-center justify-center text-foreground">
{icon}
</div>
- <p className="truncate pr-6 text-ui-13 text-muted-foreground">
+ <p className="truncate pr-6 text-ui-12 text-muted-foreground">
{showTime && time ? formatCardTime(time, locale) : ""}
</p>
</div>
diff --git a/studio/frontend/src/features/library/components/library-cards.tsx b/studio/frontend/src/features/library/components/library-cards.tsx
index 26951ad558a..efc10ba528b 100644
--- a/studio/frontend/src/features/library/components/library-cards.tsx
+++ b/studio/frontend/src/features/library/components/library-cards.tsx
@@ -205,14 +205,15 @@ export function ItemCard({ item }: { item: LibraryItem }) {
)}
</>
) : (
- <div className="flex aspect-square flex-col px-5 pb-3.5 pt-5">
- <p className="line-clamp-2 break-all pr-7 font-medium text-ui-14 leading-snug text-foreground">
+ // Two-line name slot keeps the icon in one place on every card.
+ <div className="grid aspect-square grid-cols-[minmax(0,1fr)] grid-rows-[auto_1fr_auto] px-5 pt-5 pb-3.5">
+ <p className="line-clamp-2 min-h-[2.75em] break-all font-medium text-ui-13p5 leading-snug text-foreground">
{item.name}
</p>
- <div className="flex flex-1 items-center justify-center">
+ <div className="flex items-center justify-center">
<KindIcon item={item} className={cardIconClass(item)} />
</div>
- <p className="truncate pr-6 text-ui-13 text-muted-foreground">
+ <p className="truncate pr-6 text-ui-12 text-muted-foreground">
{showTime && formatCardTime(item.updatedAt, locale)}
</p>
</div>