diff --git a/ui/src/components/ProcessDiagram/CompoundNode.tsx b/ui/src/components/ProcessDiagram/CompoundNode.tsx index 3e96d029..170f309c 100644 --- a/ui/src/components/ProcessDiagram/CompoundNode.tsx +++ b/ui/src/components/ProcessDiagram/CompoundNode.tsx @@ -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.