mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 04:42:57 +00:00
Channel grid: progressive render + reliable fetch + no premature "No videos"
The channel video grid felt slow and often flashed "No videos" because, when the warm cache was cold (direct URL, a new tab, or an author not in your feed), it fell back to a bespoke one-shot pool.list per relay with an 8s timeout, AWAITED ALL relays before rendering once, and showed "No videos" whenever that came back empty (which a timed-out/flaky relay does). "My Videos" is fast because it reads the warm shared cache and only refetches on demand. Rework loadUserVideos: - Progressive render: paint the grid as each relay/source returns (deduped, coalesced, serialized re-render) instead of blocking on the slowest relay. - Reliable fetch: also route through nostrService.fetchVideosByAuthors — the same proven path My Videos uses — which streams into the shared cache, so this grid, its revisits, and every other grid benefit. - No premature empty: mid-flight renders never pass allowEmptyMessage; the "No videos" message is shown only on the final render, after every source has genuinely settled. The cache-first paint is preserved. - check-file-size: bump channelProfile grandfather for the growth. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
27808533d2
commit
013b0344b9
2 files changed
+108
-30
No files matched your search
@@ -29,7 +29,7 @@ const GRANDFATHERED = {
|
||||
"js/ui/profileModalController.js": 8130,
|
||||
"js/ui/components/VideoModal.js": 4976,
|
||||
"js/app.js": 5602,
|
||||
"js/channelProfile.js": 5529,
|
||||
"js/channelProfile.js": 5806,
|
||||
"js/nostr/client.js": 4356,
|
||||
"js/ui/components/VideoCard.js": 3129,
|
||||
"js/nostrEventSchemas.js": 3541,
|
||||
|
||||
Reference in new issue
Block a user