* fix(web): generation-agnostic Comfy draft-quota guard
"Failed to save workflow draft" toasts returned on ComfyUI frontend
1.44+ because draft storage moved to new localStorage key names
(per-workspace V1 keys, then a V2 index+payload scheme) that the old
exact-name guard embedded in ltx_director.js never matched - and the
1.44 V2 layer latches a session-wide storage-unavailable flag after one
failed save+evict cycle, re-toasting on every edit until reload.
Move the guard to its own global extension, web/koolook_draft_guard.js:
- match draft keys by prefix (Comfy.Workflow.Draft) across all known
generations, with unknown future keys as last-resort evictions
- rescue quota failures inside localStorage.setItem (evict the oldest
draft across generations, retry) before Comfy's own catch sees the
error, so the save succeeds and the latch never trips
- boot prune: drop the suffixed-V1 dead weight the frontend's V1->V2
migration never deletes, scope corrupt-key cleanup to the offending
key, drop oversized entries, enforce a total draft budget
- ship the guard with dev-sync-audio so a scoped sync cannot strand a
dev install guard-less
Behavior is covered by tests/js/test_draft_guard.mjs (12 scenarios,
wired into CI next to the existing node smoke test); static integration
contracts live in tests/sidebar/test_draft_guard.py.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(web): address deep-review findings on the draft guard
- latch the "still full" hint toast once per session so a genuinely
full origin cannot re-toast on repeated failing autosave attempts;
regression assertion added to the exhaustion scenario
- document the bounded-eviction termination contract and the
post-rethrow storage-unavailable latch at the wrapper, plus the
budget's V1-blob-only (1.5M) -> all-generations (2M) scope widening
(also now stated in the CHANGELOG entry)
- version-robust wording for the suffixed-V1 cleanup rationale: the
shipped 1.44 migration leaves the keys behind (verified against the
installed 1.44.19 dist - no removeItem exists there), later
frontends clean up on successful migration, and an interrupted
migration can leak the keys on any version
- comment the intentional best-effort swallow in the toast helper
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>