From e1d43708c512a33d914cda7b4e5c5d7ccf8b1fde Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 03:59:54 +0000 Subject: [PATCH] feat: implement stale-while-revalidate for moderation lists to speed up initial load MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change optimizes the application startup by allowing the moderation system (AccessControl) to initialize immediately using cached data from localStorage if available. It triggers a background network refresh to update the lists asynchronously, preventing the UI from blocking on slow relay responses. Key changes: - Modified `js/accessControl.js` to make `ensureReady()` return immediately if hydrated from cache. - Updated `js/app.js` to use `ensureReady()` instead of the blocking `refresh()` during init. - Updated `js/ui/profileModalController.js` to conditionally show the "Fetching moderation filters…" status message only when waiting for network data.