mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Channel grid: remove the temporary [channel-load] diagnostics
The relay-union fix is confirmed working; drop the dev-only tracing added to hunt it down. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
8d331be1d5
commit
18e7197bdc
1 file changed
-24
@@ -4610,34 +4610,22 @@ function buildRenderableChannelVideos({ events = [], app } = {}) {
|
||||
dedupeVideos(uniqueVideos);
|
||||
|
||||
let videos = newestByRoot.filter((video) => !video.deleted);
|
||||
const afterDeleted = videos.length;
|
||||
let dropBlacklist = 0;
|
||||
let dropAccess = 0;
|
||||
videos = videos.filter((video) => {
|
||||
if (!video || !video.id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (app?.blacklistedEventIds?.has?.(video.id)) {
|
||||
dropBlacklist += 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!accessControl.canAccess(video)) {
|
||||
dropAccess += 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
// [channel-load] diagnostics: where do a channel's videos get dropped?
|
||||
devLogger.info(
|
||||
`[channel-load] build: input=${events.length} converted=${convertedVideos.length} ` +
|
||||
`uniqueById=${uniqueVideos.length} byRoot=${newestByRoot.length} afterDeleted=${afterDeleted} ` +
|
||||
`dropBlacklist=${dropBlacklist} dropAccess=${dropAccess} final=${videos.length}`,
|
||||
);
|
||||
|
||||
videos.sort((a, b) => b.created_at - a.created_at);
|
||||
return videos;
|
||||
}
|
||||
@@ -5671,18 +5659,6 @@ async function loadUserVideos(pubkey) {
|
||||
await renderInFlight;
|
||||
await ensureAccessPromise;
|
||||
|
||||
// [channel-load] diagnostics: what did the relays + cache actually return?
|
||||
const kindCounts = events.reduce((acc, evt) => {
|
||||
const k = evt?.kind;
|
||||
acc[k] = (acc[k] || 0) + 1;
|
||||
return acc;
|
||||
}, {});
|
||||
devLogger.info(
|
||||
`[channel-load] pubkey=${(pubkey || "").slice(0, 8)} relays=${relayList.length} ` +
|
||||
`relayEvents=${events.length} kinds=${JSON.stringify(kindCounts)} ` +
|
||||
`cacheEvents=${getCachedChannelVideoEvents(pubkey).length}`,
|
||||
);
|
||||
|
||||
if (loadToken !== currentVideoLoadToken) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user