From 3f55d8d01b406484c2953fe0482b491298d1516f Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 24 Apr 2026 13:32:15 +0000 Subject: [PATCH] feat(ui): migrate tremor pure-table files to shadcn table Batch migration of files that only use Tremor for the Table family (Table/TableHead/TableHeaderCell/TableBody/TableRow/TableCell). Renames per shadcn: TableHead (thead wrapper) -> TableHeader, and TableHeaderCell (th) -> TableHead. Updates related test mocks and replaces the tremor Icon-based expand/collapse stub in ModelsCell.tsx with semantic Expand/Collapse aria-labels. Co-authored-by: yuneng-jiang --- .../components/TeamsTable/ModelsCell.test.tsx | 23 +++------- .../components/TeamsTable/ModelsCell.tsx | 3 +- .../components/TeamsTable/TeamsTable.test.tsx | 6 +-- .../components/TeamsTable/TeamsTable.tsx | 27 ++++++----- .../YourRoleCell/YourRoleCell.test.tsx | 2 +- .../TeamsTable/YourRoleCell/YourRoleCell.tsx | 3 +- .../AIHub/UsefulLinksManagement.tsx | 15 +++--- .../DeletedKeysTable/DeletedKeysTable.tsx | 13 +++--- .../DeletedTeamsTable/DeletedTeamsTable.tsx | 13 +++--- .../src/components/ToolPolicies.tsx | 46 +++++++++++-------- .../src/components/agents/agent_table.tsx | 13 +++--- .../claude_code_plugins/plugin_table.tsx | 13 +++--- .../common_components/ModelAliasManager.tsx | 19 ++++---- .../components/guardrails/guardrail_table.tsx | 13 +++--- .../molecules/models/columns.test.tsx | 17 +++++-- .../src/components/organizations.tsx | 27 ++++++----- .../components/policies/attachment_table.tsx | 13 +++--- .../src/components/policies/policy_table.tsx | 13 +++--- .../src/components/prompts/prompt_table.tsx | 13 +++--- .../src/components/team/available_teams.tsx | 19 ++++---- .../VectorStoreTable.test.tsx | 8 ++-- .../VectorStoreTable.tsx | 13 +++--- 22 files changed, 160 insertions(+), 172 deletions(-) diff --git a/ui/litellm-dashboard/src/app/(dashboard)/teams/components/TeamsTable/ModelsCell.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/teams/components/TeamsTable/ModelsCell.test.tsx index 2b487d65322..1e383d0af40 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/teams/components/TeamsTable/ModelsCell.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/teams/components/TeamsTable/ModelsCell.test.tsx @@ -4,17 +4,8 @@ import { describe, expect, it, vi } from "vitest"; import { Team } from "@/components/key_team_helpers/key_list"; import ModelsCell from "./ModelsCell"; -// The Icon component from @tremor/react does not forward onClick to the rendered element -// by default in the test environment, so we stub it with a clickable button so accordion -// interaction can be tested end-to-end. -vi.mock("@tremor/react", async (importOriginal) => { - const actual = await importOriginal(); - return { - ...actual, - Icon: ({ onClick, "aria-label": ariaLabel }: { onClick?: () => void; "aria-label"?: string }) => - React.createElement("button", { onClick, "aria-label": ariaLabel ?? "accordion-toggle", type: "button" }), - }; -}); +// The component now uses a native