Commit Graph
38 Commits
Author SHA1 Message Date
google-labs-jules[bot] 4d2bb8bf3d chore(ai): event schema validation tool + fixes
- Added `scripts/agent/validate-events.mjs` to validate event builders against schemas.
- Fixed `NOTE_TYPES.REPOST` schema content format (json instead of empty).
- Added `NOTE_TYPES.MUTE_LIST` and `buildMuteListEvent`.
- Added `buildProfileMetadataEvent` to standardise Kind 0 creation.
- Updated `js/ui/profileModalController.js` to use `buildProfileMetadataEvent`.
- Updated `js/userBlocks.js` to use `buildMuteListEvent` for publishing mute list snapshots.
- Updated `docs/nostr-event-schemas.md` with new schemas and builders.
2026-01-19 05:47:37 +00:00
google-labs-jules[bot] b49a294dc0 feat: isolate view telemetry and restrict session actor publishing
- Add `isSessionActor` helper to `js/nostr/sessionActor.js` to identify ephemeral keys.
- Update `js/nostr/viewEvents.js` to namespace view deduplication caches by `actorPubkey` to prevent data leakage between sessions.
- Block comment publishing for session actors in `js/nostr/commentEvents.js`.
- Block watch history list publishing for session actors in `js/nostr/client.js`.
- Block user block list publishing for session actors in `js/userBlocks.js`.
- Block hashtag preference publishing for session actors in `js/services/hashtagPreferencesService.js`.
- Add inline documentation clarifying variable sources.
2026-01-17 22:48:31 +00:00
google-labs-jules[bot] 3deb8d08f0 Implement profile-scoped caching and signer invalidation logic
- Updated `profileCache.js` to support clearing runtime memory on signer change.
- Updated `NostrClient` to trigger `clearSignerRuntime` on `setActiveSigner`.
- Updated list services (`subscriptions`, `userBlocks`, `hashtagPreferences`, `watchHistory`) to listen for `runtimeCleared` and reload data.
- Updated `NostrClient` sync metadata methods to default to the active profile pubkey.
- Added `partition-updated` event emission to `profileCache`.
2026-01-17 21:43:35 +00:00
google-labs-jules[bot] 9d06f43321 feat: implement incremental fetching for Nostr lists
Implements a `SyncMetadataStore` to persist last-seen timestamps for replaceable lists (Kind 10000, 30000, 30002, 30015).
Adds `fetchListIncrementally` helper to `NostrClient` which performs per-relay `since` queries.
Updates `SubscriptionsManager`, `UserBlockListManager`, `HashtagPreferencesService`, and `adminListStore` to utilize incremental fetching.
Prevents local cache wipes when incremental fetches return empty results (indicating "no updates").
2026-01-17 21:11:48 +00:00
google-labs-jules[bot] 926e6ebf39 Refactor user-specific lists to use centralized profileCache 2026-01-17 20:47:27 +00:00
google-labs-jules[bot] 86ffb8cb2a Define centralized cache policies and wire them into fetchers 2026-01-17 19:12:09 +00: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
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
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 48b481f284 Improve npub decoding and seed logging 2026-01-11 13:06:15 -05:00
thePR0M3TH3AN c2eb2cdc19 Improve npub decoding in user blocks 2026-01-11 09:40:41 -05:00
thePR0M3TH3AN faaad9c724 Add session actor blacklist reconciliation 2026-01-10 20:33:15 -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
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
google-labs-jules[bot] 95ef008c58 Lazy-initialize signer from extension on demand 2026-01-07 19:51:48 +00:00
thePR0M3TH3AN 9e969e8120 Sanitize mute tags before publishing block list 2025-11-12 09:28:04 -05:00
thePR0M3TH3AN 2fae0a0e7c Update subscription and block lists to encrypted tag arrays 2025-10-30 15:51:21 -04:00
thePR0M3TH3AN bd40bd1997 Prefer nip44.v2 for private lists and update tests 2025-10-30 10:20:08 -04:00
thePR0M3TH3AN ca8bbcad9b Publish trusted mute lists with block updates 2025-10-25 15:22:52 -04:00
thePR0M3TH3AN 9ed0fae127 refactor: route nostr imports through facades 2025-10-22 22:40:17 -04:00
thePR0M3TH3AN 5536180682 refactor: centralize nostr client bootstrap 2025-10-22 21:09:18 -04:00
thePR0M3TH3AN 75ea73b178 Refactor Nostr client imports 2025-10-22 20:55:54 -04:00
thePR0M3TH3AN 001bbaa3bf Handle direct signer decryptors for user blocks 2025-10-21 21:34:24 -04:00
thePR0M3TH3AN 578d2ddde4 Refactor Nostr signer integration 2025-10-21 15:13:48 -04:00
thePR0M3TH3AN 023475843c Seed shared blocklist for first-time logins 2025-10-20 14:30:40 -04:00
thePR0M3TH3AN b0f0c86f19 Handle background block list fetch fallbacks 2025-10-20 13:59:41 -04:00
thePR0M3TH3AN b6aab37da6 Protect block list from stale relay events 2025-10-20 13:42:41 -04:00
thePR0M3TH3AN 8824eee942 Sync moderation summaries after user block changes 2025-10-17 22:49:58 -04:00
thePR0M3TH3AN deffbf7670 Ensure NIP-07 permissions are granted before signing and encrypting 2025-10-15 22:36:57 -04:00
thePR0M3TH3AN 0a2a2c4e78 Fix syntax errors blocking app bootstrap 2025-10-15 15:08:55 -04:00
thePR0M3TH3AN 7ae07b1369 refactor: migrate console usage to shared loggers 2025-10-15 14:37:25 -04:00
thePR0M3TH3AN d705cf176b Revert "Refactor logging to centralized logger" 2025-10-15 11:14:10 -04:00
thePR0M3TH3AN 37ba57aa37 Refactor logging to centralized logger 2025-10-15 11:11:14 -04:00
thePR0M3TH3AN 77fa149cc3 Speed up profile and relay fetches 2025-10-09 18:55:18 -04:00
thePR0M3TH3AN b02d275bdb Parallelize block list relay fetches 2025-10-09 13:45:18 -04:00
thePR0M3TH3AN 92cc05f1f6 Refactor relay publish acknowledgements 2025-10-02 08:00:21 -04:00
thePR0M3TH3AN 0e29b07d5b refactor: centralize nostr event schemas 2025-10-01 13:21:59 -04:00
thePR0M3TH3AN 62cbc2a2eb Guard user block list from self entries 2025-09-28 21:47:56 -04:00