mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 00:01:55 +00:00
118b0c4e90
The "Reset to deployed" toast action in resource/variable editors called UserDraft.save with the backend value to repaint the form. That left a duplicate-of-backend autosave in localStorage which would silently restore on every subsequent reload, defeating the reset. New UserDraft.discard(itemKind, path, fallback) clears LS AND resets any live handle's in-memory state to the fallback, skipping the next persist so the fallback doesn't round-trip back into storage. Backed by a new `skipNextWriteOnce()` method on useLocalStorageValue's return.