Commit Graph
4033 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 63dec7551d feat(agent): add automated-pr-review script (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 23:38:15 +00:00
thePR0M3TH3AN a58c31e2ab Merge pull request #1762 from PR0M3TH3AN/fix-moderation-service-loop-14484125146583454118
fix(services): resolve infinite subscription loop in moderationService
2026-01-26 18:11:22 -05:00
google-labs-jules[bot]andPR0M3TH3AN d48847aa5a fix(services): resolve infinite subscription loop in moderationService
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 22:24:04 +00:00
thePR0M3TH3AN fe4042e8cc Merge pull request #1761 from PR0M3TH3AN/refactor-auth-fetch-optimizations-13034258662514235848
Refactor NIP-07 auth and optimize list fetching
2026-01-26 17:13:11 -05:00
google-labs-jules[bot]andPR0M3TH3AN 3c7a396da9 refactor(auth): decouple NIP-07 logic and optimize list fetching (agent)
- Moved NIP-07 extension detection and permission logic from `NostrClient` to `nip07` provider.
- Removed redundant `login` method from `NostrClient`.
- Increased concurrency and added timeouts to `fetchListIncrementally` to prevent hanging on slow relays.
- Updated `UserBlocks` to force full fetch on cache miss, fixing "empty list" issues.
- Updated unit tests for login permissions and hashtag preferences to reflect architectural changes.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 21:48:52 +00:00
thePR0M3TH3AN e4be00f08c Merge pull request #1760 from PR0M3TH3AN/ai/smoke-tests-20260126-6251151013796436239
chore(ai): add smoke test script (agent)
2026-01-26 16:35:26 -05:00
google-labs-jules[bot]andPR0M3TH3AN b7e69d3967 chore(ai): add smoke test script (agent)
- Added `scripts/agent/smoke-test.mjs` to verify key flows:
  - Infrastructure: Local Relay (ws://localhost:8899) and Web Server (http://localhost:3000).
  - Protocol: Login, Video Post, View Event, DM Send/Decrypt.
  - UI: Headless Browser (Playwright) screenshot.
- Utilizes `scripts/agent/simple-relay.mjs` for a lightweight relay.
- Uses `scripts/agent/setup-test-env.js` for Node.js polyfills.
- Generates artifacts in `artifacts/` (log, summary JSON, screenshot).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 21:29:46 +00:00
thePR0M3TH3AN 967bb079f5 Merge pull request #1759 from PR0M3TH3AN/fix/nostr-login-race-condition-13189586627655219255
Fix race condition in Nostr login causing signer overwrite
2026-01-26 16:20:38 -05:00
google-labs-jules[bot]andPR0M3TH3AN 7cb603b652 fix(nostr): prevent nip-07 fallback from overwriting concurrent login
- Added a check in `ensureActiveSignerForPubkey` to verify if a valid signer (e.g. NIP-46) was registered during the extension wait period.
- Modified `nip07Permissions.js` to respect global timeout overrides for structured permission requests, fixing flaky tests.
- Added regression test `tests/nostr-signer-race.test.mjs` to simulate the race condition.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 21:19:47 +00:00
thePR0M3TH3AN 0c479319e6 Merge pull request #1758 from PR0M3TH3AN/fix-nip07-race-condition-15487328851099190056
Fix NIP-07 Race Condition
2026-01-26 16:03:34 -05:00
google-labs-jules[bot]andPR0M3TH3AN 1bb4d1ec85 fix(nostr): await nip-07 extension injection to resolve race conditions
This commit fixes a critical race condition where `window.nostr` might not be injected
before the app attempts to use it, causing failures in decryption (subscriptions, hashtags, DMs)
and login flows.

Changes:
- Updated `ensureExtensionPermissions` in `js/nostr/client.js` to verify `window.nostr` existence
  even when permissions are cached. If missing, it now awaits `waitForNip07Extension` instead of
  returning a false success.
- Updated `ensureActiveSignerForPubkey` in `js/nostr/client.js` to wait for the extension
  if permissions are cached but `window.nostr` is missing, ensuring a valid signer is created.

Verification:
- Confirmed `waitForNip07Extension` is imported in `js/nostr/client.js`.
- Verified `HashtagPreferencesService` already implements multi-scheme decryption and optimistic updates.
- Verified `SubscriptionsManager` implements multi-scheme decryption.
- The race condition fix ensures the signer is correctly initialized with capabilities, enabling the decryption logic to work.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 20:58:02 +00:00
google-labs-jules[bot]andPR0M3TH3AN a57947da0c fix(nostr): await nip-07 extension injection to resolve race conditions
This commit fixes a critical race condition where `window.nostr` might not be injected
before the app attempts to use it, causing failures in decryption (subscriptions, hashtags, DMs)
and login flows.

Changes:
- Updated `ensureExtensionPermissions` in `js/nostr/client.js` to verify `window.nostr` existence
  even when permissions are cached. If missing, it now awaits `waitForNip07Extension` instead of
  returning a false success.
- Updated `ensureActiveSignerForPubkey` in `js/nostr/client.js` to wait for the extension
  if permissions are cached but `window.nostr` is missing, ensuring a valid signer is created.

This ensures that the "Performance Analysis" optimization (skipping `enable()` calls based on cache)
does not break functionality when the extension injection is delayed.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 20:57:17 +00:00
thePR0M3TH3AN 91e0be0ad4 Merge pull request #1757 from PR0M3TH3AN/fix/nip07-reliability-hashtag-sync-9057175927008985329
Fix NIP-07 reliability and Hashtag sync race conditions
2026-01-26 15:41:21 -05:00
google-labs-jules[bot]andPR0M3TH3AN 5c1d1d340b fix(nostr): harden nip-07 adapter and fix hashtag sync issues
- Wrapped NIP-07 adapter extension calls in `retryNip07Call` to handle transient failures and timeouts robustly.
- Updated `HashtagPreferencesService` to autosave changes to relays immediately on modification.
- Added race condition protection in `HashtagPreferencesService.load` to prevent overwriting optimistic local updates with stale relay data.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 20:40:28 +00:00
thePR0M3TH3AN f55dcb5b4a Merge pull request #1756 from PR0M3TH3AN/ai/dead-code-20240523-12335260935676065759
Remove dead code: js/storage/s3-settings.js
2026-01-26 15:34:55 -05:00
google-labs-jules[bot]andPR0M3TH3AN 596bfd074a chore(ai): remove dead code (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 20:29:38 +00:00
thePR0M3TH3AN de463a86f4 Merge pull request #1755 from PR0M3TH3AN/fix-nip07-login-and-list-sync-2738736650874322508
Fix NIP-07 Login Slowness and Prevent List Data Loss on Network Failure
2026-01-26 15:16:40 -05:00
google-labs-jules[bot]andPR0M3TH3AN 9d820c27e9 fix(nostr): prevent list data loss on fetch failure and optimize login timeout
- Update `fetchListIncrementally` in `js/nostr/client.js` to throw an error if all relays fail, preventing empty returns from being interpreted as data loss.
- Update `HashtagPreferencesService`, `UserBlockListManager`, and `SubscriptionsManager` to handle fetch errors gracefully without wiping local state.
- Update `js/nostr/nip07Permissions.js` to use a short timeout (3s) for experimental permission requests, fixing "clunky" login issues while preserving user interaction time for standard login.
- Remove `try/catch` in `adminListStore.js` fetch logic to allow error propagation to the fallback cache logic.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 20:16:08 +00:00
thePR0M3TH3AN fd6301ba7c Merge pull request #1753 from PR0M3TH3AN/fix-unreachable-relay-timeout-17713574471335284394
Fix slow loading by filtering unreachable relays
2026-01-26 14:55:57 -05:00
google-labs-jules[bot]andPR0M3TH3AN c81f71b6d2 fix(client): track and filter unreachable relays to prevent timeouts
Introduces `unreachableRelays` tracking in `NostrClient` to identify relays that fail connection during initialization.
Updates fetch operations (`fetchListIncrementally`, `subscribeVideos`, etc.) to use `getHealthyRelays`, filtering out known bad relays to prevent `SimplePool` timeouts (7s) from blocking the application.
This resolves slow loading and app breakage when the user's persistent configuration contains dead relays.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 19:55:05 +00:00
thePR0M3TH3AN af209b405a Merge pull request #1752 from PR0M3TH3AN/ai/load-test-20260126-9118728376138210456
Enhance load test script for multi-part events
2026-01-26 14:45:25 -05:00
google-labs-jules[bot]andPR0M3TH3AN cec48811be feat(scripts): enhance load test script for multi-part events (agent)
- Updated `scripts/agent/load-test.mjs` to simulate realistic video publishing flows by generating Video Post (Kind 30078), Video Mirror (Kind 1063), and NIP-71 Metadata (Kind 21/22) events for "heavy" load scenarios.
- Refactored the load generation loop to strictly separate cryptographic signing time from network transmission time, ensuring accurate performance metrics.
- Generated a baseline `artifacts/load-report.json` demonstrating ~100 events/sec throughput and sub-10ms signing latency.
- Verified execution against a local relay to prevent public network stress.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 19:41:50 +00:00
thePR0M3TH3AN 4a9d771689 Merge pull request #1751 from PR0M3TH3AN/fix-hashtag-preferences-reliability-11590046793499190431
Fix Hashtag Preferences Reliability
2026-01-26 14:31:54 -05:00
google-labs-jules[bot]andPR0M3TH3AN 6a2432dd4c fix(nostr): anchor hashtag preferences fetch to local state
- Updated `NostrClient.fetchListIncrementally` to accept a `since` override.
- Updated `HashtagPreferencesService.load` to pass `since` based on local cache timestamp.
- Ensures preferences are refreshed if local state is stale or missing, overriding potentially incorrect `SyncMetadataStore` state.
- Added regression tests for `fetchListIncrementally` since parameter logic.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-26 19:21:38 +00:00
thePR0M3TH3AN e970098edd Merge pull request #1750 from PR0M3TH3AN/subscribe-button-fix-16941923470046179700
Fix subscribe button responsiveness and list persistence
2026-01-26 13:56:52 -05: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 560dcf96b0 Merge pull request #1749 from PR0M3TH3AN/fix-syntax-error-s3uploadservice-8597746335056404895
Fix SyntaxError in s3UploadService.js
2026-01-26 13:30:20 -05:00
google-labs-jules[bot] f321477455 fix(s3): remove duplicate normalizedInfoHash declaration
Removes a redundant `const normalizedInfoHash` declaration in `s3UploadService.js` that caused a `SyntaxError` and prevented the application from loading. The variable is already declared in the outer scope of the `try` block.
2026-01-26 18:29:42 +00:00
thePR0M3TH3AN 5123944a7d update 2026-01-26 13:23:11 -05:00
thePR0M3TH3AN f1a5d6f3ed Merge pull request #1748 from PR0M3TH3AN/revert-1747-improve-profile-modal-fetching-11060559516076687952
Revert "perf(profile): implement stale-while-revalidate for lists and messages"
2026-01-26 13:19:21 -05:00
thePR0M3TH3AN 27b71ba9bb Revert "perf(profile): implement stale-while-revalidate for lists and messages" 2026-01-26 13:18:51 -05:00
thePR0M3TH3AN b570350412 Merge pull request #1747 from PR0M3TH3AN/improve-profile-modal-fetching-11060559516076687952
perf(profile): implement stale-while-revalidate for lists and messages
2026-01-26 13:17:25 -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 8a1d6d5e55 Merge pull request #1746 from PR0M3TH3AN/codex/refactor-buildr2key-to-use-deterministic-prefix
Refactor R2 key generation to deterministic identifier prefix
2026-01-26 12:47:18 -05:00
thePR0M3TH3AN c02db755ac Refactor R2 key prefix for deterministic identifiers 2026-01-26 12:47:05 -05:00
thePR0M3TH3AN 00b0e85438 Merge pull request #1745 from PR0M3TH3AN/codex/define-videorootid-for-series-identifier
Persist file fingerprints (infoHash / SHA256) separately from stable videoRootId
2026-01-26 12:26:17 -05:00
thePR0M3TH3AN 82986650ce Store video file fingerprints alongside series IDs 2026-01-26 12:25:54 -05:00
thePR0M3TH3AN f907f96e1b Merge pull request #1744 from PR0M3TH3AN/codex/update-publishvideo-to-handle-optional-videorootid
Reuse upload-provided series identifier for publishVideo (videoRootId + d tag)
2026-01-26 12:13:40 -05:00
thePR0M3TH3AN 3006a75602 Allow publish video series identifiers 2026-01-26 12:13:26 -05:00
thePR0M3TH3AN bf69acedec Merge pull request #1741 from PR0M3TH3AN/enhance-s3-storage-ui-9302963025146887048
Enhance Custom S3 Storage UI and Configuration
2026-01-26 11:56:22 -05:00
thePR0M3TH3AN 0ee74146dd Merge pull request #1742 from PR0M3TH3AN/ai/fuzz-targets-20231026-13475624679443815617
Add fuzz testing scripts
2026-01-26 11:55:59 -05:00
google-labs-jules[bot] a1cb6377a6 feat(agent): add fuzz testing scripts for nostr schemas, DM decryptor, and magnet utils 2026-01-26 16:53:30 +00:00
google-labs-jules[bot] 6e3562b64b feat(ui): enhance custom S3 storage configuration with helper text and force path style option
- Add helper text to the S3 storage configuration form to guide users on Endpoint URL format.
- Add 'Force Path Style' checkbox to S3 storage configuration to support MinIO and other S3-compatible providers that require it.
- Update `ProfileModalController` to toggle visibility of these new fields based on the selected provider.
- Update `ProfileModalController` to save and load the `forcePathStyle` setting.
- Update `tests/ui/storageService.test.mjs` to verify persistence of `forcePathStyle`.
2026-01-26 16:50:48 +00:00
thePR0M3TH3AN 178f75c093 update 2026-01-26 11:38:49 -05:00
thePR0M3TH3AN 20241b584e update 2026-01-26 11:36:33 -05:00
thePR0M3TH3AN f2344a25d6 Merge pull request #1739 from PR0M3TH3AN/fix-playback-toggle-timeout-18406339072238976341
Fix playback timeout fallback when source is forced
2026-01-26 11:15:24 -05:00
google-labs-jules[bot] 4823486ed7 fix(playback): disable timeout and fallback when source is forced by user 2026-01-26 16:12:12 +00:00
thePR0M3TH3AN f5203ddb47 Merge pull request #1738 from PR0M3TH3AN/feat/playback-timeout-fallback-8232196413966424077
feat(playback): add configurable timeout for initial playback start
2026-01-26 10:57:07 -05:00
google-labs-jules[bot] 7921ab6a2e feat(playback): add configurable timeout for initial playback start
Introduces a race condition between the primary playback source (URL or Torrent) and a configurable timeout. If the primary source fails to reach the 'playing' state within the timeout window, the system automatically falls back to the alternative source.

- Adds `DEFAULT_PLAYBACK_START_TIMEOUT` to instance config (3000ms).
- Updates `PlaybackService` to implement timeout logic using `withTimeout` wrapper.
- Ensures proper cleanup of stalled attempts (resetting video element, destroying torrent client).
2026-01-26 15:55:11 +00:00
thePR0M3TH3AN c650597da1 Merge pull request #1737 from PR0M3TH3AN/ai/doc-nip46-client-20241026-1908093676591025314
chore(ai): document js/nostr/nip46Client.js
2026-01-26 10:37:09 -05:00