From 99745fe75e68cf612f5623fcc922fd6757a4fbf1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 23 Apr 2026 18:40:18 +0000 Subject: [PATCH] feat(ui): model_dashboard/all_models_table semantic token pass - Tremor Table family preserved (whitelist) with inline eslint- disable; dead getHeaderText helper removed. - bg-white sticky shadow cells \u2192 bg-background. bg-gray-50 row hover \u2192 bg-muted. Resizer bar: bg-blue-500 \u2192 bg-primary, hover:bg-blue-200 \u2192 hover:bg-primary/20. Loading/empty state messages use text-muted-foreground. Gates: TS \u2713 | Build \u2713. Co-authored-by: yuneng-jiang --- .../model_dashboard/all_models_table.tsx | 77 ++++++++++--------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/ui/litellm-dashboard/src/components/model_dashboard/all_models_table.tsx b/ui/litellm-dashboard/src/components/model_dashboard/all_models_table.tsx index 0585d96087c..e7c9d389ed0 100644 --- a/ui/litellm-dashboard/src/components/model_dashboard/all_models_table.tsx +++ b/ui/litellm-dashboard/src/components/model_dashboard/all_models_table.tsx @@ -11,8 +11,19 @@ import { OnChangeFn, } from "@tanstack/react-table"; import React from "react"; -import { Table, TableHead, TableHeaderCell, TableBody, TableRow, TableCell } from "@tremor/react"; -import { TableHeaderSortDropdown, SortState } from "../common_components/TableHeaderSortDropdown/TableHeaderSortDropdown"; +// eslint-disable-next-line litellm-ui/no-banned-ui-imports +import { + Table, + TableHead, + TableHeaderCell, + TableBody, + TableRow, + TableCell, +} from "@tremor/react"; +import { + TableHeaderSortDropdown, + SortState, +} from "../common_components/TableHeaderSortDropdown/TableHeaderSortDropdown"; // Extend the column meta type to include className declare module "@tanstack/react-table" { @@ -74,25 +85,6 @@ export function AllModelsDataTable({ }, }); - const getHeaderText = (header: any): string => { - if (typeof header === "string") { - return header; - } - if (typeof header === "function") { - const headerElement = header(); - if (headerElement && headerElement.props && headerElement.props.children) { - const children = headerElement.props.children; - if (typeof children === "string") { - return children; - } - if (children.props && children.props.children) { - return children.props.children; - } - } - } - return ""; - }; - return (
@@ -111,10 +103,11 @@ export function AllModelsDataTable({ {headerGroup.headers.map((header) => ( ({
)} @@ -168,8 +164,11 @@ export function AllModelsDataTable({ {isLoading ? ( - -
+ +

🚅 Loading models...

@@ -178,16 +177,19 @@ export function AllModelsDataTable({ tableInstance.getRowModel().rows.map((row) => ( onRowClick?.(row.original)} > {row.getVisibleCells().map((cell) => ( ({ )) ) : ( - -
+ +

No models found