From 941580f2279ce7e127411c3ad4a792fa96467b9f Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sat, 4 Jul 2026 09:34:44 -0400 Subject: [PATCH] =?UTF-8?q?feeds:=20fix=20Most=20Zapped=20eternal=20spinne?= =?UTF-8?q?r=20=E2=80=94=20missing=20app-level=20delegates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- js/app.js | 10 ++++++++++ js/zapTotals.js | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/js/app.js b/js/app.js index 2c6d2b16..7a05fc74 100644 --- a/js/app.js +++ b/js/app.js @@ -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); diff --git a/js/zapTotals.js b/js/zapTotals.js index b7b1f4fd..910b4697 100644 --- a/js/zapTotals.js +++ b/js/zapTotals.js @@ -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; +}