mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-30 17:32:26 +00:00
A cold hard-refresh on a profile previously sat on "Loading videos…" for ~5s — the optimistic in-memory cache is empty on cold start (ingest hasn't injected yet) and the grid waited on relay connection. Now channelProfileVideos.js persists the last-rendered wall per author (localStorage bitvid:channel-videos:v1) and loadUserVideos paints it immediately on cold load, before relays connect; the live fetch then replaces it. Bounded (60 videos/channel, 20 channels LRU-evicted) and strips the heavy raw `tags` array. Same proven pattern as the main feed's optimistic cache. Closes TODO 17d per-channel cache. Tests + mutation-verified (round-trip, tag-strip, per-channel + channel-count caps). 1267/1268 unit (known flake). Co-Authored-By: Claude Opus 4.8 <[email protected]>