feeds: fix Most Zapped eternal spinner — missing app-level delegates

app.js delegates each feedCoordinator method explicitly (the coordinator is
lazy), and registerMostZappedFeed / loadMostZappedVideos were never added.
Bootstrap's `typeof app.registerMostZappedFeed === "function"` guard was
silently false (feed never registered) and the view registry's
loadMostZappedVideos call no-oped, so the view's spinner was never replaced.
Reproduced in a Playwright harness (spinner before, 158 videos rendered
after adding the delegates).

Also exposes window.__bitvidZapTotals (snapshot/request/flush) for
diagnosing zap-badge visibility in live sessions.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Fable 5 committed 2026-07-04 09:34:44 -04:00
1 parent cbe894969d
commit 941580f227
2 files changed
+16

No files matched your search

+10
View File
@@ -4373,6 +4373,11 @@ class Application {
return this._feed.registerTrendingFeed(...args);
}
registerMostZappedFeed(...args) {
this._initCoordinators();
return this._feed.registerMostZappedFeed(...args);
}
registerSubscriptionsFeed(...args) {
this._initCoordinators();
return this._feed.registerSubscriptionsFeed(...args);
@@ -4476,6 +4481,11 @@ class Application {
return this._feed.loadTrendingVideos(...args);
}
async loadMostZappedVideos(...args) {
this._initCoordinators();
return this._feed.loadMostZappedVideos(...args);
}
async loadOlderVideos(...args) {
this._initCoordinators();
return this._feed.loadOlderVideos(...args);
+6
View File
@@ -279,3 +279,9 @@ export function onZapTotalsChanged(listener) {
// The singleton store itself — exposes flush() for tests.
export default store;
// Console debug handle: window.__bitvidZapTotals.getSnapshot(["a","30078:…"]),
// .request(pointer), .flush() — for diagnosing why a badge is (not) showing.
if (typeof window !== "undefined") {
window.__bitvidZapTotals = store;
}