Merge PR #1988: #1507: web start-up treats only NotFoundError as a missing file

apps/lightcraft-web/src/files.rs: keeps #1987's and #1988's tests
docs/whats-new.md: keeps both 2026-10-15 entries
This commit is contained in:
aiongg
2026-10-21 14:56:12 +00:00
6 changed files with 139 additions and 28 deletions
+5
View File
@@ -123,6 +123,11 @@ are the same in every version, so serve them with `Cache-Control: no-cache` (not
writes, so commands report `saved in memory but not written`, the top bar shows the unsaved
warning (as on the desktop, see `docs/control-protocol.md`), and saving is retried every
2 s until it works (`web.stats` → `saveError`).
- A failed read at start-up is not taken for a missing file: only `NotFoundError` means absent.
When a stored library file (or the `active-library` pointer) exists but can't be read, the
library isn't opened and nothing is saved, so the stored copy stays as it was; the window says
which file failed (issue #1507). A thumbnail index that can't be read keeps the stored
thumbnails instead of deleting them as unindexed.
- A picked or dropped photo whose bytes can't be stored is not added (it would be gone after
a reload); a notice says why.
- One tab at a time: the page holds a Web Lock (`navigator.locks`, `lightcraft-library`); a