mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-30 01:12:39 +00:00
- Adds `STORAGE_KEY_FILTERED_VIDEOS` and `MAX_PERSISTED_VIDEOS` constants. - Implements `loadPersistedFilteredVideos` and `persistFilteredVideos` helper methods. - Updates `loadVideos` to load persistent videos optimistically and emit "persistent-cache" updates. - Ensures all persistent data is strictly re-filtered (blocked authors, NSFW, access control) before use. - Skips emitting empty in-memory cache updates if optimistic data is available to prevent UI flashing. - Persists fresh filtered results in `applyAndNotify` to keep cache up-to-date. - Adds comprehensive verification script logic (tested via `scripts/verify-optimistic-cache.mjs` before cleanup).