feat: change circular reference detection from error to warning — loops are intentional
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -802,8 +802,8 @@ export const useTreeEditorStore = create<TreeEditorState>()(
|
||||
if (opt.next_node_id && detectCircularRefs(opt.next_node_id, new Set(visited))) {
|
||||
errors.push({
|
||||
nodeId: node.id,
|
||||
message: `Circular reference detected: "${opt.label}" creates a loop`,
|
||||
severity: 'error'
|
||||
message: `This path loops back to an earlier node via "${opt.label}"`,
|
||||
severity: 'warning'
|
||||
})
|
||||
return true
|
||||
}
|
||||
@@ -814,8 +814,8 @@ export const useTreeEditorStore = create<TreeEditorState>()(
|
||||
if (node.next_node_id && detectCircularRefs(node.next_node_id, new Set(visited))) {
|
||||
errors.push({
|
||||
nodeId: node.id,
|
||||
message: `Circular reference detected in node "${node.title || node.id}"`,
|
||||
severity: 'error'
|
||||
message: `This node loops back to an earlier node ("${node.title || node.id}")`,
|
||||
severity: 'warning'
|
||||
})
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user