Commit Graph
4245 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 0b518cdd65 Add minimal reproducers for Moderation UI and Popover bugs
- Added reproducer for Moderation UI visibility bug in `examples/reproducers/issue-moderation-visibility`.
- Added reproducer for Popover viewport bug in `examples/reproducers/issue-popover-viewport`.
- Added `examples/reproducers/playwright.config.ts` to support running these reproducers with a local web server serving the repo root.
- Verified that both reproducers successfully fail as expected in the current environment.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 12:45:18 +00:00
thePR0M3TH3AN 7c33ecf6e4 Merge pull request #1867 from PR0M3TH3AN/ai/ci-health-20250523-2630760843200665805
chore(ai): CI health fixes (flaky tests)
2026-01-27 23:06:20 -05:00
google-labs-jules[bot]andPR0M3TH3AN 9e4ff8285a chore(ai): CI health fixes (flaky tests)
- Add `source: "nsec"` to session actor mocks in `tests/watch-history.test.mjs` to fix `isSessionActor` check blocking execution.
- Implement retry loop in `testWatchHistoryFeedHydration` to mitigate race conditions.
- Relax assertion in `testWatchHistoryPartialRelayRetry` to accommodate varying retry counts.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 02:26:05 +00:00
thePR0M3TH3AN 287671aca5 Merge pull request #1866 from PR0M3TH3AN/ai/triage-todos-20241026-7763897546060724595
chore(ai): triage TODOs and create issue for moderation tests
2026-01-27 21:05:54 -05:00
thePR0M3TH3AN 9a88ab6a0a Merge pull request #1864 from PR0M3TH3AN/fix/nip46-cancel-handshake-5965467881028112501
Fix NIP-46 login cancellation hanging
2026-01-27 21:05:41 -05:00
thePR0M3TH3AN 0376d0ecda Merge pull request #1865 from PR0M3TH3AN/fix-nip07-retry-logic-16812290615855532987
Fix NIP-07 retry logic to prevent hangs on timeout
2026-01-27 21:05:29 -05:00
google-labs-jules[bot]andPR0M3TH3AN dc1a6b7338 chore(ai): triage TODOs and create issue for moderation tests
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 01:29:00 +00:00
google-labs-jules[bot]andPR0M3TH3AN 33a5f64c9f fix(nostr): ensure NIP-07 operations are retried on timeout
Previously, `runNip07WithRetry` cached the initial promise of a NIP-07 operation. If a request timed out (e.g., due to a dropped extension popup), the retry logic would re-await the same stale promise, causing the application to hang indefinitely instead of sending a new request.

This commit modifies `runNip07WithRetry` to invoke the operation factory function on every attempt, ensuring that retries generate fresh requests to the extension.

Fixes slow/stalled list syncing (hashtags, subscriptions) for users with NIP-07 extensions.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 00:50:00 +00:00
google-labs-jules[bot]andPR0M3TH3AN 13ab4e790d Fix: Cancel NIP-46 handshake on login modal cancellation
Implemented a mechanism to cancel the pending NIP-46 handshake when the user clicks 'Cancel' in the login modal.
- Added `pendingHandshakeCancel` callback to `NostrClient` to reject the handshake promise.
- Updated `LoginModalController` to invoke `disconnectRemoteSigner` on cancellation.
- Prevented `onLoginError` callback from triggering when the error code is `login-cancelled`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 00:38:26 +00:00
thePR0M3TH3AN 63e5c9f415 Merge pull request #1863 from PR0M3TH3AN/incremental-dm-delivery-1675115114580049093
Incremental DM Delivery
2026-01-27 19:14:16 -05:00
google-labs-jules[bot]andPR0M3TH3AN 63d4b3ffd1 feat(dm): implement incremental delivery for direct messages
- Added `onMessage` callback to `NostrClient.listDirectMessages` to stream decrypted messages.
- Updated `NostrService.loadDirectMessages` to use the callback and trigger `applyDirectMessage` incrementally.
- Updated `ProfileModalController` to allow rendering updates during the initial load if the reason is `load-incremental`.
- Verified changes with existing tests and code review.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 00:11:32 +00:00
thePR0M3TH3AN 92d0766516 Merge pull request #1862 from PR0M3TH3AN/update-user-blocks-fetch-logic-13968385690674238472
Update user block fetch logic
2026-01-27 19:00:19 -05:00
google-labs-jules[bot]andPR0M3TH3AN 018fd6d599 refactor: update user block fetch logic to prioritize kind 10000 with d-tag
Changes `loadBlocks` to fetch `kind: 10000` with `d=user-blocks` instead of `kind: 30002` for block lists, while keeping the generic `kind: 10000` fetch for mute lists.
Updates `applyEvents` to separate block lists (tagged or legacy 30002) from mute lists (untagged 10000) and merge them instead of prioritizing one over the other.
Updates tests to reflect the merged behavior.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 23:59:58 +00:00
thePR0M3TH3AN 4d2b878601 Merge pull request #1861 from PR0M3TH3AN/hashtag-preferences-fallback-1907604547748514072
Add window.nostr fallback for hashtag preference decryption
2026-01-27 18:46:44 -05:00
google-labs-jules[bot]andPR0M3TH3AN 39d1eda058 feat(services): add window.nostr fallback for hashtag preference decryption
This commit updates `HashtagPreferencesService.decryptEvent` to register and utilize decryption methods from `window.nostr` (NIP-04 and NIP-44) as a fallback mechanism. This ensures that users without an active internal signer (e.g., read-only or extension-only users) can still decrypt their preferences if they have granted permission to the extension.

- Mirrors the decryption logic from `UserBlockListManager` (`js/userBlocks.js`).
- Adds logging for fallback attempts and failures.
- Preserves existing scheme selection logic (`determineDecryptionOrder`).
- Adds new test cases to `tests/hashtag-preferences.test.mjs` verifying fallback behavior when the active signer is missing or incapable.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 23:46:23 +00:00
thePR0M3TH3AN c4edfd0d36 Merge pull request #1860 from PR0M3TH3AN/subscriptions-decryption-optimization-14984568479982941528
Enhance subscription decryption with window.nostr fallback and optimized permissions
2026-01-27 18:31:06 -05: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
thePR0M3TH3AN df08ec0d14 Merge pull request #1859 from PR0M3TH3AN/agent/automated-pr-review-5537732400467871130
Enhance automated PR review scripts and workflow
2026-01-27 18:29:11 -05:00
google-labs-jules[bot]andPR0M3TH3AN 4de7dcb3f4 feat(ci): enhance automated PR review scripts
- Update `scripts/automated-pr-review.mjs` to include missing sensitive paths (`js/auth/`, `js/magnetUtils.js`, `js/nostr/adapters/nip07Adapter.js`) and improve commit messaging for automated fixes.
- Add release channel guidance checks for `unstable` branch in `automated-pr-review.mjs`.
- Create `scripts/agent/review-open-prs.mjs` to robustly batch process open PRs using the updated review script.
- Remove redundant scripts `scripts/agent/automated-pr-review.mjs` and `scripts/agent/review-pr.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 23:16:02 +00:00
thePR0M3TH3AN 54e70f0181 Merge pull request #1858 from PR0M3TH3AN/codex/list-fetch-relay-improvements-8377401680345201038
Improve relay selection and fault tolerance for list fetching
2026-01-27 18:14:27 -05: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 281781f997 Merge pull request #1857 from PR0M3TH3AN/codex/update-event-handling-in-subscriptions.js
Fetch subscription lists for session actors and merge/dedupe results
2026-01-27 17:23:01 -05:00
thePR0M3TH3AN e504776f4e Fetch session actor subscriptions 2026-01-27 17:22:38 -05:00
thePR0M3TH3AN a60e16d1f2 Merge pull request #1856 from PR0M3TH3AN/codex/increase-decrypt-timeout-and-add-retry-logic
Increase decrypt timeouts and add background retry for user state decryption
2026-01-27 17:05:33 -05:00
thePR0M3TH3AN 73f8be6c15 Adjust decrypt timeout retries 2026-01-27 17:05:18 -05:00
thePR0M3TH3AN a90f0b6955 Merge pull request #1855 from PR0M3TH3AN/codex/update-relay-selection-logic-in-loadblocks
Align userBlocks relay selection with global fallback and sanitize relay URLs
2026-01-27 16:54:49 -05:00
thePR0M3TH3AN e0bb0edf7a Update user block relay selection 2026-01-27 16:54:37 -05:00
thePR0M3TH3AN 5cac280c3d Merge pull request #1854 from PR0M3TH3AN/codex/update-fetchlistincrementally-timeout-parameter
Add configurable timeout for incremental Nostr list fetches
2026-01-27 16:51:28 -05:00
thePR0M3TH3AN 19115c558c Adjust list fetch timeouts 2026-01-27 16:51:08 -05:00
thePR0M3TH3AN b3ef9d57bf Merge pull request #1853 from PR0M3TH3AN/codex/update-relay-selection-in-hashtagpreferencesservice
Expand relay fallback for hashtag preferences to include readRelays and DEFAULT_RELAY_URLS
2026-01-27 16:34:14 -05:00
thePR0M3TH3AN 405aca03cb Adjust relay fallback for hashtag preferences 2026-01-27 16:34:04 -05:00
thePR0M3TH3AN 6f6914764c Merge pull request #1852 from PR0M3TH3AN/codex/update-resolvedecryptors-for-active-signer
Ensure signer decryptor availability for user block lists
2026-01-27 16:32:07 -05:00
thePR0M3TH3AN 4b407f7ce3 Update user block decryptor signer handling 2026-01-27 16:31:56 -05:00
thePR0M3TH3AN 01544e5e43 Merge pull request #1851 from PR0M3TH3AN/codex/update-profilecache-usage-in-userblocks.js
Scope user block cache storage by pubkey
2026-01-27 16:29:35 -05:00
thePR0M3TH3AN df4a70bfa6 Scope user block cache by profile 2026-01-27 16:29:23 -05:00
thePR0M3TH3AN 0d3dbafa73 Merge pull request #1848 from PR0M3TH3AN/ai/smoke-tests-20260127-8639087444619345059
chore(ai): add smoke test script (agent)
2026-01-27 16:29:10 -05:00
thePR0M3TH3AN 046c09c923 Merge pull request #1846 from PR0M3TH3AN/fix-upload-modal-test-failures-9576410255273740995
Fix UploadModal unit test failures by improving test isolation
2026-01-27 16:28:53 -05:00
thePR0M3TH3AN f9dd9d7920 Merge pull request #1847 from PR0M3TH3AN/fix-upload-modal-test-15043512839358145269
Fix UploadModal DOM initialization for robust testing
2026-01-27 16:28:40 -05:00
thePR0M3TH3AN 078d53e6bb Merge pull request #1849 from PR0M3TH3AN/fix-ci-failures-1694094349815692323
Fix CI lint (check-hex) and uploadModal integration test failures
2026-01-27 16:28:23 -05:00
thePR0M3TH3AN 512689d5db Merge pull request #1850 from PR0M3TH3AN/codex/update-subscription-caching-logic
Persist subscription cache metadata and force full fetch on cold start
2026-01-27 16:27:36 -05:00
thePR0M3TH3AN 2ab8bf8637 Update subscription cache metadata handling 2026-01-27 16:27:23 -05:00
google-labs-jules[bot]andPR0M3TH3AN f58c0a173b I'm fixing the CI lint and test failures.
- Refactoring `scripts/check-hex.js` to use git's native search instead of `ripgrep` for better portability and dependency reduction.
- Updating `tests/ui/uploadModal-integration.test.mjs` to ensure DOM isolation between tests using `beforeEach` cleanup, resolving state pollution issues.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 21:22:27 +00:00
google-labs-jules[bot]andPR0M3TH3AN 89bba44fee chore(ai): add smoke test script (agent)
Added scripts/agent/smoke-test.mjs to verify login, relay connection, video publishing, and DM decryption flows using a headless Node.js client.
The script polyfills the necessary browser environment for NostrClient and uses local relay/server resources.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 21:11:41 +00:00
google-labs-jules[bot]andPR0M3TH3AN 5420163135 Fix UploadModal DOM initialization for robust testing
Explicitly find the #uploadModal element within the parsed template wrapper using querySelector instead of relying on firstElementChild. This prevents null pointer exceptions in JSDOM environments where leading whitespace in the template string creates a text node as the first child.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 20:55:22 +00:00
google-labs-jules[bot]andPR0M3TH3AN d59eec4653 Refactor tests/ui/uploadModal-reset.test.mjs to use beforeEach/afterEach
Refactored the test suite to use `beforeEach` for mocking `global.fetch` and `afterEach` for cleaning up `document.body`. This ensures that `fetch` is available for all tests and that DOM state (specifically elements with duplicate IDs) does not leak between tests, resolving `TypeError: Cannot read properties of null` failures in `UploadModal.bindEvents`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 20:53:29 +00:00
thePR0M3TH3AN c3c8bd587d Merge pull request #1845 from PR0M3TH3AN/ai/dead-code-20241109-1421360165385975921
Dead Code Sweep: Remove unused files and dependencies
2026-01-27 15:44:29 -05:00
thePR0M3TH3AN 1b0ad8dfce Merge pull request #1844 from PR0M3TH3AN/fix-npm-ci-lockfile-13099291000237224520
Fix npm ci failure and UploadModal integration tests
2026-01-27 15:42:43 -05:00
thePR0M3TH3AN 4f2f26dd39 Merge branch 'unstable' into fix-npm-ci-lockfile-13099291000237224520 2026-01-27 15:42:32 -05:00
thePR0M3TH3AN b91b0ccbfa updated social link 2026-01-27 15:42:10 -05:00
google-labs-jules[bot]andPR0M3TH3AN f80bbc7dae chore(ai): remove dead code (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 20:33:25 +00:00