From c777f0f06893e22b5499025bac21a8c70fcfcd4b 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 04:32:13 +0000 Subject: [PATCH 1/2] fix(moderation): prevent clearing trusted mute lists on network failure and ensure UI updates This commit fixes a critical security/UX regression where Trusted Seed mute lists (Kind 10000) were being cleared ("fail-open") if the initial network fetch failed or timed out. This left anonymous users exposed to blocked content until a subsequent update or refresh. Changes: - **`js/services/moderationService.js`**: - Refactored `subscribeToTrustedMuteList` to use a retry mechanism (3 attempts with backoff) for fetching mute lists. - Modified error handling to distinguish between "successful empty fetch" and "network failure". - Prevented `replaceTrustedMuteList` (which clears the local state) from being called if the fetch fails, preserving any existing protection. - **`js/app.js`**: - Added a listener for the `trusted-mutes` event in `setupEventListeners`. - This triggers `refreshVisibleModerationUi({ reason: "trusted-mutes" })`, ensuring that the UI (blurred thumbnails, hidden content) updates immediately when trusted mute lists are hydrated, without requiring a manual page refresh. This ensures robust moderation for session actors (unauthenticated users) even under flaky network conditions. From 1b092c09d696e40c73874d3a94bdb3c919b2085b 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:25:52 +0000 Subject: [PATCH 2/2] fix(moderation): harden trusted mute fetch against network failures - Implemented retry logic (3 attempts) for fetching trusted mute lists. - Prevented clearing of existing mute lists if the fetch fails (fail-safe). - Added `trusted-mutes` event listener to trigger immediate UI updates.