Commit Graph
4281 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 9f67b9e06b feat: add fuzz testing harnesses and fix crash in nostrEventSchemas
- Expand fuzzing coverage for `js/nostrEventSchemas.js` to include all builder functions.
- Fix a crash in `buildAdminListEvent` where non-array `hexPubkeys` caused a TypeError.
- Update `scripts/agent/fuzz-dmDecryptor.mjs` and `scripts/agent/fuzz-magnetUtils.mjs` iterations.
- Add reproducer for the `buildAdminListEvent` crash.
- Generate fuzz reports in `artifacts/`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 16:27:36 +00:00
thePR0M3TH3AN 8e2e641e07 Merge pull request #1884 from PR0M3TH3AN/fix-visual-test-sidebar-fade-726574171242029755
fix(test): resolve flaky sidebar visibility check in visual tests
2026-01-28 11:12:47 -05:00
google-labs-jules[bot]andPR0M3TH3AN ae03023d72 fix(test): wait for sidebar fade-in to complete in overlay-layers test
Explicitly wait for the `#sidebar` element to lose the `fade-in` class after dismissing the disclaimer modal in `tests/visual/overlay-layers.spec.ts`. This prevents race conditions in CI environments where the `opacity: 0` style from the fade-in animation persists during subsequent visibility checks, causing `expect(locator).toBeVisible()` to fail unexpectedly.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 16:10:40 +00:00
thePR0M3TH3AN 358e077ec7 Merge pull request #1882 from PR0M3TH3AN/ai/doc-nostr-client-20250221-12906275170821971832
chore(ai): document NostrClient core logic
2026-01-28 11:04:47 -05:00
thePR0M3TH3AN 79a69e75f1 Merge pull request #1883 from PR0M3TH3AN/chore/daily-design-system-audit-report-1008241807942944413
chore: Daily Design System Audit Report
2026-01-28 11:04:27 -05:00
google-labs-jules[bot]andPR0M3TH3AN 02585f6e8c chore: Daily Design System Audit Report
Executed the daily design system audit using `scripts/daily-design-system-audit.mjs`.
The audit found no violations.

Generated `REMEDIATION_REPORT.md` with the results.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 15:56:40 +00:00
google-labs-jules[bot]andPR0M3TH3AN 8a94a26688 chore(ai): document NostrClient core logic
- Added detailed JSDoc to `init` and `fetchListIncrementally` in `js/nostr/client.js`.
- Verified existing JSDoc for `subscribeVideos`, `hydrateVideoHistory`, `revertVideo`, and `deleteAllVersions`.
- Updated `docs/nostr-client-overview.md` with new sections on Incremental List Fetching, Deletion & Reversion, and a Key Methods Reference table.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 15:53:34 +00:00
thePR0M3TH3AN 8e223650c6 Merge pull request #1881 from PR0M3TH3AN/fix-build-and-test-flakiness-13073990612371615685
Fix build failure and test flakiness in moderation overrides
2026-01-28 10:45:29 -05:00
google-labs-jules[bot]andPR0M3TH3AN afaf5b2221 fix(test): resolve moderation-overrides flakiness and clean artifacts
- Clean up `verify_fix.mjs`, `verify_source_toggle.py`, and logs to fix potential lint/grep issues in CI.
- Define `normalizeHexPubkey` on test harness in `tests/helpers/moderation-test-helpers.mjs` to ensure robust `Application` mocking for `ModerationActionController` tests.
- Verify build and tests pass.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 15:40:12 +00:00
thePR0M3TH3AN 2dc23a5bb4 Merge pull request #1880 from PR0M3TH3AN/feat/prioritize-profile-sync-17123164066717764298
Prioritize profile and feed data synchronization
2026-01-28 10:12:06 -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
thePR0M3TH3AN 0c9ab2d384 Merge pull request #1878 from PR0M3TH3AN/ai/docs-update-20250226-5463995779925509361
Update documentation quickstarts and agent conventions
2026-01-28 09:42:59 -05:00
thePR0M3TH3AN 1cfac8db6f Merge pull request #1879 from PR0M3TH3AN/fix-nip07-concurrency-issues-6009536694074259561
fix(nostr): serialize NIP-07 extension requests to prevent timeouts
2026-01-28 09:38:00 -05:00
google-labs-jules[bot]andPR0M3TH3AN 498909d60e fix(nostr): serialize nip-07 requests to prevent extension timeouts and crashes
Introduced a request queue in `js/nostr/nip07Permissions.js` to serialize all interactions with the NIP-07 extension (`window.nostr`).
Updated `js/userBlocks.js`, `js/services/hashtagPreferencesService.js`, and `js/auth/signingAdapter.js` to wrap direct extension calls with `runNip07WithRetry`, ensuring they participate in the queue.
This resolves "message channel closed" errors and timeouts caused by concurrent requests flooding the extension during sync operations.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 14:35:56 +00:00
google-labs-jules[bot]andPR0M3TH3AN b4bf11cb6d docs(ai): update quickstart and contributing (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 14:28:49 +00:00
thePR0M3TH3AN dc7257855a Merge pull request #1870 from PR0M3TH3AN/refactor-auth-providers-v2-4587525965814839162
Refactor Auth Providers to NostrClient with Security Validators
2026-01-28 09:06:46 -05:00
thePR0M3TH3AN 3e29f2042d update 2026-01-28 09:05:20 -05:00
google-labs-jules[bot]andPR0M3TH3AN b6403c9120 refactor(auth): unify login logic in NostrClient and enhance security
- Refactor `loginWithExtension` into `NostrClient` to centralize NIP-07 logic.
- Add `validator` support to `NostrClient` login methods to enforce access control (whitelists/blacklists) before setting the active signer.
- Update `nip07`, `nip46`, and `nsec` auth providers to inject `accessControl` checks via validators.
- Fix imports in auth providers to ensure `accessControl` is available.
- Remove unused `accessControl` import from `js/nostr/client.js` to avoid potential circular dependencies.
- Verified with targeted unit tests and a custom integration script (`test-nip07-refactor.mjs`).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 13:35:25 +00:00
thePR0M3TH3AN a4b4bd1c3e Merge pull request #1877 from PR0M3TH3AN/ai/reproducers-bugs-20250127-14420653437000031368
Add minimal reproducers for Moderation UI and Popover bugs
2026-01-28 08:31:55 -05:00
thePR0M3TH3AN 5dc9c2d016 Merge pull request #1876 from PR0M3TH3AN/ai/tests-core-modules-20241018-16491855254323953443
Add unit tests for core services and nostr modules
2026-01-28 08:31:13 -05:00
thePR0M3TH3AN bda8e3a7ba Merge pull request #1875 from PR0M3TH3AN/ai/dependency-scan-1626902927366051523t
chore(ai): dependency scan and report
2026-01-28 08:30:34 -05:00
thePR0M3TH3AN 2be2da0022 Merge pull request #1874 from PR0M3TH3AN/ai/onboarding-20260128-17143221217770946569
docs(ai): improve onboarding steps
2026-01-28 08:30:01 -05:00
thePR0M3TH3AN 12463c329f Merge pull request #1873 from PR0M3TH3AN/ai/interop-tests-20260128-13833342892400384254
Implement Protocol & Interop Tests with Public Relays
2026-01-28 08:29:23 -05:00
thePR0M3TH3AN f4d6131206 Merge pull request #1872 from PR0M3TH3AN/agent-telemetry-report-13038202969612422435
Telemetry & Error Aggregation Report
2026-01-28 08:28:29 -05:00
thePR0M3TH3AN ee27f1eb8c Merge pull request #1871 from PR0M3TH3AN/ai/schema-validate-20260128-14526814568196682122
chore(ai): event schema validation tool + fixes
2026-01-28 08:27:50 -05:00
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
google-labs-jules[bot]andPR0M3TH3AN 959082d327 test(ai): add unit tests for attachmentService, syncMetadataStore, s3Service, dmSignalEvents (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 11:31:13 +00:00
google-labs-jules[bot]andPR0M3TH3AN 161afea23d chore(ai): dependency scan and report
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 09:59:04 +00:00
google-labs-jules[bot]andPR0M3TH3AN df950f9fe0 docs(ai): improve onboarding steps (agent)
- Fix Tailwind build warning by using pixel units for screens in `tailwind.config.cjs`.
- Update `CONTRIBUTING.md` to recommend sharded unit tests to avoid timeouts.
- Add `docs/onboarding-audit-20260128.md` with full audit report.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 08:42:38 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3c1227e5be feat(ai): Implement scripts/agent/interop-test.mjs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 07:21:01 +00:00
google-labs-jules[bot]andPR0M3TH3AN fa80ceb5f2 chore(telemetry): generate aggregated error report for 2026-01-28
- executed scripts/agent/telemetry-aggregator.mjs with ENABLE_TELEMETRY=true
- collected failure logs from unit tests (test_unit_*.log)
- generated privacy-preserving report ai/reports/telemetry-20260128.md
- generated aggregated artifacts/error-aggregates.json
- force-added reports as they are gitignored by default

This report identifies 6 unique issues primarily owned by the QA Team based on unit test failures.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 06:21:13 +00:00
google-labs-jules[bot]andPR0M3TH3AN 62c0bdc07d fix(ci): address visual regression failure and cleanup css
Force click on sidebar collapse toggle in visual tests to resolve headless visibility flake. Removed redundant CSS media queries for sidebar elements.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 05:56:08 +00:00
google-labs-jules[bot]andPR0M3TH3AN ee59955a57 fix(ci): remove npx from package.json scripts
Removed `npx` prefix from `build:css` and `start` scripts in `package.json`. This resolves CI build failures where `npx` could not determine the executable or failed to locate the locally installed binary. Direct invocation of `tailwindcss` works correctly as npm adds `node_modules/.bin` to the PATH.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 05:43:20 +00:00
google-labs-jules[bot]andPR0M3TH3AN 25416af58e fix(ai): rename validation script to .test.mjs
Renamed scripts/agent/validate-events.mjs to scripts/agent/validate-events.test.mjs to prevent potential deployment issues with Netlify or other CI tools treating it as a production asset. Also added shebang.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 05:38:33 +00:00
google-labs-jules[bot]andPR0M3TH3AN c46fcf88cd chore(ai): event schema validation tool + fixes
Added scripts/agent/validate-events.mjs to validate event builders against schemas. Verified consistency and added a regression test for event schemas.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 05:31:18 +00:00
google-labs-jules[bot]andPR0M3TH3AN e76e84a524 fix(auth): correct file paths for accessControl imports and verify build
- Fixed imports in `js/services/authProviders/nip46.js` and `nsec.js` (although they looked correct, verifying path structure).
- Verified `npm run build` succeeds locally.
- Verified targeted tests for `nip46Client`, `sessionActor`, `client`, and `nip07Permissions` pass.
- Verified validator integration logic with manual test script `scripts/agent/test-nip07-refactor.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 04:25:12 +00:00
google-labs-jules[bot]andPR0M3TH3AN 16ad3320fe refactor(auth): consolidate login logic in NostrClient and enhance security
- Move NIP-07 extension login logic from `js/services/authProviders/nip07.js` to `NostrClient.loginWithExtension`.
- Add `validator` support to `NostrClient` login methods (`loginWithExtension`, `connectRemoteSigner`, `useStoredRemoteSigner`, `registerPrivateKeySigner`) to allow pre-session security checks.
- Update `nip07.js`, `nip46.js`, and `nsec.js` providers to inject `accessControl` checks via the new validator hook, ensuring consistent enforcement of whitelists/blacklists before activating the signer.
- This creates a unified "harness" for all signing methods within `NostrClient` while keeping business logic (access control) in the service layer.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-28 04:22:55 +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