Commit Graph
109 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN a920032993 fix(ci): prevent signer timeouts in background tests
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 07:14:47 +00:00
thePR0M3TH3AN deec2cd573 Merge pull request #1994 from PR0M3TH3AN/codex/handle-auth-login-failures-and-permissions
Add permission CTA and retry flow for subscriptions & hashtag preferences
2026-01-30 15:40:12 -05:00
thePR0M3TH3AN acf73bc5a3 Add permission CTA for subscriptions and hashtags 2026-01-30 15:39:52 -05:00
google-labs-jules[bot]andPR0M3TH3AN 6347ab0db1 fix(auth): optimize login speed and list decryption
- Reduced decryption timeout for user lists from 90s to 15s to fail faster.
- Optimized NIP-07 decryption calls to avoid retries and long timeouts during critical loading paths.
- Fixed a bug where `loginWithExtension` triggered `getPublicKey` twice, doubling the user interaction time.
- Added a 10s grace period for relay health warnings to prevent false positives on startup.
- Verified `deferBlocks` logic in `authService` prevents blocking the login UI on slow list decryption.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 20:31:24 +00:00
google-labs-jules[bot]andPR0M3TH3AN 5bdca14364 Fix list loading reliability and optimize NIP-07 login performance
- Fixes issue where user lists (subscriptions, blocks) fail to load if local cache is stale but metadata store is fresh.
- Updates `js/userBlocks.js` and `js/subscriptions.js` to persist `createdAt` timestamp and use it for incremental fetch `since` parameter.
- Optimizes `js/nostr/client.js` `ensureActiveSignerForPubkey` to reduce redundant `getPublicKey` calls to NIP-07 extension by 50%.
- Adds `preloadedPubkey` support to `createNip07Adapter`.
- Adds reproduction test for NIP-07 concurrency issue.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 19:35:05 +00:00
thePR0M3TH3AN 5a5fd50641 Improve relay sanitization and health checks 2026-01-30 10:48:28 -05:00
thePR0M3TH3AN abdfa4b68b Defer NIP-07 encryption permissions 2026-01-30 10:29:00 -05:00
thePR0M3TH3AN a196e95127 Centralize relay list subscriptions 2026-01-29 16:32:11 -05:00
thePR0M3TH3AN 379287c87c Defer subscription and hashtag decrypt prompts 2026-01-29 13:08:35 -05:00
google-labs-jules[bot]andPR0M3TH3AN cfbbf78941 chore(ai): add automated PR review report
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 23:49:33 +00:00
thePR0M3TH3AN e4ad07b2cf Add fast relay fallback for list fetches 2026-01-28 15:28:58 -05:00
thePR0M3TH3AN 7c47208255 Adjust NIP-07 permissions for decrypt flows 2026-01-28 14:47:06 -05:00
thePR0M3TH3AN cf9082b83f Add shared NIP-07 permission gate 2026-01-28 13:57:40 -05:00
google-labs-jules[bot]andPR0M3TH3AN e92c95995f feat: prioritize profile and feed data sync
- Implements a priority queue for NIP-07 (browser extension) requests to allow critical tasks (blocklist/prefs decryption) to jump the line.
- Updates NIP-46 client and adapters to support priority overrides for encryption/decryption.
- Updates UserBlockListManager, SubscriptionsManager, and HashtagPreferencesService to request HIGH priority when decrypting data.
- Ensures strict serialization for NIP-07 to prevent extension errors while optimizing latency for critical data.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 15:00:15 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2618d4f24a feat: enhance subscription decryption with window.nostr fallback and optimized permissions
- In `js/subscriptions.js`, updated `decryptSubscriptionEvent` to register decryptors from `window.nostr` (NIP-04 and NIP-44 v2) alongside the active signer.
- Refactored permission request logic to only trigger `requestDefaultExtensionPermissions` if neither the active signer nor `window.nostr` supports the required encryption schemes.
- Implemented "fail-fast" behavior to return an error immediately if no suitable decryptor is available, avoiding unnecessary timeouts.
- Removed redundant permission checks from `updateFromRelays` as the logic is now centralized in `decryptSubscriptionEvent`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 23:30:29 +00:00
google-labs-jules[bot]andPR0M3TH3AN 5b69722f72 Improve relay selection and fault tolerance for list fetching
- Updated `NostrClient.fetchListIncrementally` to prioritize user's NIP-65 read relays, cap concurrent requests, and temporarily mark failing relays as unreachable.
- Added `markRelayUnreachable` to `NostrClient` for temporary relay exclusion.
- Updated `SubscriptionsManager`, `HashtagPreferencesService`, and `UserBlockListManager` to use `relayManager.getReadRelayUrls()` for selecting relays, ensuring consistency with user preferences.
- Added structured logging for relay selection in `fetchListIncrementally`.
- Updated unit tests to mock `relayManager` behavior correctly.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 22:54:31 +00:00
thePR0M3TH3AN e504776f4e Fetch session actor subscriptions 2026-01-27 17:22:38 -05:00
thePR0M3TH3AN 73f8be6c15 Adjust decrypt timeout retries 2026-01-27 17:05:18 -05:00
thePR0M3TH3AN 19115c558c Adjust list fetch timeouts 2026-01-27 16:51:08 -05:00
thePR0M3TH3AN 2ab8bf8637 Update subscription cache metadata handling 2026-01-27 16:27:23 -05:00
google-labs-jules[bot]andPR0M3TH3AN dab94a5cfe Fix slow loading and NIP-07 decryption issues
- Reduced `fetchListIncrementally` timeout to 4000ms to fail faster on bad relays.
- Added 15s timeout to decryption calls in `HashtagPreferencesService`, `UserBlockListManager`, and `SubscriptionsManager` to prevent infinite hangs.
- Added handling for "message channel closed" error in `nip07Adapter` with a backoff delay to allow extension recovery.
- Prioritized preserving cached data on decryption failure instead of resetting to empty state.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 18:51:34 +00:00
google-labs-jules[bot]andPR0M3TH3AN 73541168f7 fix(subscriptions): improve reliability of list loading and button responsiveness
- Implemented optimistic UI updates for the channel subscribe button to improve responsiveness.
- Fixed a race condition in `js/subscriptions.js` and `js/services/hashtagPreferencesService.js` where lists were wiped on refresh due to `profileCache.activePubkey` not being initialized in time. Now using `profileCache.getProfileData(pubkey, ...)` to ensure the correct cache entry is loaded.
- Validated with targeted unit tests.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 18:56:34 +00:00
thePR0M3TH3AN 5123944a7d update 2026-01-26 13:23:11 -05:00
thePR0M3TH3AN 27b71ba9bb Revert "perf(profile): implement stale-while-revalidate for lists and messages" 2026-01-26 13:18:51 -05:00
google-labs-jules[bot] d61074e200 perf(profile): implement stale-while-revalidate for lists and messages 2026-01-26 18:16:45 +00:00
thePR0M3TH3AN 06c7cf912a Add subscription toggle helper 2026-01-18 19:40:58 -05:00
thePR0M3TH3AN 52d2488d17 Refactor nostr signer access 2026-01-18 09:15:18 -05: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] 1d8ab920ce Fix inconsistent subscriptions loading with persistent caching
Implements a stale-while-revalidate strategy for the SubscriptionsManager.
- Loads subscriptions from localStorage immediately to show UI state.
- Fetches fresh data from relays in the background.
- Preserves cached data if relays fail or return empty results (preventing "No subscriptions found" errors).
- Updates cache optimistically on subscribe/unsubscribe actions.
2026-01-16 16:18:02 +00:00
google-labs-jules[bot] fa23ffb53c fix(subscriptions): prevent spinner loop on background refresh 2026-01-12 13:52:14 +00: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] b07332395b Fix subscription feed hydration and infinite loading state 2026-01-08 19:24:10 +00:00
google-labs-jules[bot] 95ef008c58 Lazy-initialize signer from extension on demand 2026-01-07 19:51:48 +00:00
google-labs-jules[bot] 9d365bf65e Fix profile watch history and subscription lists syncing issues. 2026-01-07 18:44:43 +00:00
thePR0M3TH3AN cc49f41356 Remove legacy subscription kind handling 2026-01-06 16:03:38 -05:00
thePR0M3TH3AN fbc352e460 Fix fallback thumbnail asset paths 2025-11-03 19:15:44 -05:00
thePR0M3TH3AN 7db78b07f2 Restore legacy subscription list compatibility 2025-11-03 09:42:17 -05:00
thePR0M3TH3AN e496376236 Align subscription lists with NIP-51 follow set kind 2025-10-31 08:33:39 -04: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 0944ecf32a Fix owner checks by reusing selected video details 2025-10-26 19:48:38 -04:00
thePR0M3TH3AN 078c8788b3 Add ensureLoaded helper for subscriptions and align error UX 2025-10-26 14:16:51 -04:00
thePR0M3TH3AN 91404af8ad Make moderation thresholds resolve at runtime 2025-10-26 10:19:34 -04:00
thePR0M3TH3AN ba6b56dc26 Switch moderation hide flows to block 2025-10-25 21:54:31 -04:00
thePR0M3TH3AN 7d3a4fbd49 Wire moderation handlers for subscriptions list 2025-10-25 20:29:33 -04:00
thePR0M3TH3AN ad01cf852f Propagate tag preferences through feed runtimes 2025-10-25 17:38:31 -04:00
thePR0M3TH3AN 876020b90f Add popular tag strip support to recent videos 2025-10-23 15:13:05 -04:00