Commit Graph
2828 Commits
Author SHA1 Message Date
thePR0M3TH3AN 0fc78fefb8 Merge pull request #1187 from PR0M3TH3AN/fix-anon-moderation-threshold-5216028150136921299
Fix anonymous users being blocked by a single trusted mute
2026-01-11 16:44:28 -05:00
google-labs-jules[bot] c1779fba78 fix(moderation): enforce mute threshold for anonymous users 2026-01-11 21:43:02 +00:00
thePR0M3TH3AN c4618c307b Merge pull request #1186 from PR0M3TH3AN/update-trusted-mute-hide-threshold-default-3010307860608800344
Increase default trusted mute hide threshold to 20
2026-01-11 16:31:27 -05:00
google-labs-jules[bot] 85883aa5c6 feat: increase default trusted mute hide threshold to 20
- Updated `DEFAULT_TRUSTED_MUTE_HIDE_THRESHOLD` in `config/instance-config.js` from 1 to 20.
- Updated `tests/moderation/trusted-mute-lists.test.mjs` to explicitly override the threshold to 1 for tests verifying the hide mechanism.
- Updated documentation (`docs/moderation/*.md`, `docs/instance-config.md`, `content/community-guidelines.md`) to reflect the new default and upstream examples.
- Verified that existing blurring logic in `js/feedEngine/stages.js` and `js/ui/components/VideoCard.js` handles the intermediate state (1-19 mutes) correctly.
2026-01-11 21:30:23 +00:00
thePR0M3TH3AN 2a9bf7f85b Merge pull request #1185 from PR0M3TH3AN/user-blocks-priority-1385686224757387826
Prioritize tagged user block lists over generic mute lists
2026-01-11 16:09:26 -05:00
google-labs-jules[bot] 124a2330ad Update block list selection to prioritize tagged events
- Prioritize Kind 10000 events with `d=user-blocks` over plain mute lists in `loadBlocks`.
- Add `isTaggedBlockListEvent` helper for differentiation.
- Add regression test case to `tests/user-blocks.test.mjs` verifying that tagged lists override newer plain lists.
2026-01-11 21:08:01 +00:00
thePR0M3TH3AN 5341c792e0 Merge pull request #1184 from PR0M3TH3AN/fix-tag-only-blocklists-8619418630809863442
Fix: Handle tag-only Kind 10000 mute lists in UserBlockListManager
2026-01-11 15:08:07 -05:00
google-labs-jules[bot] 009eb4c6e2 Fix: Handle tag-only Kind 10000 mute lists in UserBlockListManager
This commit modifies `js/userBlocks.js` to correctly parse Kind 10000 events that have empty content but populated `p` tags (used by clients like Primal). Previously, these events were treated as empty block lists, causing the user's block list to be cleared.

Changes:
- Refactored `loadBlocks` to check for empty content and fallback to extracting pubkeys from tags using `extractPubkeysFromTags`.
- Updated `loadBlocks` to use a sequential promise strategy (`Promise.any` then `Promise.allSettled`) to ensure eventual consistency without race conditions or double-processing.
- Added extensive tests in `tests/user-blocks.test.mjs` covering tag-only lists, whitespace content, and concurrency scenarios.
2026-01-11 20:01:39 +00:00
thePR0M3TH3AN 09775da7e9 Merge pull request #1183 from PR0M3TH3AN/fix-block-list-merge-16425322602247951932
Fix block list merging and update trust thresholds
2026-01-11 14:04:24 -05:00
google-labs-jules[bot] 146719a32b Fix block/mute list conflict and update trust thresholds
- Refactored `js/userBlocks.js` to merge Kind 10000 and Kind 30002 events on load, preventing overwritten mutes.
- Updated `js/constants.js` to set `DEFAULT_TRUSTED_MUTE_HIDE_THRESHOLD` to 4, enabling soft-hide (blur) behavior for lower mute counts.
2026-01-11 18:58:55 +00:00
thePR0M3TH3AN f965090bc2 Merge pull request #1182 from PR0M3TH3AN/codex/update-userblocks.js-decoding-and-logging
Improve npub decoding fallback and seed logging
2026-01-11 13:09:10 -05:00
thePR0M3TH3AN 48b481f284 Improve npub decoding and seed logging 2026-01-11 13:06:15 -05:00
thePR0M3TH3AN eca42bfcde Merge pull request #1181 from PR0M3TH3AN/codex/update-userblocks.js-decode-methods
Improve npub decoding for user block seeding
2026-01-11 09:42:36 -05:00
thePR0M3TH3AN c2eb2cdc19 Improve npub decoding in user blocks 2026-01-11 09:40:41 -05:00
thePR0M3TH3AN b5fcdd9d95 Merge pull request #1180 from PR0M3TH3AN/codex/update-access-control-logic-and-ui
Allow overlapping whitelist and blacklist entries; surface overlaps in admin UI
2026-01-11 09:36:02 -05:00
thePR0M3TH3AN 40490afac2 Allow overlapping admin lists 2026-01-11 09:33:06 -05:00
thePR0M3TH3AN d1fdb5388c Merge pull request #1179 from PR0M3TH3AN/codex/update-access-control-logic-and-documentation
Enforce blacklist precedence over whitelist in access control
2026-01-11 09:19:09 -05:00
thePR0M3TH3AN 1211f1a25d Adjust blacklist precedence for access control 2026-01-11 09:14:35 -05:00
thePR0M3TH3AN be3a42ef45 Merge pull request #1178 from PR0M3TH3AN/codex/add-session-actor-lifecycle-hook-and-update-ui
Sync session actor blacklist on lifecycle events
2026-01-11 09:11:48 -05:00
thePR0M3TH3AN 83a9fdb097 Track regenerated Tailwind CSS 2026-01-11 09:10:50 -05:00
thePR0M3TH3AN db2b08378d Add session actor hook for moderation sync 2026-01-11 08:50:22 -05:00
thePR0M3TH3AN eb4cb84909 Merge pull request #1176 from PR0M3TH3AN/codex/add-access-control-blacklist-change-handler
Refresh guest feeds on admin blacklist changes
2026-01-10 20:38:10 -05:00
thePR0M3TH3AN 4a4ffa45b4 Refresh feeds on admin blacklist changes for guests 2026-01-10 20:37:11 -05:00
thePR0M3TH3AN e5d2d923de Merge pull request #1175 from PR0M3TH3AN/codex/add-reconciliation-path-for-admin-blacklist
Add session actor blacklist reconciliation
2026-01-10 20:34:16 -05:00
thePR0M3TH3AN faaad9c724 Add session actor blacklist reconciliation 2026-01-10 20:33:15 -05:00
thePR0M3TH3AN 0b8d45ed76 Merge pull request #1174 from PR0M3TH3AN/codex/session-actor-moderation-13643754943913031156
Enable session-local moderation for anonymous users
2026-01-10 17:43:11 -05:00
google-labs-jules[bot] 7c7ac3e9f2 Enable session-local moderation for anonymous users
- Update `ModerationService` to recognize session actors and load mutes from local storage.
- Update `UserBlockListManager` to persist blocks locally for session actors without relay publication.
- Ensure `submitReport` falls back to the session actor's signer.
- Add `resolveStorage` helper to safely access localStorage.
2026-01-10 22:41:18 +00:00
thePR0M3TH3AN 2c91e6359c Merge pull request #1173 from PR0M3TH3AN/local-baseline-blocks-16128041238995409855
Seed baseline block list for anonymous session actors
2026-01-10 17:21:18 -05:00
google-labs-jules[bot] c080b83108 feat: seed anonymous session actors with baseline block list
- Added `seedLocalBaseline` to `js/userBlocks.js` to merge admin blacklist into local block list for session actors.
- Implemented `_saveLocal` and `_loadLocal` in `js/userBlocks.js` to persist local-only block lists to `localStorage`.
- Updated `loadBlocks` to prioritize local storage for session actors, bypassing relay fetching when local data exists.
- Modified `js/app.js` to call `seedLocalBaseline` with the admin blacklist during initialization if the user is anonymous.
- Ensured `UserBlockListManager` correctly resolves `localStorage` in various environments (browser/test).
- Verified changes with `tests/user-blocks-local-seed.test.mjs`.
2026-01-10 22:19:54 +00:00
thePR0M3TH3AN 760eeb906e Merge pull request #1171 from PR0M3TH3AN/fix-trusted-seed-reactivity-3260312645150646565
Fix: React to trusted seed block list updates for session actors
2026-01-10 17:03:09 -05:00
google-labs-jules[bot] d92cc58fc6 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.
2026-01-10 21:54:51 +00:00
google-labs-jules[bot] dc476392b2 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.
2026-01-10 21:37:43 +00:00
thePR0M3TH3AN 966a7810cb Merge pull request #1170 from PR0M3TH3AN/fix-trusted-seed-fail-open-bug-10900462745100729991
fix(moderation): prevent clearing trusted mute lists on network failure and ensure UI updates
2026-01-10 16:27:02 -05:00
google-labs-jules[bot] 1b092c09d6 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.
2026-01-10 21:25:52 +00:00
google-labs-jules[bot] c777f0f068 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.
2026-01-10 04:32:13 +00:00
thePR0M3TH3AN fcccce68e2 Merge pull request #1168 from PR0M3TH3AN/codex/exclude-blacklisted-seeds-from-trusted-seeds
Filter trusted seeds against access control blacklist
2026-01-09 22:48:36 -05:00
thePR0M3TH3AN 4809b8dac6 Filter trusted seeds against access control blacklist 2026-01-09 22:47:06 -05:00
thePR0M3TH3AN 24ce44833b Merge pull request #1167 from PR0M3TH3AN/codex/update-cleartrustedmutetracking-logic
Force rebuild of trusted contacts to trigger re-subscribe after clear
2026-01-09 22:44:10 -05:00
thePR0M3TH3AN 8bc39fa556 Reset trusted mute subscriptions on clear 2026-01-09 22:42:33 -05:00
thePR0M3TH3AN f8af3c27c1 Merge pull request #1166 from PR0M3TH3AN/bugfix/trust-seed-initialization-12779455138942724140
Fix Trusted Seed initialization and add blacklist enforcement
2026-01-09 22:39:22 -05:00
google-labs-jules[bot] 8aaa2f69ee Fix: Ensure trust seed mutes are loaded for session actors
- Fixed `ModerationService.reconcileTrustedMuteSubscriptions` to always force re-subscription to trusted seeds, bypassing previous state comparisons.
- Enhanced `ModerationService` to filter trusted seeds against the global admin blacklist.
- Added blacklist change event support to `AccessControl` and `TrustBootstrap` to dynamically update seeds when the blacklist changes.
- Added detailed logging to `ModerationService`, `TrustBootstrap`, and `AccessControl` to trace trust seed initialization and application.
2026-01-10 03:36:19 +00:00
google-labs-jules[bot] cda0671699 Fix: Ensure trust seed mutes are loaded for session actors
- Fixed `ModerationService.reconcileTrustedMuteSubscriptions` to always force re-subscription to trusted seeds, bypassing previous state comparisons.
- Enhanced `ModerationService` to filter trusted seeds against the global admin blacklist.
- Added blacklist change event support to `AccessControl` and `TrustBootstrap` to dynamically update seeds when the blacklist changes.
- Added detailed logging to `ModerationService` for tracking subscription lifecycle.
2026-01-10 01:40:46 +00:00
google-labs-jules[bot] 1c366a4a78 Fix: Ensure trust seed mutes are loaded for session actors
- Fixed `ModerationService.clearTrustedMuteTracking` to properly force re-subscription to trusted seeds by passing an empty previous state.
- Enhanced `ModerationService` to filter trusted seeds against the global admin blacklist.
- Added blacklist change event support to `AccessControl` and `TrustBootstrap` to dynamically update seeds when the blacklist changes.
2026-01-10 01:29:04 +00:00
thePR0M3TH3AN baf9793e3e Merge pull request #1165 from PR0M3TH3AN/codex/avoid-mutating-total-on-null-count
Preserve view totals when hydration yields no data
2026-01-09 20:06:35 -05:00
thePR0M3TH3AN 6e2db7a57f Preserve cached view totals when hydration fails 2026-01-09 19:34:39 -05:00
thePR0M3TH3AN 9d0aea45e7 Merge pull request #1164 from PR0M3TH3AN/codex/merge-collectqueueitems-into-fetchhistory
Merge queued watch history items during sync
2026-01-09 16:05:44 -05:00
thePR0M3TH3AN 3a95e5ea87 Merge queued watch history items during sync 2026-01-09 16:00:48 -05:00
thePR0M3TH3AN cc345afbcd Merge pull request #1162 from PR0M3TH3AN/codex/add-fallback-path-for-empty-actorkey
watchHistoryService: session actor fallback for publishView and local queue resilience
2026-01-09 15:55:13 -05:00
thePR0M3TH3AN 922951d74c Add session actor fallback for watch history 2026-01-09 15:53:26 -05:00
thePR0M3TH3AN adc0147825 Merge pull request #1161 from PR0M3TH3AN/fix-watch-history-sync-15826995413005562790
Fix watch history sync delay and timeouts
2026-01-09 15:41:10 -05:00