Skip to content

Commit 2030c33

Browse files
committed
fix(webapp): agent badges keep their tone colour on system themes
The Badge primitive's small variant paints a blue tinted chip on system themes, which overrode the severity/confidence tones — Degraded and Medium confidence rendered blue instead of amber.
1 parent f22310a commit 2030c33

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

apps/webapp/app/components/dashboard-agent/agent-badges.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,18 @@ export type AgentTone = "neutral" | "success" | "warning" | "error";
2929

3030
// Semantic tokens, not raw palette classes: those are tuned for the dark theme
3131
// only, and these tokens are what the theme layer remaps (see tailwind.css).
32+
// The `system:` counterparts exist because the Badge primitive's `small` variant
33+
// paints a BLUE tinted chip on the system themes — without an explicit override
34+
// per tone, every agent badge turns blue there. Same chip language, tone colour.
3235
const TONE_BADGE: Record<AgentTone, string> = {
33-
neutral: "border-border-bright text-text-dimmed",
34-
success: "border-success/40 text-success",
35-
warning: "border-warning/40 text-warning",
36-
error: "border-error/40 text-error",
36+
neutral:
37+
"border-border-bright text-text-dimmed system:border-transparent system:bg-charcoal-500/10 system:text-text-dimmed",
38+
success:
39+
"border-success/40 text-success system:border-transparent system:bg-success/10 system:text-success",
40+
warning:
41+
"border-warning/40 text-warning system:border-transparent system:bg-warning/10 system:text-warning",
42+
error:
43+
"border-error/40 text-error system:border-transparent system:bg-error/10 system:text-error",
3744
};
3845

3946
export const TONE_ICON_COLOR: Record<AgentTone, string> = {

0 commit comments

Comments
 (0)