From 8b51b5d664360705330ce5b0d542ee0d2f2dd77b Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 23 Apr 2026 22:03:00 -0700 Subject: [PATCH] fix(ui/memory): use clean MCP-style ID pill, drop copy icons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ID / User ID / Team ID columns showed a mono text blob with a copy-to-clipboard icon next to each value — too busy compared to the MCP Servers page. Swap the renderer for MCP's pill style: - Truncated mono ID inside a blue Tailwind pill (`font-mono text-blue-600 bg-blue-50 ... rounded-md border`). - No copy icon. Full ID surfaces via tooltip. - ID column is a button that opens the detail drawer on click; user/team ID pills are static (not clickable). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../src/components/MemoryView/MemoryView.tsx | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/ui/litellm-dashboard/src/components/MemoryView/MemoryView.tsx b/ui/litellm-dashboard/src/components/MemoryView/MemoryView.tsx index 1cdff5f7295..b5b51884e52 100644 --- a/ui/litellm-dashboard/src/components/MemoryView/MemoryView.tsx +++ b/ui/litellm-dashboard/src/components/MemoryView/MemoryView.tsx @@ -17,7 +17,6 @@ import { } from "antd"; import type { ColumnsType } from "antd/es/table"; import { - CopyOutlined, DeleteOutlined, EditOutlined, EyeOutlined, @@ -150,27 +149,27 @@ export const MemoryView: React.FC = ({ accessToken }) => { } }; - const renderIdCell = (id?: string | null, labelOnCopy = "ID") => { + const renderIdPill = ( + id: string | null | undefined, + onClick?: () => void, + ) => { if (!id) return -; const short = id.length > 10 ? `${id.slice(0, 7)}...` : id; + const pillClass = + "font-mono text-blue-600 bg-blue-50 text-xs font-medium px-2 py-0.5 rounded-md border border-blue-200 inline-block max-w-[15ch] truncate whitespace-nowrap"; return ( - - - + + {onClick ? ( + + ) : ( + {short} + )} + ); }; @@ -180,7 +179,8 @@ export const MemoryView: React.FC = ({ accessToken }) => { dataIndex: "memory_id", key: "memory_id", width: 140, - render: (id: string) => renderIdCell(id, "Memory ID"), + render: (_: unknown, r: MemoryRow) => + renderIdPill(r.memory_id, () => setDetailRow(r)), }, { title: "Name", @@ -205,14 +205,14 @@ export const MemoryView: React.FC = ({ accessToken }) => { dataIndex: "user_id", key: "user_id", width: 160, - render: (uid?: string | null) => renderIdCell(uid, "User ID"), + render: (uid?: string | null) => renderIdPill(uid), }, { title: "Team ID", dataIndex: "team_id", key: "team_id", width: 160, - render: (tid?: string | null) => renderIdCell(tid, "Team ID"), + render: (tid?: string | null) => renderIdPill(tid), }, { title: "Updated",