Skip to content

Commit 7122093

Browse files
committed
refactor(ui): drop redundant dark: colour overrides
The colour-token migration collapsed light/dark palette pairs (e.g. text-red-600 dark:text-red-400) onto a single semantic token, leaving no-op dark: duplicates (text-error dark:text-error). Semantic tokens are already theme-aware, so the dark: variants are redundant. Also dropped the dark:bg-background-*-subtle/NN opacity overrides — a raw-palette-era hack (blue-950 was too saturated in dark); the dark-safe -subtle token is the intended dark surface on its own. Kept genuinely-different variants.
1 parent c6976ec commit 7122093

6 files changed

Lines changed: 16 additions & 20 deletions

File tree

frontend/src/components/ai-elements/message.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const MessageTimestamp = ({
106106
className={cn(
107107
"mt-2 text-xs",
108108
from === "user"
109-
? "text-informative dark:text-informative"
109+
? "text-informative"
110110
: "text-slate-500 dark:text-slate-400",
111111
className
112112
)}

frontend/src/components/pages/agents/details/ai-agent-card-tab.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -611,14 +611,12 @@ export const AIAgentCardTab = () => {
611611
)}
612612
</div>
613613

614-
<div className="rounded-md border border-outline-informative bg-background-informative-subtle p-3 dark:border-outline-informative dark:bg-background-informative-subtle/30">
614+
<div className="rounded-md border border-outline-informative bg-background-informative-subtle p-3">
615615
<div className="flex gap-2">
616-
<AlertCircle className="h-4 w-4 flex-shrink-0 text-informative dark:text-informative" />
616+
<AlertCircle className="h-4 w-4 flex-shrink-0 text-informative" />
617617
<div className="flex-1 space-y-1">
618-
<Text className="font-semibold text-informative text-sm dark:text-informative">
619-
Authentication Required
620-
</Text>
621-
<Text className="text-informative text-sm dark:text-informative">
618+
<Text className="font-semibold text-informative text-sm">Authentication Required</Text>
619+
<Text className="text-informative text-sm">
622620
This agent requires a Redpanda Cloud M2M token for authentication.{' '}
623621
<a className="underline" href="/organization-iam?tab=service-accounts">
624622
Create an M2M token

frontend/src/components/pages/agents/details/ai-agent-inspector-tab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ export const AIAgentInspectorTab = () => {
191191

192192
if (cardError) {
193193
return (
194-
<div className="rounded-md border border-outline-error bg-background-error-subtle p-4 dark:border-outline-error dark:bg-background-error-subtle/30">
195-
<Text className="text-error dark:text-error">{cardError}</Text>
194+
<div className="rounded-md border border-outline-error bg-background-error-subtle p-4">
195+
<Text className="text-error">{cardError}</Text>
196196
</div>
197197
);
198198
}

frontend/src/components/pages/mcp-servers/details/remote-mcp-connection-tab.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,12 @@ export const RemoteMCPConnectionTab = () => {
9494
<div className="w-full">
9595
<DynamicCodeBlock code={mcpServerData?.mcpServer?.url || ''} lang="text" />
9696
</div>
97-
<div className="rounded-md border border-outline-informative bg-background-informative-subtle p-3 dark:border-outline-informative dark:bg-background-informative-subtle/30">
97+
<div className="rounded-md border border-outline-informative bg-background-informative-subtle p-3">
9898
<div className="flex items-start gap-2">
99-
<AlertCircle className="mt-0.5 h-4 w-4 flex-shrink-0 text-informative dark:text-informative" />
99+
<AlertCircle className="mt-0.5 h-4 w-4 flex-shrink-0 text-informative" />
100100
<div className="space-y-2 text-sm">
101-
<Text className="font-medium text-informative dark:text-informative">
102-
Authentication Required
103-
</Text>
104-
<Text className="text-informative dark:text-informative">
101+
<Text className="font-medium text-informative">Authentication Required</Text>
102+
<Text className="text-informative">
105103
This server requires a Redpanda Cloud M2M token for authentication.
106104
<Link className="ml-1" href="/organization-iam?tab=service-accounts">
107105
Create an M2M token here.

frontend/src/components/pages/mcp-servers/details/remote-mcp-inspector-tab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,11 @@ export const RemoteMCPInspectorTab = () => {
604604
<div className="space-y-2">
605605
{Object.entries(validationErrors).map(([field, error]) => (
606606
<div
607-
className="rounded-md border border-outline-error bg-background-error-subtle p-3 dark:border-outline-error dark:bg-background-error-subtle/20"
607+
className="rounded-md border border-outline-error bg-background-error-subtle p-3"
608608
key={field}
609609
>
610610
<div className="flex items-start">
611-
<Text className="text-error dark:text-error" variant="small">
611+
<Text className="text-error" variant="small">
612612
<Text as="span" className="font-medium">
613613
{field}:
614614
</Text>{' '}

frontend/src/components/pages/mcp-servers/details/remote-mcp-tool-button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ export const RemoteMCPToolButton = ({
4040
}: RemoteMCPToolButtonProps) => {
4141
const getButtonClassName = () => {
4242
if (hasLintIssues) {
43-
return 'border-outline-error bg-background-error-subtle dark:border-outline-error dark:bg-background-error-subtle/30';
43+
return 'border-outline-error bg-background-error-subtle';
4444
}
4545
if (isSelected) {
46-
return 'border-outline-informative bg-background-informative-subtle dark:border-outline-informative dark:bg-background-informative-subtle/30';
46+
return 'border-outline-informative bg-background-informative-subtle';
4747
}
4848
return 'border-border bg-card hover:bg-gray-50 dark:hover:bg-secondary';
4949
};
@@ -71,7 +71,7 @@ export const RemoteMCPToolButton = ({
7171
</Text>
7272
{Boolean(hasLintIssues) && (
7373
<span title="Has linting issues">
74-
<AlertCircle className="h-4 w-4 flex-shrink-0 text-error dark:text-error" />
74+
<AlertCircle className="h-4 w-4 flex-shrink-0 text-error" />
7575
</span>
7676
)}
7777
</div>

0 commit comments

Comments
 (0)