fix: use CSS variables directly for gate state colors
Some checks failed
CI / cleanup-branch (push) Has been skipped
CI / build (push) Failing after 25s
CI / docker (push) Has been skipped
CI / deploy (push) Has been skipped
CI / deploy-feature (push) Has been skipped

Use var(--amber) and var(--amber-bg) in SVG fill/stroke attributes
instead of hardcoded hex values. SVG presentation attributes resolve
CSS variables correctly, and this respects dark mode theme switching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-30 10:59:07 +02:00
parent 2de10f6eb0
commit c8caf3dc44

View File

@@ -69,9 +69,7 @@ export function CompoundNode({
// Gate state: filter rejected or idempotent duplicate → amber container
const ownState = node.id ? executionOverlay?.get(node.id) : undefined;
const isGated = ownState?.filterMatched === false || ownState?.duplicateMessage === true;
const GATE_COLOR = '#C6820E'; // --amber
const GATE_BG = '#FDF6E9'; // --amber-bg
const effectiveColor = isGated ? GATE_COLOR : color;
const effectiveColor = isGated ? 'var(--amber)' : color;
// _TRY_BODY / _CB_MAIN: transparent wrapper — no header, no border, just layout
if (node.type === '_TRY_BODY' || node.type === '_CB_MAIN') {
@@ -126,7 +124,7 @@ export function CompoundNode({
}
// Default compound rendering (DO_TRY, EIP_CHOICE, EIP_FILTER, EIP_IDEMPOTENT_CONSUMER, etc.)
const containerFill = isGated ? GATE_BG : 'white';
const containerFill = isGated ? 'var(--amber-bg)' : 'white';
return (
<g data-node-id={node.id} transform={`translate(${x}, ${y})`}>
{/* Container body */}