fix: color compound nodes by execution status in overlay
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m12s
CI / docker (push) Successful in 1m5s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 51s

CompoundNode now uses execution overlay status to color its header:
failed (red) > completed (green) > default. Previously only used
static type-based color regardless of execution state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-01 17:20:59 +02:00
parent cf439248b5
commit b44ffd08be

View File

@@ -66,10 +66,17 @@ export function CompoundNode({
onNodeClick, onNodeDoubleClick, onNodeEnter, onNodeLeave,
};
// Gate state: filter rejected or idempotent duplicate → amber container
// Execution overlay state for this compound
const ownState = node.id ? executionOverlay?.get(node.id) : undefined;
const isGated = ownState?.filterMatched === false || ownState?.duplicateMessage === true;
const effectiveColor = isGated ? 'var(--amber)' : color;
const isCompleted = ownState?.status === 'COMPLETED';
const isFailed = ownState?.status === 'FAILED';
// Color priority: gated (amber) > failed (red) > completed (green) > default
const effectiveColor = isGated ? 'var(--amber)'
: isFailed ? '#C0392B'
: isCompleted ? '#3D7C47'
: color;
// Dim compound when overlay is active but neither the compound nor any
// descendant was executed in the current iteration.