fix: only show amber on containers where gate blocked all children
A container is only gated (amber) when filterMatched=false or duplicateMessage=true AND no descendants were executed. Containers with executed children (split, choice, idempotent that passed) now correctly show green/red based on their execution status. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -68,10 +68,14 @@ export function CompoundNode({
|
|||||||
|
|
||||||
// Execution overlay state for this compound
|
// 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 hasExecutedChild = ownState && hasExecutedDescendant(node, executionOverlay);
|
||||||
const isCompleted = ownState?.status === 'COMPLETED';
|
const isCompleted = ownState?.status === 'COMPLETED';
|
||||||
const isFailed = ownState?.status === 'FAILED';
|
const isFailed = ownState?.status === 'FAILED';
|
||||||
|
|
||||||
|
// Gated = gate processor (filter/idempotent) blocked all children from executing
|
||||||
|
const isGated = ownState && !hasExecutedChild
|
||||||
|
&& (ownState.filterMatched === false || ownState.duplicateMessage === true);
|
||||||
|
|
||||||
// Color priority: gated (amber) > failed (red) > completed (green) > default
|
// Color priority: gated (amber) > failed (red) > completed (green) > default
|
||||||
const effectiveColor = isGated ? 'var(--amber)'
|
const effectiveColor = isGated ? 'var(--amber)'
|
||||||
: isFailed ? '#C0392B'
|
: isFailed ? '#C0392B'
|
||||||
|
|||||||
Reference in New Issue
Block a user