Files
bitvid/tests
thePR0M3TH3ANandClaude Opus 4.8 2f95d4486e fix(watch-history): logged-out (local) delete now rewrites the local queue
The other half of the synced-vs-local design: for logged-out / session
(local-only) actors, watch history lives in a localStorage queue (loadLatest ->
collectQueueItems), but snapshot no-op'd for local-only actors — so a removal
never touched the queue and the item reappeared on reload (same symptom as the
logged-in bug, different layer).

Now a REPLACE snapshot for a local-only actor rewrites the local queue to exactly
the provided items (new replaceLocalQueue helper): removals prune it, an empty
replace clears it. Normal watch-tracking adds still flow through the queue via
recordVideoView, unchanged.

Tests + mutation-verified: local replace seeds then prunes the queue; empty
replace clears it. Reverting to the no-op fails both.

Build + full lint green (watchHistoryService under file-size budget).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-20 18:45:42 -04:00
..
2026-02-21 16:08:33 -05:00
2026-02-21 15:53:09 -05:00