Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/utils/graphTraversalUtil.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,15 @@ describe('graphTraversalUtil', () => {
expect(executionIds).toEqual(['789', '456', '123']) // DFS processes in LIFO order
})

it('should keep a colon-bearing root node ID whole', () => {
const graph = createMockGraph([])
const node = createMockNode('insert:op-123:root:node:29', { graph })

const executionIds = getExecutionIdsForSelectedNodes([node])

expect(executionIds).toEqual(['insert:op-123:root:node:29'])
})

it('should expand subgraph nodes to include all children', () => {
const graph = createMockGraph([])
const subNodes = [createMockNode('10'), createMockNode('11')]
Expand Down
2 changes: 1 addition & 1 deletion src/utils/graphTraversalUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ export function getExecutionIdsForSelectedNodes(
node: LGraphNode,
parentExecutionId: string | null
): NodeExecutionId | null {
if (!parentExecutionId) return createNodeExecutionId([node.id])
if (!parentExecutionId) return createLeafNodeExecutionId(node.id)

return createExecutionIdFromPath(parentExecutionId, node.id)
}
Expand Down
Loading