Port dynamic node improvements from ComfyUI-JSON-Dynamic

- Deferred output cleanup (_configured flag + queueMicrotask) to prevent
  breaking links when other nodes (e.g. Kijai Set/Get) resolve outputs
  during graph loading
- file_not_found error handling in refresh to keep existing outputs intact
- Fallback widget sync in onConfigure when widget values are empty but
  serialized outputs exist

Applied to both json_dynamic.js and project_dynamic.js.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 21:15:56 +01:00
parent c15bec98ce
commit 6b7e9ea682
3 changed files with 90 additions and 30 deletions

View File

@@ -75,6 +75,8 @@ if PromptServer is not None:
except (ValueError, TypeError):
seq = 1
data = read_json_data(json_path)
if not data:
return web.json_response({"keys": [], "types": [], "error": "file_not_found"})
target = get_batch_item(data, seq)
keys = []
types = []