Commit Graph
73 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 314cf01ac1 chore: remove unused NIP-46 constants exports
Removed `export` from `NIP46_SESSION_STORAGE_KEY`, `NIP46_PUBLISH_TIMEOUT_MS`, `NIP46_RESPONSE_TIMEOUT_MS`, `NIP46_SIGN_EVENT_TIMEOUT_MS`, and `NIP46_MAX_RETRIES` in `js/nostr/nip46Client.js` as they are only used internally.
Updated `js/nostr/client.js` to remove unused imports of these constants.
Verified that `NIP46_HANDSHAKE_TIMEOUT_MS` and `NIP46_AUTH_CHALLENGE_MAX_ATTEMPTS` are used in `js/nostr/client.js` and thus remain exported.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 21:45:47 +00:00
google-labs-jules[bot]andPR0M3TH3AN ed60d18e15 chore(ai): bump playwright to 1.58.2
- Updated playwright and @playwright/test to 1.58.2.
- Updated dependency tracking issues for nostr-tools, stylelint, and esbuild.
- Included dependency scan artifacts in description.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 09:23:23 +00:00
google-labs-jules[bot]andPR0M3TH3AN 302e2f3e67 Fix: Ensure hashtag interests drive the video feed engine
Updated `NostrClient.subscribeVideos` to accept dynamic tags for filtering.
Integrated `HashtagPreferencesService` into `NostrService` to refresh the video subscription whenever user interests change.
This ensures the main video feed correctly reflects the user's selected hashtags by fetching matching content from relays.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 16:45:47 +00:00
google-labs-jules[bot]andPR0M3TH3AN e43a1794fd Fix package-lock.json sync issue for CI
Regenerated package-lock.json to ensure consistency with package.json dependencies.
This resolves the `npm ci` failure in GitHub Actions ("Missing: @noble/[email protected]"), ensuring all dependencies including `jsdom` and `stylelint` are correctly installed for tests and linting.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 13:44:37 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9a7c475b63 Fix package-lock.json sync issue for CI
Updated package-lock.json by running a clean install to match package.json dependencies.
This resolves the `npm ci` failure in GitHub Actions ("Missing: @noble/[email protected]"), ensuring all dependencies including `jsdom` and `stylelint` are correctly installed for tests and linting.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 13:37:19 +00:00
google-labs-jules[bot]andPR0M3TH3AN cab964e41e Fix user block list decryption timeout and state wiping
Refactored `js/userBlocks.js` to handle NIP-07 decryption timeouts gracefully.
Previously, if a background decryption timed out (common with busy extensions or queues), the user's block list was reset to an empty state, exposing them to blocked content until the next successful retry.
The fix ensures that if a timeout occurs, the existing (stale) block list is preserved while a retry is scheduled in the background.
Also increased the `BACKGROUND_DECRYPT_TIMEOUT_MS` from 2500ms to 5000ms to reduce false positives.

Added `tests/user-blocks-decryption.test.mjs` to verify the fix and audit the decryption flow.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 13:31:48 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2f33992192 Fix dependencies (jsdom/nostr-tools conflict) and WebTorrent regression
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-01 13:32:00 +00:00
thePR0M3TH3AN 438f895dd6 Merge branch 'unstable' into fix-webtorrent-webseed-regression-10274894627332192935 2026-02-01 08:00:23 -05:00
google-labs-jules[bot]andPR0M3TH3AN 24fe7f0005 Fix Netlify build and WebTorrent webseed checks
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 23:05:39 +00:00
google-labs-jules[bot]andPR0M3TH3AN 63dacbdef8 Fix WebTorrent webseed checks and resolve CI/test failures
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 22:36:47 +00:00
google-labs-jules[bot]andPR0M3TH3AN ffd8f0e23c fix: Sync package-lock.json and fix tests for nostr-tools v2
- Synced `package-lock.json` with `package.json` to resolve `npm ci` failures.
- Updated `nostr-tools` dependencies to resolve conflicts.
- Fixed `SyntaxError` in `tests/nostr-login-permissions.test.mjs` caused by duplicate code.
- Updated `js/nostr/client.js`, `js/nostr/publishHelpers.js`, `js/nostr/adapters/nsecAdapter.js`, `js/nostr/nip46Client.js` to use `hexToBytes` helper when calling `nostr-tools` functions, as v2+ expects `Uint8Array` instead of hex strings.
- Added `hexToBytes` helper in `js/utils/hex.js`.
- Updated tests (`tests/nostr/dm-direct-message-flow.test.mjs`, `tests/nostr-send-direct-message.test.mjs`, `tests/nostr-private-key-signer.test.mjs`, `tests/nostr/nip46Client.test.js`) to use `Uint8Array` for keys where required.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 19:56:44 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2b07311832 fix(webtorrent): ensure webseed-only streams are marked healthy
Previously, `probePeers` would mark a stream as unhealthy if no P2P peers were found, even if a valid webseed was present. This caused the UI to disable playback for webseed-only content.

This fix:
1. Updates `js/webtorrent.js` to return `healthy: true` (reason: "webseed") if `peers === 0` but `hasWebSeed` is true.
2. Adds `tests/webtorrent-regression.test.mjs` to verify this behavior.
3. Fixes `package-lock.json` to resolve inconsistencies with `esbuild` versions that were causing CI build failures.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 19:14:57 +00:00
thePR0M3TH3AN 3ea7cc3c64 Merge branch 'unstable' into ai/fuzz-targets-20260131-17598416067342863881 2026-01-31 13:50:37 -05:00
thePR0M3TH3AN 394dec1ad2 Merge branch 'unstable' into chore/design-system-audit-report-12130445815758743012 2026-01-31 13:49:21 -05:00
thePR0M3TH3AN daa9161f96 Merge branch 'unstable' into agent/automated-pr-review-fixes-3637557005884121646 2026-01-31 13:48:46 -05:00
thePR0M3TH3AN f58b9f709e Merge branch 'unstable' into ai/deps-safe-upgrades-3374834892089585189 2026-01-31 13:46:34 -05:00
thePR0M3TH3AN 4fc101f7ce Merge branch 'unstable' into ai/changelog-20260131-14640726990701590988 2026-01-31 13:44:21 -05:00
google-labs-jules[bot]andPR0M3TH3AN a0daeb8e63 feat: add fuzz testing harnesses and fix build dependencies
- Add fuzz testing harnesses for `nostrEventSchemas.js`, `dmDecryptor.js`, and `magnetUtils.js`.
- Move build-critical devDependencies (`cross-env`, `esbuild`, `nostr-tools`) to dependencies to fix Netlify deployment failure.
- Harmonize fuzzing iterations to 50,000.
- Add documentation headers to fuzz scripts.
- Verified robustness of fuzz targets (no crashes found).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 17:26:47 +00:00
google-labs-jules[bot]andPR0M3TH3AN 8390476bdf fix(ai): repair CI build dependencies and test reliability (agent)
- Move build/runtime deps (`nostr-tools`, `esbuild`, `autoprefixer`, `@tailwindcss/typography`, `cross-env`) to `dependencies` for production builds.
- Resolve duplicate package entries in `package.json`.
- Fix open handle (timeout leak) in `hashtagPreferencesService.js`.
- Fix flaky test mock in `hashtag-preferences.test.mjs`.
- Fix runtime variable error in `nostr/client.js`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 16:11:21 +00:00
google-labs-jules[bot]andPR0M3TH3AN 8c24fc36df fix: remove duplicate @noble/hashes dependency and move cross-env to dependencies
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 16:08:51 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9a7a9ba65e fix(ai): fix CI build and test failures (agent)
- Move `nostr-tools`, `esbuild`, `cross-env` to `dependencies` to ensure availability in production builds.
- Remove duplicate dependencies (`autoprefixer`, `@noble/hashes`, `@tailwindcss/typography`) to fix potential version conflicts.
- Fix timeout leak in `hashtagPreferencesService.js`.
- Fix test mock in `hashtag-preferences.test.mjs` to prevent timeouts.
- Update `nostrClient` permission request to use correct constant.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 16:04:35 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9c682040c5 fix(build): remove duplicate dependencies from devDependencies
- Removes `@noble/hashes`, `@tailwindcss/typography`, and `autoprefixer` from `devDependencies`.
- These packages are already listed in `dependencies` (sometimes with mismatched versions), which violates the project's dependency guidelines and can cause build instability on CI platforms like Netlify.
- Updates `package-lock.json` via `npm install`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 10:41:56 +00:00
google-labs-jules[bot]andPR0M3TH3AN 8588473ca9 chore(ai): bump playwright, autoprefixer and document dependency status
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 09:22:51 +00:00
google-labs-jules[bot]andPR0M3TH3AN df938c7564 chore(ai): CI health fixes (flaky tests, deps, deploy)
- Fix flaky `tests/hashtag-preferences.test.mjs` by correcting mock implementation for `fetchListIncrementally`.
- Fix `tests/nostr-login-permissions.test.mjs` failure by requesting correct permissions in `js/nostr/client.js` (ReferenceError fix).
- Fix 90s timeout in `HashtagPreferencesService` by clearing the timeout timer upon successful decryption.
- Correct `package.json` dependency classification:
  - Remove duplicate devDependencies (`autoprefixer`, `@tailwindcss/typography`) that are already in `dependencies`.
  - Ensure build-critical tools (`tailwindcss`, etc.) are in `dependencies` to survive `npm prune --production` on Netlify.
  - Install `esbuild` and `cross-env` as devDependencies.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 03:27:16 +00:00
google-labs-jules[bot]andPR0M3TH3AN 65f28991a7 fix(test): remove duplicate variable declaration in batch fetch profile test
Resolves a SyntaxError where 'originalReadRelays' was declared twice in 'tests/app-batch-fetch-profiles.test.mjs', causing CI failures. This change ensures the test file parses and runs correctly.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 15:51:44 +00:00
thePR0M3TH3AN 73add3a387 Merge branch 'unstable' into ai/onboarding-20260130-10223342974187330616 2026-01-30 09:26:29 -05:00
google-labs-jules[bot]andPR0M3TH3AN 7ddbec32b8 chore: update cross-env and package-lock.json to fix CI build
- Updated `cross-env` to latest version.
- Updated `package-lock.json` to resolve build warnings and potential CI cache issues.
- Includes previous test fixes and onboarding report.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 10:16:07 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0960d3612d fix(ci): move @tailwindcss/typography to dependencies
- Move `@tailwindcss/typography` from `devDependencies` to `dependencies`.
- This ensures it is available during Netlify's production build, which prunes `devDependencies` but requires this plugin for `tailwind.config.cjs`.
- Fixes "Deploy failed" errors related to build script failures.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 02:43:42 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7995c23229 fix(ci): move build deps to dependencies
- Move `tailwindcss`, `autoprefixer`, and `postcss` to `dependencies` to ensure they are available during Netlify build (which defaults to production environment).
- Keep version compatibility with v3.
- (Implicit) Includes the `package-lock.json` update.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 02:40:10 +00: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
thePR0M3TH3AN ce44411c2c Merge branch 'unstable' into fix-ci-npm-lock-sync-3809500453695394059 2026-01-27 14:55:47 -05:00
google-labs-jules[bot]andPR0M3TH3AN 8471e589e8 fix(deps): update package-lock.json to sync with package.json
Run `npm install` to regenerate `package-lock.json`, ensuring that all dependencies (including `@noble/hashes`) are correctly resolved and synchronized with `package.json`. This resolves the `npm ci` failure in the CI environment.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 19:54:43 +00:00
thePR0M3TH3AN 36254d0a0c Merge branch 'unstable' into fix-npm-ci-noble-hashes-12361867573265667733 2026-01-27 14:54:41 -05:00
google-labs-jules[bot]andPR0M3TH3AN 19bc401296 Fix npm ci failure by resolving @noble/hashes dependency conflict
Explicitly adds @noble/[email protected] to devDependencies to satisfy the peer dependency of @exodus/bytes (used by jsdom), resolving the conflict with nostr-tools which requires version 1.3.1. Regenerates package-lock.json to include the correct versions.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 19:50:30 +00:00
google-labs-jules[bot]andPR0M3TH3AN aa7f4c6902 fix(deps): explicitly add @noble/[email protected] to resolve conflicts
Explicitly adds `@noble/[email protected]` to `package.json` dependencies.
This resolves a `peerDependencies` conflict where `@exodus/bytes` (a dependency
of `jsdom`) requires `@noble/hashes` ^1.8.0 || ^2.0.0, but `nostr-tools`
requires version 1.3.1.

By adding it to the root project, `npm` can correctly hoist version 2.0.1 for
`@exodus/bytes` while keeping version 1.3.1 nested for `nostr-tools`.
This fixes `npm ci` failures in CI environments that strictly validate the lockfile.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 19:47:12 +00:00
google-labs-jules[bot]andPR0M3TH3AN bc51f21c0d Fix profile modal opening latency by deferring expensive UI updates
The profile modal was slow to open (~100ms+ delay) when a user has many trusted contacts, blocked users, or moderation reports, because `refreshModerationSettingsUi` and `populateBlockedList` were called synchronously before making the modal visible.

This change refactors `ProfileModalController.show()` to:
1. Render the header synchronously (fast).
2. Call `open()` immediately to make the modal visible.
3. Defer expensive data population (`refreshModerationSettingsUi`, `populateBlockedList`, `refreshWalletPaneState`) to the next animation frame using `requestAnimationFrame`.

This significantly improves the perceived responsiveness of the profile button.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 19:03:03 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3fe7633898 Fix docs content loading by vendoring marked and highlight.js
The documentation system relied on external CDNs for `marked` and `highlight.js`. This caused content loading failures ("Error loading content") when CDNs were blocked or unreachable.

This change:
- Adds `marked` and `highlight.js` to `package.json` dependencies.
- Vendors `marked.min.js` (from UMD build) and `highlight.min.js` (downloaded) into `vendor/`.
- Updates `index.html` to load these libraries from local `vendor/` path instead of CDN.

Verified with Playwright script ensuring docs content loads successfully.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 15:43:24 +00:00
google-labs-jules[bot]andPR0M3TH3AN 37abdd737f Fix CI build failure by adding missing devDependencies
- Added `http-server` and `serve` to `devDependencies`.
- This resolves CI failures where `npx` commands for `http-server` (used in Playwright) and `serve` (used in start scripts) would fail or block due to implicit installation restrictions.
- `package-lock.json` updated to reflect new dependencies.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 14:37:40 +00:00
google-labs-jules[bot] 603b0b1a69 test(ai): add unit tests for NostrClient and NostrService (agent) 2026-01-26 14:09:53 +00:00
google-labs-jules[bot] 4a0b81ad98 chore(ai): remove dead code (unused exports & deps) 2026-01-24 20:28:53 +00:00
google-labs-jules[bot] f1b124f4e2 chore(ai): bump playwright to 1.58.0 and dependency scan
- Upgraded @playwright/test and playwright to ^1.58.0
- Generated dependency scan artifacts (npm-audit, npm-outdated)
- Documented issues for nostr-tools version mismatch and webtorrent upgrade
2026-01-24 09:44:41 +00:00
thePR0M3TH3AN b5e4108c7f Merge pull request #1574 from PR0M3TH3AN/ai/deps-prettier-v3.8.1-7895586900291761925
chore(ai): bump prettier to 3.8.1
2026-01-23 08:25:37 -05:00
google-labs-jules[bot] 28009deae7 chore(ai): bump prettier to 3.8.1
Upgraded prettier to 3.8.1 (safe patch upgrade).
Ran security scan (0 vulnerabilities).
Identified other outdated dependencies (see PR description).
2026-01-23 09:36:20 +00:00
google-labs-jules[bot] a524f229dc docs(ai): improve onboarding steps
Updates CONTRIBUTING.md with troubleshooting tips and clarifications on build commands.
Updates package-lock.json to resolve caniuse-lite outdated warning.
Adds onboarding audit report.

Signed-off-by: Jules <[email protected]>
2026-01-23 08:18:41 +00:00
google-labs-jules[bot] c8b594feeb chore(ai): add smoke test script (agent)
- Updated scripts/agent/smoke-test.mjs with header and verification
- Updated package-lock.json (dependencies)
2026-01-22 21:38:27 +00:00
google-labs-jules[bot] f75531d2db chore(ai): format sources and fix moderation bugs (agent)
- Format `css/tailwind.source.css` with Prettier.
- Add allowlist entry for `VideoCard.js` media query pixel value in `scripts/check-design-tokens.mjs`.
- Remove accidental artifact `js/ui/dm/jules_session_4520373547615093905.zip`.
- Fix bug in `js/app.js` and `js/services/moderationActionController.js` where blocked users' videos were not correctly hidden in the UI immediately after blocking.
- Fix bug in `tests/app/moderation-overrides.test.mjs` where `userBlocks` mocks were insufficient to reflect state changes.
2026-01-22 14:58:35 +00:00
google-labs-jules[bot] 18e3be5f40 chore(ai): bump prettier to 3.8.1 and perform dependency scan
- Perform `npm audit` and `npm outdated` (artifacts included).
- Update `prettier` to 3.8.1 (safe devDependency upgrade).
- Remove accidentally committed/leftover session file `js/ui/dm/jules_session_4520373547615093905.zip` which caused lint errors.
- Pre-existing lint error in `js/ui/components/VideoCard.js` and test failure in `tests/app/moderation-overrides.test.mjs` were identified and verified as unrelated.
2026-01-22 09:23:52 +00:00
google-labs-jules[bot] 4daa41a91b chore(ai): add smoke test script (agent) 2026-01-20 21:32:55 +00:00
google-labs-jules[bot] 903f63c88f chore(ai): CI health fixes (flaky tests)
- Fix `tests/moderation-service.test.mjs` failing with `nostr-extension-missing` by injecting dependency.
- Fix circular dependency in `js/nostr/commentEvents.js` causing `tests/nip71-base-event-tags.test.mjs` to fail.
- Update `package-lock.json` via `npm audit fix`.
2026-01-19 03:02:23 +00:00
google-labs-jules[bot] 74c5bac4e0 chore(ai): add smoke test script (agent) 2026-01-18 21:35:07 +00:00