🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(web): table chrome follows its surface instead of hard-coded white (#18268)
Trang Nguyen77abeaa10eb9
diff --git a/web/src/components/design-system/table/Table.tsx b/web/src/components/design-system/table/Table.tsxindex e3ebb6375c..f8c72b1677 100644--- a/web/src/components/design-system/table/Table.tsx+++ b/web/src/components/design-system/table/Table.tsx@@ -156,7 +156,7 @@ export function Table<TData extends object>({key={header.id}aria-sort={ariaSort}className={cn(- "group bg-background text-muted-foreground relative h-10 border-b p-2 text-left align-middle font-bold",+ "group bg-surface text-muted-foreground relative h-10 border-b p-2 text-left align-middle font-bold",column.headerClassName,column.hideBelowMd && "hidden md:table-cell",)}diff --git a/web/src/components/table/data-table-controls.tsx b/web/src/components/table/data-table-controls.tsxindex 2de9514a50..d4f2972285 100644--- a/web/src/components/table/data-table-controls.tsx+++ b/web/src/components/table/data-table-controls.tsx@@ -886,7 +886,7 @@ export function DataTableControls({{/* Collapsed rail: shown when the sidebar is collapsed on desktop, wherethe resizable panel keeps a thin strip (see ResizableFilterLayout).Mirrors the trace peek's collapsed-panel rail. */}- <div className="bg-background hidden h-full w-full flex-col items-center border-t group-data-[expanded=false]/controls:flex">+ <div className="bg-surface hidden h-full w-full flex-col items-center border-t group-data-[expanded=false]/controls:flex">{/* Mirror the expanded header's metrics (h-10 row, border-b, 24pxbutton) so the toggle icon doesn't shift when collapsing. */}<div className="flex h-10 w-full shrink-0 items-center justify-center border-b">@@ -955,14 +955,14 @@ export function DataTableControls({</div><divclassName={cn(- "bg-background flex w-full flex-col border-t",+ "bg-surface flex w-full flex-col border-t",// panel: a bounded, self-scrolling column. inline: natural height so// the host's outer scroll owns scrolling (no clip, no forced height).layout === "panel" && "h-full overflow-hidden","group-data-[expanded=false]/controls:hidden",)}>- <div className="bg-background flex h-10 shrink-0 items-center justify-between border-b px-3">+ <div className="bg-surface flex h-10 shrink-0 items-center justify-between border-b px-3"><div className="flex items-center gap-1.5">{/* Three contexts for the header's close affordance:- inline (events MobileFiltersSheet): the sheet owns its own X +@@ -1183,7 +1183,7 @@ export function DataTableControls({// pinning to the top of the scroll area would otherwise sit tight// against the field. pb-0.5 + the header's own 6px = the 8px above// the field, at rest and scrolled alike.- <div className="bg-background shrink-0 px-2 pt-2 pb-0.5">+ <div className="bg-surface shrink-0 px-2 pt-2 pb-0.5"><div className="relative"><Search className="text-muted-foreground absolute top-1/2 left-2 h-3.5 w-3.5 -translate-y-1/2" /><Input@@ -1371,7 +1371,7 @@ const FilterAccordionTrigger = ({// pt-1.5/pb-0.5 rather than an even py: the 8px between two rows is split so// that 6px of it sits INSIDE this sticky box, which is what keeps a pinned// header the same distance from whatever is above it as it was at rest.- <AccordionPrimitive.Header className="bg-background sticky top-0 z-[1] flex px-2 pt-1.5 pb-0.5">+ <AccordionPrimitive.Header className="bg-surface sticky top-0 z-[1] flex px-2 pt-1.5 pb-0.5"><AccordionPrimitive.TriggerclassName={cn(// min-w-0: without it the trigger's automatic min width equals thediff --git a/web/src/components/table/data-table.tsx b/web/src/components/table/data-table.tsxindex 903ba08390..cc4ca25422 100644--- a/web/src/components/table/data-table.tsx+++ b/web/src/components/table/data-table.tsx@@ -183,7 +183,9 @@ const getCommonPinningStyles = <TData,>(position: isPinned ? "sticky" : "relative",width: column.getSize(),zIndex: isPinned ? 10 : 0,- backgroundColor: isPinned ? "hsl(var(--background))" : undefined,+ backgroundColor: isPinned+ ? "var(--surface-context, hsl(var(--background)))"+ : undefined,// Repeated outer shadows paint through the stable scrollbar gutter even// when a table cell clips its contents. Only the outermost right-pinned// column owns them, so adjacent pinned columns retain their normal offsets.@@ -690,7 +692,7 @@ export function DataTable<TData extends object, TValue>({</div></div>{!hidePagination && pagination !== undefined ? (- <div className="bg-background sticky bottom-0 z-10 flex w-full justify-end border-t py-2 pr-2 font-bold">+ <div className="bg-surface sticky bottom-0 z-10 flex w-full justify-end border-t py-2 pr-2 font-bold"><DataTablePaginationtable={table}isLoading={diff --git a/web/src/components/table/resizable-filter-layout.tsx b/web/src/components/table/resizable-filter-layout.tsxindex 3379fd4101..5d0a0e2200 100644--- a/web/src/components/table/resizable-filter-layout.tsx+++ b/web/src/components/table/resizable-filter-layout.tsx@@ -104,7 +104,7 @@ export function StickySearchableTableFilterLayout({return (<SearchBarDraftCacheContext.Provider value={searchDraftCache}>- <div className="bg-background sticky top-0 z-30 pb-1.5">+ <div className="bg-surface sticky top-0 z-30 pb-1.5">{isMobile ? null : search}{toolbar}</div>diff --git a/web/src/components/ui/table.tsx b/web/src/components/ui/table.tsxindex 937a6d34a8..9f465af91b 100644--- a/web/src/components/ui/table.tsx+++ b/web/src/components/ui/table.tsx@@ -77,7 +77,7 @@ const TableHead = React.forwardRef<<thref={ref}className={cn(- "bg-background text-muted-foreground relative h-10 border-b px-2 text-left align-middle font-bold [&:has([role=checkbox])]:pr-0",+ "bg-surface text-muted-foreground relative h-10 border-b px-2 text-left align-middle font-bold [&:has([role=checkbox])]:pr-0",className,)}{...props}diff --git a/web/src/features/traces/components/JSONTableView/JSONTableViewRow.tsx b/web/src/features/traces/components/JSONTableView/JSONTableViewRow.tsxindex 6bdbc71e99..68ef59c38b 100644--- a/web/src/features/traces/components/JSONTableView/JSONTableViewRow.tsx+++ b/web/src/features/traces/components/JSONTableView/JSONTableViewRow.tsx@@ -35,7 +35,7 @@ function JSONTableViewRowInner<T>({const expandedContentId = `expanded-content-${itemKey}`;return (- <div className="border-border bg-background border-b">+ <div className="border-border bg-surface border-b">{/* Preview row - always visible */}<divclassName={cn(diff --git a/web/src/features/traces/components/TracePanelDetail.tsx b/web/src/features/traces/components/TracePanelDetail.tsxindex 985c8327a3..06bdf2e39c 100644--- a/web/src/features/traces/components/TracePanelDetail.tsx+++ b/web/src/features/traces/components/TracePanelDetail.tsx@@ -93,6 +93,8 @@ export function TracePanelDetail() {}, [selected, trace, observations, scores, corrections]);return (- <div className="bg-background h-full w-full overflow-y-auto">{content}</div>+ <div className="bg-surface-sunken h-full w-full overflow-y-auto [--surface-context:hsl(var(--surface-sunken))]">+ {content}+ </div>);}