lightcraft/apps/lightcraft-web
radialmonster 4d5504cf16 Web: watch the thumbnail cache from worker start so an early clear invalidates
The main thread's Workers tracked no rendered-thumbnail cache until the
first render request carried one. If Clear Preview Cache ran before that
(e.g. starting on an empty filtered view), the per-frame observation in
finished() had nothing to compare with, and the first request only
recorded the already-cleared generation as its baseline. The persisted
ThumbIndex was never invalidated, so once the filter was removed the
request touched the old entry and the worker read the pre-clear JPEG
back from browser storage. Replacing the cache (another library) before
the first request had the same gap.

Workers::start now takes the session's cache and records it, with its
current generation, as the baseline the persisted index belongs to. A
normal start with no clear observes the same cache and generation and
keeps the index. The comparison moves into wire::CacheWatch so it is
tested natively (cargo test --workspace) next to ThumbIndex.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:23:17 -04:00
..
src Web: watch the thumbnail cache from worker start so an early clear invalidates 2026-10-07 20:23:17 -04:00
Cargo.toml Issue #107: Web build: data-safety fixes for libraries kept in the browser 2026-10-05 17:46:21 -04:00
index.html M0.12: web persistence — library, edits and imported originals survive a reload 2026-10-01 08:18:01 -04:00
worker.js M0.13: web render workers — pipeline renders off the main thread 2026-10-01 08:36:15 -04:00