Publish, delete and module installs rebuild only what changed

Publishing or deleting a flow now splices that one flow into the running
graph instead of reconnecting every node in the installation, saving a
shared node's source rebuilds the flows using it, and installing modules
rebuilds only the flows holding a node that would not load.

Renaming stays on the full rebuild — it rewrites message references in
every other flow's document — and so does startup, which has no graph to
splice into.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01StpRc2C6au1WJ1EUU7fsfu
This commit is contained in:
2026-08-23 18:32:51 +02:00
co-authored by Claude Opus 5
parent a4a9f2adff
commit c95d0ca8f5
3 changed files with 16 additions and 4 deletions
+3 -3
View File
@@ -425,7 +425,7 @@ async def publish_flow(
detail={"message": str(exc), "current_version": exc.current},
)
_audit("published", name, user)
await controller.reload()
await controller.reload_flow(name)
return _detail(controller, published)
@@ -475,7 +475,7 @@ async def delete_flow(
# Its files are gone; its values and queued work would otherwise linger.
await run_in_threadpool(controller.forget_flow, name)
await run_in_threadpool(_forget_runs, session, name)
await controller.reload()
await controller.reload_flow(name)
return Message(message=f"Deleted flow '{name}'")
@@ -556,7 +556,7 @@ async def save_node_source(
controller.store.write_lib_source, ref, source.code
)
if changed:
await controller.reload()
await controller.reload_lib_users(ref)
else:
await run_in_threadpool(
controller.store.write_node_source, name, node_id, source.code, True