From dc476392b229b637b759ccfc954e2c6cd5592b71 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 10 Jan 2026 21:37:43 +0000 Subject: [PATCH 1/2] Fix: Ensure UI refreshes upon trusted seed updates Subscribes `js/app.js` to `moderationService` events (`trusted-mutes`, `user-blocks`, `summary`). This ensures that asynchronous updates to trusted seed block lists (Kind 10000) trigger an immediate UI refresh, correctly applying moderation (blur/hide) even for anonymous session actors who rely on these seeds. Previously, the initial render would complete before the async lists arrived, leaving blocked content visible until a page reload. --- js/app.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/app.js b/js/app.js index 7686c6e1..f60d7d22 100644 --- a/js/app.js +++ b/js/app.js @@ -2651,6 +2651,18 @@ class Application { * Setup general event listeners for logout, modals, etc. */ setupEventListeners() { + if (moderationService && typeof moderationService.on === "function") { + moderationService.on("trusted-mutes", () => { + this.refreshVisibleModerationUi({ reason: "trusted-mutes" }); + }); + moderationService.on("user-blocks", () => { + this.refreshVisibleModerationUi({ reason: "user-blocks" }); + }); + moderationService.on("summary", () => { + this.refreshVisibleModerationUi({ reason: "moderation-summary" }); + }); + } + if (this.appChromeController) { this.appChromeController.initialize(); return; From d92cc58fc6cc04c8ad56fc568419968bb4ee4796 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 10 Jan 2026 21:54:51 +0000 Subject: [PATCH 2/2] Fix: Enforce trusted mutes as blocks for anonymous users Updates `js/app.js` to: 1. Treat Trusted Seed mutes as hard blocks (`isAuthorBlocked` returns `true`) for anonymous users ("session actors"), ensuring strict filtering. 2. Refresh the entire video grid (`refreshAllVideoGrids`) instead of just the UI (`refreshVisibleModerationUi`) when `trusted-mutes` events arrive for anonymous users, ensuring blocked content is removed dynamically once the lists load. This fixes a race condition where content might render before the block list is fully fetched. --- js/app.js | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index f60d7d22..6095e980 100644 --- a/js/app.js +++ b/js/app.js @@ -328,7 +328,22 @@ class Application { isAuthorBlocked(pubkey) { try { if (userBlocks && typeof userBlocks.isBlocked === "function") { - return userBlocks.isBlocked(pubkey); + if (userBlocks.isBlocked(pubkey)) { + return true; + } + } + + if (!this.isUserLoggedIn()) { + const normalized = this.normalizeHexPubkey(pubkey); + if ( + normalized && + moderationService && + typeof moderationService.isAuthorMutedByTrusted === "function" + ) { + if (moderationService.isAuthorMutedByTrusted(normalized)) { + return true; + } + } } } catch (error) { devLogger.warn("[Application] Failed to evaluate block status:", error); @@ -2653,7 +2668,11 @@ class Application { setupEventListeners() { if (moderationService && typeof moderationService.on === "function") { moderationService.on("trusted-mutes", () => { - this.refreshVisibleModerationUi({ reason: "trusted-mutes" }); + if (!this.isUserLoggedIn()) { + this.refreshAllVideoGrids({ reason: "trusted-mutes" }); + } else { + this.refreshVisibleModerationUi({ reason: "trusted-mutes" }); + } }); moderationService.on("user-blocks", () => { this.refreshVisibleModerationUi({ reason: "user-blocks" });