#2266: a presets.json that can't be written counts as unsaved

Preset commands change the preset list outside pending_log, and a failed
presets.json write was only logged: unsaved() stayed None, so nothing
warned and the web backup (#1987) would zip a stale presets.json; on
desktop a full disk lost the preset silently. The failure is now kept
(presets_error), counted by unsaved() (plus one change), retried by
persist_if_dirty with the same back-off as failed appends, and cleared
once the write succeeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AbegtYaPuwqZ81pGfELsFK
This commit is contained in:
Claude
2026-10-18 19:28:49 +00:00
parent fb7ac08b9a
commit 00f55ef352
3 changed files with 52 additions and 5 deletions
+7
View File
@@ -1,5 +1,12 @@
# What's new in LightCraft
## 2026-10-18
### A preset that couldn't be saved is no longer lost silently
- When presets.json can't be written (a full disk, or the browser's storage quota), the new or changed preset now
counts as unsaved, like other changes: the top bar warns, saving is retried, and quitting asks first (issue #2266).
Before, the failure was only logged, and the preset could be lost without any warning.
## 2026-10-14
### Model downloads time out on a name that doesn't resolve