From fe16b301084043debe19eaff09ae86749279c133 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 23 Apr 2026 14:53:45 +0000 Subject: [PATCH] feat(ui): view_logs/DataTable semantic-tokens pass - Tremor Table family preserved (chart/table whitelist) with inline eslint-disable on the import. - bg-gray-50 / text-gray-500 / text-gray-400 \u2192 bg-muted / text-muted-foreground tokens. - Sort-indicator arrow renders the same; sortable header hover state uses bg-muted. Gates: TS \u2713 | Build \u2713. Co-authored-by: yuneng-jiang --- .../src/components/view_logs/table.tsx | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/ui/litellm-dashboard/src/components/view_logs/table.tsx b/ui/litellm-dashboard/src/components/view_logs/table.tsx index 38c00490b78..fab37e786f1 100644 --- a/ui/litellm-dashboard/src/components/view_logs/table.tsx +++ b/ui/litellm-dashboard/src/components/view_logs/table.tsx @@ -1,7 +1,15 @@ import { Fragment, useState } from "react"; import { ColumnDef, flexRender, getCoreRowModel, getExpandedRowModel, Row, useReactTable, getSortedRowModel, SortingState } from "@tanstack/react-table"; -import { Table, TableHead, TableHeaderCell, TableBody, TableRow, TableCell } from "@tremor/react"; +// eslint-disable-next-line litellm-ui/no-banned-ui-imports +import { + Table, + TableHead, + TableHeaderCell, + TableBody, + TableRow, + TableCell, +} from "@tremor/react"; interface DataTableProps { data: TData[]; @@ -46,6 +54,7 @@ export function DataTable({ }), ...(supportsExpansion && { getRowCanExpand }), getRowId: (row: TData, index: number) => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const _row: any = row as any; return _row?.request_id ?? String(index); }, @@ -65,17 +74,28 @@ export function DataTable({ const isSorted = header.column.getIsSorted(); return ( - {header.isPlaceholder ? null : (
- {flexRender(header.column.columnDef.header, header.getContext())} + {flexRender( + header.column.columnDef.header, + header.getContext(), + )} {canSort && ( - - {isSorted === 'asc' ? '↑' : isSorted === 'desc' ? '↓' : '⇅'} + + {isSorted === "asc" + ? "↑" + : isSorted === "desc" + ? "↓" + : "⇅"} )}
@@ -90,7 +110,7 @@ export function DataTable({ {isLoading ? ( -
+

{loadingMessage}

@@ -99,7 +119,7 @@ export function DataTable({ table.getRowModel().rows.map((row) => ( onRowClick?.(row.original)} > {row.getVisibleCells().map((cell) => ( @@ -127,7 +147,7 @@ export function DataTable({ ) : ( -
+

{noDataMessage}