fix: color compound nodes by execution status in overlay
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:
@@ -66,10 +66,17 @@ export function CompoundNode({
|
|||||||
onNodeClick, onNodeDoubleClick, onNodeEnter, onNodeLeave,
|
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 ownState = node.id ? executionOverlay?.get(node.id) : undefined;
|
||||||
const isGated = ownState?.filterMatched === false || ownState?.duplicateMessage === true;
|
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
|
// Dim compound when overlay is active but neither the compound nor any
|
||||||
// descendant was executed in the current iteration.
|
// descendant was executed in the current iteration.
|
||||||
|
|||||||
Reference in New Issue
Block a user