Shared node changes rebuild the flows whose published copy uses them, not their drafts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-14 23:34:47 +02:00
co-authored by Claude Opus 5.5
parent f8d14be8e6
commit 1735a3651e
3 changed files with 35 additions and 4 deletions
+7 -3
View File
@@ -355,12 +355,16 @@ class FlowStore:
self._set_source_ref(flow, node_id, None)
self._commit(f"Unshare node '{flow}.{node_id}'")
def usages(self, lib_name: str) -> list[str]:
"""Every ``flow.node`` pointing at this shared source."""
def usages(self, lib_name: str, draft: bool = True) -> list[str]:
"""Every ``flow.node`` pointing at this shared source.
Read from the drafts the editor shows, or with ``draft`` off from the
published flows the engine runs.
"""
used = []
for name in self.list_flows():
try:
definition = self.read_flow(name, draft=True)
definition = self.read_flow(name, draft=draft)
except FlowNotFound:
continue
used += [