Commit Graph
2839 Commits
Author SHA1 Message Date
google-labs-jules[bot] 7dc2977cf2 Update Cloudflare R2 upload to use minimal permissions and add progress bar
- Removed requirement for Cloudflare API Token, Zone ID, and Worker Token from Upload Modal and R2Service.
- Simplified R2 configuration to require only Account ID, S3 Access Keys, and a user-provided Public Bucket URL.
- Added a read-only field in Upload Modal displaying the derived target bucket name (npub-based) for user reference.
- Implemented client-side torrent info hash calculation using `WebTorrent` (via `js/utils/torrentHash.js`) to generate magnet links before upload.
- Added a visual upload progress bar to the Upload Modal.
- Updated `js/r2.js` to ensure the Public Bucket URL always includes the `https://` protocol.
2026-01-12 18:53:22 +00:00
thePR0M3TH3AN 01d4335fda Merge pull request #1191 from PR0M3TH3AN/fix-edited-video-date-reset-3684025320852324602
Fix published date reset on video edit and add edited indicators
2026-01-12 13:32:25 -05:00
google-labs-jules[bot] ad0a9113f6 Improve edited video indicators and preserve publish date
- Update `VideoCard.js` to display "• Edited" instead of "(edited)" for better visual consistency.
- Update `app.js` to format the modal's "Last Edited" timestamp as "Last edited: [Absolute] ([Relative])".
- Ensure `EditModal.js` correctly backfills and preserves `published_at` to prevent date resets.
- Verify edit logic with existing tests.
2026-01-12 18:13:57 +00:00
google-labs-jules[bot] 782b5fe0b7 Fix: prevent published date reset when editing videos and show edited status
Prioritize `published_at` metadata over event `created_at` timestamp.
Backfill `published_at` during edit if missing to preserve original date.
Add "(edited)" label to video cards for modified content.
Display "Last Edited: [Date]" on video player modal.
2026-01-12 15:52:24 +00:00
google-labs-jules[bot] 1d3c827f62 Fix: prevent published date reset when editing videos and show edited status
Prioritize `published_at` metadata over event `created_at` timestamp.
Backfill `published_at` during edit if missing to preserve original date.
Add "(edited)" label to video cards for modified content.
Display "Last Edited: [Date]" on video player modal.
2026-01-12 15:35:23 +00:00
thePR0M3TH3AN 1ef8459fd6 Merge pull request #1190 from PR0M3TH3AN/fix/subscriptions-spinner-loop-7605323922858832929
Fix infinite spinner loop on Subscriptions tab updates
2026-01-12 09:00:15 -05:00
google-labs-jules[bot] fa23ffb53c fix(subscriptions): prevent spinner loop on background refresh 2026-01-12 13:52:14 +00:00
thePR0M3TH3AN 0bcee151cb Merge pull request #1189 from PR0M3TH3AN/fix-subscription-spinner-hang-134888602482071504
Fix infinite subscription loading spinner
2026-01-11 19:11:39 -05:00
google-labs-jules[bot] 8a61acb09c Add debug logging to trace subscription loading hang 2026-01-12 00:10:04 +00:00
google-labs-jules[bot] fdf8815792 Fix subscriptions loading hang by removing undefined constant and cleaning up debug logs 2026-01-11 23:42:16 +00:00
google-labs-jules[bot] e63ca6eee3 Fix infinite spinner in Subscriptions tab by correcting method context in NostrService and improving error resilience. 2026-01-11 22:13:36 +00:00
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