Commit Graph
102 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 64d862ffb3 fix(build): enforce Node >=22 in package.json
Updates the `engines.node` field in `package.json` from `>=20` to `>=22` to align with the project's documentation (`README.md`) and requirements. This change ensures that build environments (e.g., 4everland) fail early if an incompatible Node.js version is used, prompting necessary environment upgrades and preventing silent build failures or missing version injection.

References:
- README.md: "The project requires Node.js v22 or higher."
- Issue: Missing version footer on deployed site due to Node 20 environment.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 13:07:40 +00:00
google-labs-jules[bot]andPR0M3TH3AN bc2f082fca Fix: Enable build on Node 20 and harden version injection
- Relaxed `engines.node` in `package.json` from `>=22` to `>=20` to match the hosting environment (Node 20.x), resolving strict engine failures during install.
- Modified `scripts/build-dist.mjs` to throw an error (instead of warning) if version injection fails, preventing silent failures.
- Updated `npm run build` to include `verify:dist:deploy-artifact` as a mandatory post-build step, ensuring the final artifact contains the expected version markup.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 12:45:56 +00:00
thePR0M3TH3AN 9992fc3acb [ci] verify deployed index artifact and enforce release checks 2026-02-10 17:20:42 -05:00
thePR0M3TH3AN 6fce210044 [ci] verify dist deploy artifact and force HTML cache purge 2026-02-10 16:52:05 -05:00
google-labs-jules[bot]andPR0M3TH3AN bf49ed7e3f Fix broken Tailwind CSS in dist build by bundling imports
- Switched from `tailwindcss` CLI to `postcss-cli` in `build:css` script to robustly handle PostCSS plugins.
- Installed `postcss-import` and `postcss-cli` as dev dependencies.
- Updated `postcss.config.cjs` to include `postcss-import` before `tailwindcss`.
- Removed `--minify` from `build:css` command as `cssnano` was stripping critical CSS variables from `tokens.css`.
- This ensures `tokens.css` is correctly inlined into `tailwind.generated.css`, fixing undefined variables that caused broken styles in the distribution build.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-10 21:31:20 +00:00
thePR0M3TH3AN c36a240394 Add cache-safe deploy smoke checks for unstable releases 2026-02-10 01:16:17 -05:00
thePR0M3TH3AN 17f7282a86 [ci] add dist hash diffing and targeted cache purge flow 2026-02-10 01:00:42 -05:00
thePR0M3TH3AN eeb2db9037 [playback] Harden service-worker rollout and rollback guardrails 2026-02-10 00:56:33 -05:00
thePR0M3TH3AN 7289bfe0f4 Add lint check for hashed dist asset references 2026-02-10 00:48:28 -05:00
Claude 804b3323c4 Add code health lint guards, consolidate relay constants, document agent prompts
Three CI-enforced lint scripts to prevent common codebase growth problems:

- lint:file-size — enforces 1000-line max for new JS files, grandfathers
  existing oversized files and prevents them from growing further
- lint:innerhtml — tracks innerHTML usage per-file with a baseline count,
  blocks new innerHTML additions (guides agents toward safe DOM APIs)
- Relay constants consolidated from duplicate definitions in client.js and
  ConnectionManager.js into shared js/nostr/relayConstants.js
- AGENTS.md Section 13: documents all three rules with examples
- docs/scheduled-agent-prompts.md: copy-paste prompts for recurring
  file decomposition, innerHTML migration, and constant dedup tasks

https://claude.ai/code/session_01LzErpH9FNw4hAPsjoYb1v9
2026-02-10 03:25:18 +00:00
thePR0M3TH3AN 1124707ab9 Merge branch 'unstable' into refactor-publishVideo-method-129817906368864748 2026-02-09 19:49:45 -05:00
google-labs-jules[bot]andPR0M3TH3AN ab8c46d54d Refactor publishVideo logic and fix signer tests
- Extracted prepareVideoPublishPayload and prepareVideoMirrorOptions to js/nostr/videoPayloadBuilder.js
- Created js/utils/cryptoUtils.js and js/utils/mime.js
- Updated js/nostr/client.js to use new builder and helpers
- Fixed SignerManager permission hydration and session actor logic
- Fixed nostrClientRegistry update logic
- Fixed unit tests: nostr-private-key-signer, integration-remote-flow, dmSignalEvents

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-09 21:32:29 +00:00
google-labs-jules[bot]andPR0M3TH3AN 1569ce074f feat(perf): accelerate load test signing with WASM
Replaces pure JS `finalizeEvent` with `nostr-tools/wasm` implementation in `scripts/agent/load-test.mjs`.
This reduces signing time from ~6ms to ~1ms per event (5x-6x speedup), significantly increasing the event generation throughput capacity of the load test agent.

- Adds `nostr-wasm` to devDependencies.
- Updates `scripts/agent/load-test.mjs` to initialize and use WASM crypto.
- Adds `benchmarks/signing_benchmark.mjs` to verify performance gains.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-09 18:35:26 +00:00
thePR0M3TH3AN 22fcc97672 Merge pull request #2174 from PR0M3TH3AN/ai/smoke-tests-20260207-2355643236623905980
chore(ai): add smoke test script (agent)
2026-02-07 16:34:40 -05:00
thePR0M3TH3AN 75474e191c Merge pull request #2159 from PR0M3TH3AN/ai/deps-playwright-v1.58.2-6424352935185782190
chore(ai): bump playwright to 1.58.2
2026-02-07 16:22:01 -05:00
google-labs-jules[bot]andPR0M3TH3AN 0f626c8ce7 chore(ai): add smoke test script (agent)
- Adds `scripts/agent/smoke-test.mjs` to verify key flows:
  - Local relay setup
  - Local HTTP server (npx serve)
  - `NostrClient` integration (Node.js)
  - Frontend UI verification (Playwright)
  - Login, Video Publish, DM Decryption
- Adds `test:smoke` script to `package.json`
- Generates reports in `artifacts/`

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 21:20:00 +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 beb3cffc2e docs(ai): improve onboarding steps and enforce node version
- Added `engines` field to `package.json` to enforce Node.js >=22.
- Updated `CONTRIBUTING.md` to specify prerequisites and clarify build commands.
- Created `ONBOARDING_REPORT.md` with audit findings.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 08:06:36 +00:00
google-labs-jules[bot]andPR0M3TH3AN 6caf650d52 feat(scripts): add load test script for relay stress testing
- Implements `scripts/agent/load-test.mjs` to simulate N clients publishing mixed events.
- Adds `test:load` script to `package.json`.
- Measures roundtrip latency and client-side signing time.
- Generates JSON report in `artifacts/`.
- Includes `--mock` mode for verification without external relay.
- Enforces guardrails against public relay usage.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-06 19:31:00 +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 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
thePR0M3TH3AN d639d0f2df Merge pull request #2038 from PR0M3TH3AN/ai/fix-css-loading-4566247044884119741
Fix CSS loading and start script configuration
2026-02-01 10:18:01 -05:00
google-labs-jules[bot]andPR0M3TH3AN a0a5ed7e78 Fix CSS loading by removing force flag from redirects and updating start script
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-01 14:31:30 +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
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
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
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 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
thePR0M3TH3AN 8637cff173 Merge pull request #1971 from PR0M3TH3AN/ai/docs-update-YYYYMMDD-1055396062770171148
Update documentation and build scripts
2026-01-30 10:04:58 -05:00
thePR0M3TH3AN 73add3a387 Merge branch 'unstable' into ai/onboarding-20260130-10223342974187330616 2026-01-30 09:26:29 -05:00
thePR0M3TH3AN 667b48c301 Merge branch 'unstable' into telemetry-aggregation-fix-6349074633801704985 2026-01-30 09:19:03 -05:00
google-labs-jules[bot]andPR0M3TH3AN 8f7a69ee29 docs(ai): update quickstart and contributing (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 14:18:14 +00: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 3302b5700a Use direct tailwindcss executable in build:css
- Replace `npx tailwindcss` with `tailwindcss` in `package.json` scripts.
- Improves build reliability by avoiding npx lookup issues in CI environments.
- Verified build success locally.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 06:49:24 +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 8fd9fb4a18 chore: Add daily design system audit script
- Add `audit` script to `package.json`.
- Add `scripts/daily-design-system-audit.mjs` implementation.
- Update `scripts/daily-design-system-audit.mjs` to explicitly lint `css/docs.css`.
- Revert changes to `lint:css` in `package.json` to prevent potential CI regressions.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-29 16:53:51 +00:00
google-labs-jules[bot]andPR0M3TH3AN 83622c53ef chore: Enhance daily design system audit script and config
- Add `audit` script to `package.json` to run `scripts/daily-design-system-audit.mjs`.
- Update `lint:css` to include `css/docs.css` for better coverage.
- Improve `scripts/daily-design-system-audit.mjs` parsing logic for Hex and CSS violations to better handle output formats.
- Generate `REMEDIATION_REPORT.md` with current audit results (No violations).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-29 16:05:37 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0bfa3b08e8 fix(ci): fix netlify deployment by building to dist
- Move from root publishing to clean `dist/` directory
- Create `scripts/build-dist.mjs` to orchestrate build and copy assets
- Update `package.json` build script
- Update `netlify.toml` to publish `dist/`
- Ignore `dist/` in `.gitignore`

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-29 09:07:15 +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 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