Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(web): dark mode updates - layering model (#15116)

Trang Nguyen8325a14dff8e
diff --git a/web/src/components/layouts/page-header.tsx b/web/src/components/layouts/page-header.tsx
index 1bce9afa1b..0cfacdf6e9 100644
--- a/web/src/components/layouts/page-header.tsx
+++ b/web/src/components/layouts/page-header.tsx
@@ -126,7 +126,7 @@ const PageHeader = ({
</div>
{/* Bottom Row */}
- <div className="bg-header">
+ <div>
<div
className={cn(
"flex min-h-11 w-full flex-wrap items-center justify-between gap-1 px-3 py-1 md:flex-nowrap",
diff --git a/web/src/components/table/data-table-column-visibility-filter.tsx b/web/src/components/table/data-table-column-visibility-filter.tsx
index 355b874104..5ad07c1da8 100644
--- a/web/src/components/table/data-table-column-visibility-filter.tsx
+++ b/web/src/components/table/data-table-column-visibility-filter.tsx
@@ -403,7 +403,7 @@ export function DataTableColumnVisibilityFilter<TData, TValue>({
<DrawerContent overlayClassName="bg-primary/10">
<div className="mx-auto w-full overflow-y-auto md:max-h-full">
<div className="sticky top-0 z-10">
- <DrawerHeader className="bg-background flex flex-row items-center justify-between rounded-sm px-3 py-2">
+ <DrawerHeader className="bg-modal flex flex-row items-center justify-between rounded-sm px-3 py-2">
<DrawerTitle>Column Visibility</DrawerTitle>
<div className="flex flex-row gap-2">
<Button
diff --git a/web/src/components/table/peek.tsx b/web/src/components/table/peek.tsx
index 70941694fc..e87508b488 100644
--- a/web/src/components/table/peek.tsx
+++ b/web/src/components/table/peek.tsx
@@ -335,7 +335,7 @@ function TablePeekViewComponent(props: TablePeekViewProps) {
// No overflow-hidden here: the resize handle straddles the left
// edge (overhangs onto the table) so it's grabbable from either
// side. The body clips its own content instead.
- "bg-background top-banner-offset h-screen-with-banner fixed right-0 bottom-0 flex max-h-full min-h-0 max-w-none flex-col gap-0 border-l",
+ "bg-modal top-banner-offset h-screen-with-banner fixed right-0 bottom-0 flex max-h-full min-h-0 max-w-none flex-col gap-0 border-l",
// Soft shadow cast leftward (toward the table) to lift the peek
// off the content behind it.
"shadow-[-12px_0_32px_-16px_rgb(0_0_0_/_0.30)]",
diff --git a/web/src/components/table/peek/PeekHeader.tsx b/web/src/components/table/peek/PeekHeader.tsx
index 62b76525c4..0bdec17e9f 100644
--- a/web/src/components/table/peek/PeekHeader.tsx
+++ b/web/src/components/table/peek/PeekHeader.tsx
@@ -206,7 +206,7 @@ export function PeekHeader({
<TooltipProvider delayDuration={TOOLTIP_DELAY_MS}>
<div
ref={headerRef}
- className="bg-header flex min-h-11 shrink-0 flex-row flex-nowrap items-center justify-between gap-2 overflow-hidden px-2 py-1"
+ className="bg-muted flex min-h-11 shrink-0 flex-row flex-nowrap items-center justify-between gap-2 overflow-hidden px-2 py-1"
>
<div className="flex min-w-0 flex-row items-center gap-2">
{/* Badge never truncates: it shows the full label or just the icon. */}
diff --git a/web/src/components/table/table-view-presets/components/data-table-view-presets-drawer.tsx b/web/src/components/table/table-view-presets/components/data-table-view-presets-drawer.tsx
index 0edc6d98e6..53759ac051 100644
--- a/web/src/components/table/table-view-presets/components/data-table-view-presets-drawer.tsx
+++ b/web/src/components/table/table-view-presets/components/data-table-view-presets-drawer.tsx
@@ -469,7 +469,7 @@ export function TableViewPresetsDrawer({
</DrawerTrigger>
<DrawerContent overlayClassName="bg-primary/10">
<div className="mx-auto w-full">
- <DrawerHeader className="bg-background flex flex-row items-center justify-between rounded-sm px-3 py-1.5">
+ <DrawerHeader className="bg-modal flex flex-row items-center justify-between rounded-sm px-3 py-1.5">
<DrawerTitle className="flex flex-row items-center gap-1">
Views{" "}
<a
diff --git a/web/src/components/ui/alert-dialog.tsx b/web/src/components/ui/alert-dialog.tsx
index 59bc5f5985..bbee49079b 100644
--- a/web/src/components/ui/alert-dialog.tsx
+++ b/web/src/components/ui/alert-dialog.tsx
@@ -48,7 +48,7 @@ const AlertDialogContent = React.forwardRef<
ref={ref}
className={cn(
motionStyles.content,
- "bg-background fixed top-[50%] left-[50%] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg",
+ "bg-modal fixed top-[50%] left-[50%] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg",
className,
)}
{...props}
diff --git a/web/src/components/ui/dialog.tsx b/web/src/components/ui/dialog.tsx
index 119afdaf1b..276ada5163 100644
--- a/web/src/components/ui/dialog.tsx
+++ b/web/src/components/ui/dialog.tsx
@@ -60,7 +60,7 @@ const DialogOverlay = React.forwardRef<
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
const dialogContentVariants = cva(
- "fixed left-[50%] top-[50%] overflow-hidden flex w-full translate-x-[-50%] translate-y-[-50%] flex-col bg-background shadow-lg sm:rounded-lg",
+ "fixed left-[50%] top-[50%] overflow-hidden flex w-full translate-x-[-50%] translate-y-[-50%] flex-col bg-modal shadow-lg sm:rounded-lg",
{
variants: {
size: {
@@ -166,7 +166,7 @@ const DialogContent = React.forwardRef<
DialogContent.displayName = DialogPrimitive.Content.displayName;
const dialogHeaderVariants = cva(
- "bg-background sticky top-0 z-30 flex shrink-0 flex-col space-y-1.5 rounded-t-lg p-4",
+ "bg-modal sticky top-0 z-30 flex shrink-0 flex-col space-y-1.5 rounded-t-lg p-4",
{
variants: {
variant: {
@@ -223,7 +223,7 @@ const DialogBody = React.forwardRef<
DialogBody.displayName = "DialogBody";
const dialogFooterVariants = cva(
- "bg-background sticky bottom-0 z-10 flex shrink-0 flex-col-reverse rounded-b-lg p-6 px-6 sm:flex-row sm:justify-end sm:space-x-2",
+ "bg-modal sticky bottom-0 z-10 flex shrink-0 flex-col-reverse rounded-b-lg p-6 px-6 sm:flex-row sm:justify-end sm:space-x-2",
{
variants: {
variant: {
diff --git a/web/src/components/ui/drawer.tsx b/web/src/components/ui/drawer.tsx
index f7e5e4f4b1..69ebd586d5 100644
--- a/web/src/components/ui/drawer.tsx
+++ b/web/src/components/ui/drawer.tsx
@@ -36,7 +36,7 @@ type DrawerContentProps = React.ComponentPropsWithoutRef<
// https://tailwindcss.com/docs/responsive-design
const TAILWIND_MD_MEDIA_QUERY = 768;
-const drawerVariants = cva("fixed flex flex-col border bg-background", {
+const drawerVariants = cva("fixed flex flex-col border bg-modal", {
variants: {
direction: {
bottom: "inset-x-0 bottom-0 rounded-t-lg",
diff --git a/web/src/components/ui/sheet.tsx b/web/src/components/ui/sheet.tsx
index a075c78125..f234664e89 100644
--- a/web/src/components/ui/sheet.tsx
+++ b/web/src/components/ui/sheet.tsx
@@ -43,7 +43,7 @@ const SheetOverlay = React.forwardRef<
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
const sheetVariants = cva(
- "fixed gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-100 data-[state=open]:duration-100",
+ "fixed gap-4 bg-modal p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-100 data-[state=open]:duration-100",
{
variants: {
side: {
diff --git a/web/src/ee/features/in-app-agent/components/InAppAgentMessage.tsx b/web/src/ee/features/in-app-agent/components/InAppAgentMessage.tsx
index fc022a3582..00f03e6427 100644
--- a/web/src/ee/features/in-app-agent/components/InAppAgentMessage.tsx
+++ b/web/src/ee/features/in-app-agent/components/InAppAgentMessage.tsx
@@ -217,7 +217,7 @@ const MessageCard = forwardRef<
: "rounded-2xl px-3 py-1.5 text-sm",
isUser
? "bg-primary text-primary-foreground"
- : "bg-card dark:bg-header text-foreground border-border border",
+ : "bg-card text-foreground border-border border",
)}
>
{content.type === "loading" ? (
diff --git a/web/src/ee/features/in-app-agent/components/InAppAgentToolCallCard.tsx b/web/src/ee/features/in-app-agent/components/InAppAgentToolCallCard.tsx
index c21223a9be..0bc4b6f8bf 100644
--- a/web/src/ee/features/in-app-agent/components/InAppAgentToolCallCard.tsx
+++ b/web/src/ee/features/in-app-agent/components/InAppAgentToolCallCard.tsx
@@ -29,7 +29,7 @@ export function InAppAgentToolCallCard({
return (
<div
className={cn(
- "bg-card dark:bg-header text-foreground border-border rounded-2xl border shadow-xs",
+ "bg-card text-foreground border-border rounded-2xl border shadow-xs",
isCompact
? "rounded-xl px-2.5 py-2 text-[0.775rem]"
: "px-3 py-2.5 text-sm",
diff --git a/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx b/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx
index 507c14206c..d5e05f5e33 100644
--- a/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx
+++ b/web/src/ee/features/in-app-agent/components/InAppAgentWindow.tsx
@@ -400,7 +400,7 @@ export function InAppAgentWindow(props: InAppAgentWindowProps) {
isHeaderDragHandleEnabled ? "true" : undefined
}
className={cn(
- "bg-header flex min-h-11.25 shrink-0 items-center justify-between gap-2 border-b px-3 py-1",
+ "bg-card flex min-h-11.25 shrink-0 items-center justify-between gap-2 border-b px-3 py-1",
isHeaderDragHandleEnabled && "cursor-move touch-none select-none",
)}
>
@@ -621,7 +621,7 @@ export function InAppAgentWindow(props: InAppAgentWindowProps) {
key={label}
type="button"
className={cn(
- "bg-card dark:bg-header text-foreground border-border hover:bg-muted/60 border text-[0.775rem] leading-none shadow-xs transition-colors disabled:cursor-not-allowed disabled:opacity-60",
+ "bg-card text-foreground border-border hover:bg-muted/60 border text-[0.775rem] leading-none shadow-xs transition-colors disabled:cursor-not-allowed disabled:opacity-60",
isExpanded
? "rounded-2xl px-3 py-2"
: "rounded-xl px-2 py-1.5",
@@ -789,9 +789,9 @@ export function InAppAgentWindow(props: InAppAgentWindowProps) {
{isExpanded && (
<>
{/* Gradient overlays for expanded state so that the edges fade out */}
- {/* Make sure this matches the color of the background */}
- <div className="from-header absolute top-0 right-0 h-full w-1/2 bg-linear-to-l to-transparent" />
- <div className="from-header absolute top-0 left-0 h-full w-1/2 bg-linear-to-r to-transparent" />
+ {/* Match the assistant surface (bg-background) so edges fade cleanly */}
+ <div className="from-background absolute top-0 right-0 h-full w-1/2 bg-linear-to-l to-transparent" />
+ <div className="from-background absolute top-0 left-0 h-full w-1/2 bg-linear-to-r to-transparent" />
</>
)}
</div>
@@ -800,7 +800,7 @@ export function InAppAgentWindow(props: InAppAgentWindowProps) {
<div
className={cn(
"p-1.5",
- isExpanded ? "pt-0" : "bg-header",
+ isExpanded ? "pt-0" : "bg-card",
!isExpanded && hasUserMessage && "border-t",
)}
>
diff --git a/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx b/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx
index 60cf60f63c..ea6491b054 100644
--- a/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx
+++ b/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx
@@ -258,7 +258,7 @@ export const CreateOrEditLLMSchemaDialog: React.FC<
</div>
</DialogBody>
- <DialogFooter className="bg-background sticky bottom-0 mt-4 flex flex-col gap-2 border-t pt-4">
+ <DialogFooter className="bg-modal sticky bottom-0 mt-4 flex flex-col gap-2 border-t pt-4">
<div className="flex w-full flex-col gap-2">
<p className="text-muted-foreground text-xs">
Note: Changes to schemas are reflected to all members of this
diff --git a/web/src/features/playground/page/components/CreateOrEditLLMToolDialog.tsx b/web/src/features/playground/page/components/CreateOrEditLLMToolDialog.tsx
index 3948578fbe..ae80d2117d 100644
--- a/web/src/features/playground/page/components/CreateOrEditLLMToolDialog.tsx
+++ b/web/src/features/playground/page/components/CreateOrEditLLMToolDialog.tsx
@@ -262,7 +262,7 @@ export const CreateOrEditLLMToolDialog: React.FC<CreateOrEditLLMToolDialog> = (
</div>
</DialogBody>
- <DialogFooter className="bg-background sticky bottom-0 mt-4 flex flex-col gap-2 border-t pt-4">
+ <DialogFooter className="bg-modal sticky bottom-0 mt-4 flex flex-col gap-2 border-t pt-4">
<div className="flex w-full flex-col gap-2">
<p className="text-muted-foreground text-xs">
Note: Changes to tools are reflected to all members of this
diff --git a/web/src/styles/globals.css b/web/src/styles/globals.css
index 08326aee4c..f892599396 100644
--- a/web/src/styles/globals.css
+++ b/web/src/styles/globals.css
@@ -80,6 +80,8 @@
--color-popover-foreground: hsl(var(--popover-foreground));
--color-card: hsl(var(--card));
--color-card-foreground: hsl(var(--card-foreground));
+ --color-modal: hsl(var(--modal));
+ --color-modal-foreground: hsl(var(--modal-foreground));
--color-header: hsl(var(--header));
--color-header-foreground: hsl(var(--header-foreground));
--color-sidebar: hsl(var(--sidebar-background));
@@ -200,6 +202,12 @@
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
+ /* Blocking overlay surfaces (Dialog/AlertDialog/Sheet/Drawer/peek).
+ Light themes keep the alternating white model (Carbon: light layers
+ alternate, dark layers step lighter), so this matches --background. */
+ --modal: 0 0% 100%;
+ --modal-foreground: 222.2 84% 4.9%;
+
--header: 210 40% 98%;
--header-foreground: var(--foreground);
@@ -315,17 +323,26 @@
}
.dark {
- /* Linear-style surface ladder: elevation is carried by lightness steps
- (background < header/sidebar < card < popover) plus hairline borders —
- not shadows. Values from linear.app's [data-theme=dark] tokens. */
- /* Neutral (zero-saturation) surface ladder — lightness steps carry the
- elevation (Linear's structure, de-tinted per Trang's call after a
- cool/neutral/warm A-B). Text hierarchy comes from the WIDE GAP between
+ /* Surface ladder — "layers become one step lighter with each added
+ layer" (Carbon's dark-theme layering model; Hex and Cloudflare Kumo
+ follow the same structure). The GLOBAL FRAME (header/sidebar chrome)
+ is the darkest tier; the content canvas sits one step above it, and
+ every stacked layer steps up from there:
+ chrome 2% < canvas 6% < card 7.5% < modal 9% < popover 12%.
+ The bottom step is the widest (chrome→canvas) — equal pp steps read
+ smaller near black, and the frame/content split carries the layout.
+ Popovers outrank modals because menus/tooltips open on top of dialogs.
+ Never paint a surface darker than what it floats above (Carbon rule).
+ --surface-code stays BELOW its surroundings — it is the one recessed
+ tier ("code is a well"). Elevation is carried by these lightness steps
+ plus hairline borders, not shadows. */
+ /* Neutral (zero-saturation) ladder — de-tinted per Trang's call after a
+ cool/neutral/warm A-B. Text hierarchy comes from the WIDE GAP between
tiers: emphasis 91% > body 88% > meta 54% > faint 40%, with sidebar nav
dimmer than content until active. Bright tiers cap near 91% (the docs
site caps at 90%) — never near-white. Don't compress the ramp — the
gap is the hierarchy. */
- --background: 0 0% 3.5%;
+ --background: 0 0% 6%;
--foreground: 0 0% 88%;
--muted: 0 0% 11.6%;
@@ -333,16 +350,20 @@
--foreground-tertiary: 0 0% 40%;
--surface-code: 0 0% 2.3%;
- --popover: 0 0% 10.2%;
+ --popover: 0 0% 12%;
--popover-foreground: 0 0% 88%;
- --card: 0 0% 8.2%;
+ --card: 0 0% 7.5%;
--card-foreground: 0 0% 88%;
- --header: 0 0% 6.3%;
+ --modal: 0 0% 9%;
+ --modal-foreground: 0 0% 88%;
+
+ --header: 0 0% 2%;
--header-foreground: var(--foreground);
- --border: 0 0% 10.5%;
+ /* Hairline must read on EVERY surface tier, including popover (12%). */
+ --border: 0 0% 15%;
--border-contrast: 0 0% 26%;
--input: 0 0% 18%;
@@ -355,7 +376,7 @@
--tertiary: 0 0% 16.5%;
--tertiary-foreground: 0 0% 88%;
- /* One clear step above --popover (10.2%) — focus:bg-accent is the only
+ /* One clear step above --popover (12%) — focus:bg-accent is the only
focus cue in menus/selects/⌘K, and 14.3% was a near-invisible ~1.13:1. */
--accent: 0 0% 18%;
--accent-foreground: 0 0% 91%;
@@ -377,7 +398,7 @@
--muted-blue: 215 95% 73.1%;
--muted-green: 142 76.7% 73.1%;
--muted-magenta: 330 76.7% 73.1%;
- /* Keeps ~4pp above --card so chart grids (--chart-grid) and disabled
+ /* Stays clearly above --card so chart grids (--chart-grid) and disabled
badge fills stay discernible on elevated surfaces, without the harshness
of --border-contrast (26%). */
--muted-gray: 0 0% 16%;
@@ -413,13 +434,13 @@
--radius: 0.5rem;
- --sidebar-background: 0 0% 6.3%;
+ --sidebar-background: 0 0% 2%;
--sidebar-foreground: 0 0% 60%;
--sidebar-primary: 0 0% 90%;
--sidebar-primary-foreground: 0 0% 3.5%;
- --sidebar-accent: 0 0% 11.6%;
+ --sidebar-accent: 0 0% 10%;
--sidebar-accent-foreground: 0 0% 91%;
- --sidebar-border: 0 0% 10.5%;
+ --sidebar-border: 0 0% 12%;
--sidebar-ring: 246 55% 70%;
--find-match-background: 60 100% 20%;