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:
thePR0M3TH3ANandClaude Opus 4.8 committed 2026-07-08 08:23:49 -04:00
1 parent 27808533d2
commit 013b0344b9
2 files changed
+108 -30

No files matched your search

+1 -1
View File
@@ -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,