Skip to content

Commit fed3473

Browse files
cristipufuclaude
andcommitted
fix: only highlight edge from actual previous node when paused at breakpoint
Use activeNode.prev (tracked from real execution state events) to filter incoming edges at breakpoint nodes, instead of highlighting all edges targeting the node. Falls back to all edges when no prev info is available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent db600d8 commit fed3473

3 files changed

Lines changed: 38 additions & 31 deletions

File tree

src/uipath/dev/server/frontend/src/components/graph/GraphPanel.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ export default function GraphPanel({ entrypoint, runId, breakpointNode, breakpoi
438438
useEffect(() => {
439439
const isPaused = !!breakpointNode;
440440
let matchIds = new Set<string>(); // Full React Flow node IDs of the "current" node
441+
const prevNodeIds = new Set<string>(); // Full RF IDs of the previous node (for edge filtering when paused)
441442
const nextNodeIds = new Set<string>(); // Full RF IDs of breakpoint next_nodes
442443
const activeTargetIds = new Set<string>(); // Full RF IDs for isActiveNode
443444
const nodeTypeById = new Map<string, string>();
@@ -472,6 +473,10 @@ export default function GraphPanel({ entrypoint, runId, breakpointNode, breakpoi
472473
findNodeIds(name).forEach((id) => nextNodeIds.add(id));
473474
}
474475
}
476+
// Resolve previous node so we only highlight the incoming edge from it
477+
if (activeNode?.prev) {
478+
findNodeIds(activeNode.prev).forEach((id) => prevNodeIds.add(id));
479+
}
475480
} else if (activeNode) {
476481
// Try qualified name first (exact match via "subgraph:node" → "subgraph/node")
477482
const qualifiedName = activeNode.qualifiedNodeName;
@@ -515,8 +520,10 @@ export default function GraphPanel({ entrypoint, runId, breakpointNode, breakpoi
515520
eds.map((e) => {
516521
let isActive: boolean;
517522
if (isPaused) {
518-
// Edges INTO breakpoint node + edges FROM breakpoint node TO next_nodes
519-
isActive = matchIds.has(e.target)
523+
// Edge from previous node INTO breakpoint node + edges FROM breakpoint node TO next_nodes
524+
const intoBreakpoint = matchIds.has(e.target)
525+
&& (prevNodeIds.size === 0 || prevNodeIds.has(e.source));
526+
isActive = intoBreakpoint
520527
|| (matchIds.has(e.source) && nextNodeIds.has(e.target));
521528
} else {
522529
// Running: edges OUT of completed node

0 commit comments

Comments
 (0)