mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-01 02:12:26 +00:00
channel: optimistic render includes ingested NIP-71 videos
getCachedChannelVideoEvents early-returned kind-30078-only rawEvents and skipped allEvents, so a creator's ingested NIP-71 videos didn't show in the optimistic (pre-fetch) render. Now it merges raw 30078 (first, so they win the downstream id-dedupe) with processed allEvents (which holds ingested foreign videos) → the wall paints instantly on revisit / when the feed already loaded that author. Cross-ecosystem dedupe collapses any overlap. Also records TODO 17d (unified grid loading follow-ups): streaming channel/search fetch, per-channel persisted cache, My Videos NIP-71 inclusion, and consolidating bespoke loaders behind one shared streaming grid source. 1262/1263 unit (known UploadModal flake). Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
065706a3cf
commit
1075d3f822
2 files changed
+25
-5
No files matched your search
@@ -4428,10 +4428,10 @@ function getCachedChannelVideoEvents(pubkey) {
|
||||
}
|
||||
});
|
||||
|
||||
if (rawMatches.length) {
|
||||
return rawMatches;
|
||||
}
|
||||
|
||||
// Include processed videos from allEvents too (raw 30078 first so they win the
|
||||
// id-dedupe downstream): this surfaces ingested NIP-71 videos for the author so
|
||||
// their wall renders optimistically on revisit / when the feed already loaded
|
||||
// them. Cross-ecosystem dedupe collapses any overlap.
|
||||
const processedMatches = collectMatches(
|
||||
nostrClient?.allEvents,
|
||||
(callback) => {
|
||||
@@ -4448,7 +4448,7 @@ function getCachedChannelVideoEvents(pubkey) {
|
||||
}
|
||||
);
|
||||
|
||||
return processedMatches;
|
||||
return [...rawMatches, ...processedMatches];
|
||||
}
|
||||
|
||||
function normalizeRenderableChannelVideo(entry) {
|
||||
|
||||
@@ -344,6 +344,26 @@ CDN url + WebTorrent (bitvid extras come free), one-shot import + re-run button.
|
||||
delete "hosted file left behind" warning is suppressed, liveness stays
|
||||
unverifiable. Full (re-hosted) imports set the flag false.
|
||||
|
||||
### 17d. Unified video-grid loading (streaming + optimistic) — follow-ups
|
||||
Goal: every grid loads with the same fast UX. Status: cross-ecosystem dedup
|
||||
(17c Phase 1) is live at the shared chokepoint; main feed already streams +
|
||||
has a persisted cache; channel/search now render optimistically from
|
||||
`allEvents` (incl. ingested NIP-71). Remaining:
|
||||
- [ ] **Streaming channel/search fetch.** `loadUserVideos` does a one-shot
|
||||
`pMapSettled(relays, pool.list)` and renders only after ALL relays settle,
|
||||
so a slow relay holds up the grid (~2-3s). Switch to the subscription
|
||||
manager's streaming + render incrementally (first-relay-wins), like the main
|
||||
feed's buffered subscription. Extract the fetch into `channelProfileVideos.js`
|
||||
(channelProfile.js is at its size cap).
|
||||
- [ ] **Per-channel persisted cache** for instant revisits (mirror the main feed's
|
||||
`bitvid:filtered-videos` optimistic cache, keyed per author).
|
||||
- [ ] **My Videos: include NIP-71** in its `allEvents` read so a creator's own
|
||||
cross-posted videos appear in management too (reuse the cross-ecosystem
|
||||
dedupe so the bitvid version wins).
|
||||
- [ ] **Consolidate** the bespoke loaders (channel/search/My Videos) behind one
|
||||
shared streaming grid source so future grids inherit streaming + optimistic +
|
||||
dedupe for free.
|
||||
|
||||
### 17b. Channel Profile wall shows only bitvid videos, not NIP-71 (LAUNCH-BLOCKER)
|
||||
- [x] **Fixed** (`js/channelProfileVideos.js`): the channel grid now fetches the
|
||||
author's NIP-71 videos (kinds 21/22/34235/34236) alongside kind-30078 via
|
||||
|
||||
Reference in new issue
Block a user