Commit Graph
4625 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 1243d45ebb fix(ai): ignore issues/ and scripts/agent/ in all linters
- Explicitly ignore `issues/` and `scripts/agent/` in `scripts/check-design-tokens.mjs` and `scripts/check-inline-styles.mjs`.
- This ensures CI passes even if documentation or diagnostic scripts contain elements that resemble lint violations (e.g. hex-like strings or bracket-like patterns), addressing persistent CI failures.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 18:44:10 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2b9dd59398 fix(ai): allow hex-like strings in security review issue
- Add issues/** and scripts/agent/** to check-hex.js ignore list
- This prevents CI lint failures when documentation or scripts contain hex-like strings (e.g. in URLs or comments) that are not CSS colors.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 18:35:30 +00:00
google-labs-jules[bot]andPR0M3TH3AN e922d01da7 fix(ai): frontend console error — report nostr-tools version mismatch (agent)
- Add scripts/agent/debug_frontend.py for diagnosing console errors
- Add issues/requires-security-review-nostr-tools-upgrade.md documenting version mismatch
- Mismatch between package.json (^2.19.4) and runtime (2.17.0) causes protocol errors

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 18:25:46 +00:00
thePR0M3TH3AN d999b79e5a Merge pull request #2011 from PR0M3TH3AN/ai/onboarding-20250129-12232766230754991727
docs(ai): improve onboarding steps and fix unit tests
2026-01-31 10:23:04 -05:00
thePR0M3TH3AN 525fc049be Merge pull request #2014 from PR0M3TH3AN/ai/tests-profile-cache-20250220-7730745390613459017
Add unit tests for ProfileCache
2026-01-31 10:20:47 -05:00
thePR0M3TH3AN cffbe26c04 Merge pull request #2007 from PR0M3TH3AN/ai/refactor-profile-modal-20231026-3866161108178541875
Refactor handleAddProfile to ProfileModalController
2026-01-31 10:18:13 -05:00
thePR0M3TH3AN d622feae7e Merge pull request #2006 from PR0M3TH3AN/ai/ci-health-20250222-10294193962202990825
chore(ai): CI health fixes (flaky tests)
2026-01-31 10:17:17 -05:00
google-labs-jules[bot]andPR0M3TH3AN a39e7d832d test(ai): add unit tests for profileCache (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 11:24:53 +00:00
google-labs-jules[bot]andPR0M3TH3AN be43c266e0 fix(test): resolve hangs in multiple unit tests and harden runner
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 10:33:50 +00:00
google-labs-jules[bot]andPR0M3TH3AN 42a18fa784 fix(test): resolve hangs in multiple unit tests
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 10:13:24 +00:00
google-labs-jules[bot]andPR0M3TH3AN de7a215f77 fix(test): resolve hang in nostr-login-permissions test
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 09:23:29 +00:00
google-labs-jules[bot]andPR0M3TH3AN ec3691e659 docs(ai): improve onboarding steps and fix unit tests
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 08:54:59 +00:00
google-labs-jules[bot]andPR0M3TH3AN 1c12cc0d17 refactor(ai): extract handleAddProfile from js/app.js (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 04:20:24 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2c5fc53f3f refactor(ai): extract handleAddProfile from js/app.js (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 04:05:20 +00:00
google-labs-jules[bot]andPR0M3TH3AN f5e16f296e refactor(ai): extract handleAddProfile from js/app.js (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 03:55:51 +00:00
google-labs-jules[bot]andPR0M3TH3AN 4fd8f5203e chore(ai): CI health fixes (flaky tests, deps cleanup)
- Fix flaky `tests/hashtag-preferences.test.mjs` by correcting mock implementation.
- Fix `tests/nostr-login-permissions.test.mjs` failure by requesting correct permissions in `js/nostr/client.js`.
- Fix 90s timeout in `HashtagPreferencesService` by clearing the timeout timer properly.
- Clean up `package.json` by removing duplicate devDependencies (`autoprefixer`, `@tailwindcss/typography`) that are already in `dependencies`.
- Ensure `tailwindcss`, `postcss`, `autoprefixer`, and `@tailwindcss/typography` are in `dependencies` for robust production builds.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 03:33:30 +00:00
google-labs-jules[bot]andPR0M3TH3AN 51087fad7e refactor(ai): extract handleAddProfile from js/app.js (agent)
Moves `handleAddProfile` logic from the main application class into `ProfileModalController` to improve separation of concerns as per `AGENTS.md`.

- Extracts `handleAddProfile` to `js/ui/profileModalController.js`.
- Updates `ProfileModalController` to handle add account flow internally.
- Removes legacy callback wiring from `js/app.js` and `js/ui/applicationBootstrap.js`.
- Adds unit tests for the extracted logic in `tests/ui/profileModalController-addProfile.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 03:32:52 +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 daa97a827b chore(ai): CI health fixes (flaky tests) and variable correction
- 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.
- `npm install` was run to ensure dependencies like `jsdom` are present.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 03:14:30 +00:00
google-labs-jules[bot]andPR0M3TH3AN e027e6bba3 chore(ai): CI health fixes (flaky tests)
- 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`.
- Fix 90s timeout in `HashtagPreferencesService` by clearing the timeout timer upon successful decryption.
- `npm install` was run to ensure dependencies like `jsdom` are present for `tests/app/channel-profile-moderation.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-31 03:08:33 +00:00
thePR0M3TH3AN 8c331f8c14 Merge pull request #2002 from PR0M3TH3AN/revert-2001-fix-webseed-regression-9421879790599854924
Revert "Fix ignored webseeds in magnet links"
2026-01-30 17:04:31 -05:00
thePR0M3TH3AN 00899694b5 Revert "Fix ignored webseeds in magnet links" 2026-01-30 17:04:15 -05:00
thePR0M3TH3AN bdf1b140bd Merge pull request #2001 from PR0M3TH3AN/fix-webseed-regression-9421879790599854924
Fix ignored webseeds in magnet links
2026-01-30 17:01:43 -05:00
google-labs-jules[bot]andPR0M3TH3AN 2bebaa6465 fix(webtorrent): ensure magnet webseeds are used in stream
Extracts `ws` (web seed) parameters from the magnet link and merges them with the explicit `urlList` (e.g., from direct URL) when initializing the WebTorrent stream. This fixes a regression where magnet-embedded web seeds were ignored if a direct URL was provided.

- Updates `js/magnets.js` to parse `ws` parameters and export `webSeedsFromMagnet`.
- Updates `js/webtorrent.js` to merge magnet web seeds with `opts.urlList`.
- Adds regression test `tests/webtorrent-webseeds.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 22:01:13 +00:00
thePR0M3TH3AN 5b3db62513 Merge pull request #2000 from PR0M3TH3AN/revert-1996-ai/dead-code-cleanup-34771678735083742
Revert "Dead Code Cleanup"
2026-01-30 16:51:27 -05:00
thePR0M3TH3AN ceccd34681 Revert "Dead Code Cleanup" 2026-01-30 16:51:01 -05:00
thePR0M3TH3AN 5f42eccc32 Merge pull request #1999 from PR0M3TH3AN/codex/add-test-stubs-for-permission-scenarios
Add tests for permission deferral during NIP-07 login and list loads
2026-01-30 16:48:15 -05:00
thePR0M3TH3AN 80b3a2a8a5 Add permission deferral coverage for login flows 2026-01-30 16:48:03 -05:00
thePR0M3TH3AN 3db1bcf5fc Merge pull request #1998 from PR0M3TH3AN/ai/smoke-tests-20260130-7030837945485494375
chore(ai): add smoke test script (agent)
2026-01-30 16:29:49 -05:00
google-labs-jules[bot]andPR0M3TH3AN 3f9dd916a8 chore(ai): add smoke test script (agent)
- Adds `scripts/agent/smoke-test.mjs` for end-to-end regression testing.
- Verifies key flows: login, relay connect, publish video, publish DM, and DM decryption.
- Uses local relay (port 8899) and local HTTP server (port 8000).
- Generates JSON summary and logs in `artifacts/`.
- Includes Playwright frontend verification.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 21:29:19 +00:00
thePR0M3TH3AN 16e79d8179 Merge pull request #1997 from PR0M3TH3AN/codex/refactor-loginwithextension-permissions-handling
Defer NIP-07 permission prompts and surface status
2026-01-30 16:28:14 -05:00
thePR0M3TH3AN e77f5f3636 Defer NIP-07 permission prompts 2026-01-30 16:28:00 -05:00
thePR0M3TH3AN a5c7d3d496 Merge pull request #1995 from PR0M3TH3AN/codex/add-allowpermissionprompt-option-to-loadblocks
Defer block list permission prompts during login
2026-01-30 16:04:03 -05:00
thePR0M3TH3AN 94e92acc68 Merge pull request #1996 from PR0M3TH3AN/ai/dead-code-cleanup-34771678735083742
Dead Code Cleanup
2026-01-30 16:00:28 -05:00
google-labs-jules[bot]andPR0M3TH3AN 60fa6c4282 chore(ai): remove dead code (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 20:54:52 +00:00
thePR0M3TH3AN 7ef420e1e2 Defer block list permission prompts during login 2026-01-30 15:53:57 -05:00
thePR0M3TH3AN deec2cd573 Merge pull request #1994 from PR0M3TH3AN/codex/handle-auth-login-failures-and-permissions
Add permission CTA and retry flow for subscriptions & hashtag preferences
2026-01-30 15:40:12 -05:00
thePR0M3TH3AN acf73bc5a3 Add permission CTA for subscriptions and hashtags 2026-01-30 15:39:52 -05:00
thePR0M3TH3AN b9fb34b9cd Merge pull request #1993 from PR0M3TH3AN/fix/slow-login-and-list-loading-2798723397945382136
Fix slow login, list loading timeouts, and premature relay warnings
2026-01-30 15:32:54 -05:00
google-labs-jules[bot]andPR0M3TH3AN 6347ab0db1 fix(auth): optimize login speed and list decryption
- Reduced decryption timeout for user lists from 90s to 15s to fail faster.
- Optimized NIP-07 decryption calls to avoid retries and long timeouts during critical loading paths.
- Fixed a bug where `loginWithExtension` triggered `getPublicKey` twice, doubling the user interaction time.
- Added a 10s grace period for relay health warnings to prevent false positives on startup.
- Verified `deferBlocks` logic in `authService` prevents blocking the login UI on slow list decryption.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 20:31:24 +00:00
thePR0M3TH3AN 13f8b9f6aa Merge pull request #1992 from PR0M3TH3AN/ai/load-test-20260130-10083516329292925442
chore(ai): add load test report for 2026-01-30
2026-01-30 15:14:47 -05:00
thePR0M3TH3AN 6402187e25 Merge pull request #1991 from PR0M3TH3AN/fix-list-loading-and-nip07-slow-8603447107550191074
Fix list loading and optimize NIP-07 login
2026-01-30 14:54:34 -05:00
google-labs-jules[bot]andPR0M3TH3AN 6bf3e95a4f Fix list loading reliability and optimize NIP-07 login performance
- Fixes issue where user lists (subscriptions, blocks) fail to load if local cache is stale but metadata store is fresh.
- Updates `js/userBlocks.js` and `js/subscriptions.js` to persist `createdAt` timestamp and use it for incremental fetch `since` parameter.
- Optimizes `js/nostr/client.js` `ensureActiveSignerForPubkey` to reduce redundant `getPublicKey` calls to NIP-07 extension by 50%.
- Adds `preloadedPubkey` support to `createNip07Adapter`.
- Fixes `tests/subscriptions-manager.test.mjs` environment setup to allow CI to pass.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 19:53:04 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0890775b86 chore(ai): add load test report for 2026-01-30
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 19:49:12 +00:00
google-labs-jules[bot]andPR0M3TH3AN 5bdca14364 Fix list loading reliability and optimize NIP-07 login performance
- Fixes issue where user lists (subscriptions, blocks) fail to load if local cache is stale but metadata store is fresh.
- Updates `js/userBlocks.js` and `js/subscriptions.js` to persist `createdAt` timestamp and use it for incremental fetch `since` parameter.
- Optimizes `js/nostr/client.js` `ensureActiveSignerForPubkey` to reduce redundant `getPublicKey` calls to NIP-07 extension by 50%.
- Adds `preloadedPubkey` support to `createNip07Adapter`.
- Adds reproduction test for NIP-07 concurrency issue.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 19:35:05 +00:00
thePR0M3TH3AN 792473f56f Merge pull request #1989 from PR0M3TH3AN/fix/nip07-adapter-race-condition-531357967915833285
Fix NIP-07 adapter race condition for encrypted lists
2026-01-30 14:10:40 -05:00
google-labs-jules[bot]andPR0M3TH3AN 14dfedc98d Fix NIP-07 adapter race condition and CI test crashes
- Modified `js/nostr/adapters/nip07Adapter.js` to use dynamic getters for capabilities.
- Updated `js/nostr/client.js` to respect getter descriptors on signers.
- Fixed `tests/nostr-login-permissions.test.mjs` and `tests/nostr/adapters.test.mjs` to safely handle read-only global properties in CI.
- Added hardened regression test `tests/nostr/nip07Adapter-race-condition.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 19:04:55 +00:00
thePR0M3TH3AN e1a8cb41d2 Merge pull request #1990 from PR0M3TH3AN/ai/debug-frontend-20250212-838542710107527339
fix(ai): frontend console error — strip xs on localhost (agent)
2026-01-30 13:58:37 -05:00
google-labs-jules[bot]andPR0M3TH3AN 53a14a0dfe fix(ai): cleanup logging and use effective magnet in webtorrent.js
This commit refactors `js/webtorrent.js` to ensure the `stripXsParameter` helper is correctly used and its result (`effectiveMagnetURI`) is passed to `client.add()`.

- Refactored logic to use `effectiveMagnetURI` variable.
- Cleaned up conditional logging.
- Ensured consistent usage in `streamVideo`.

Tests run:
- `npm run lint`
- `npm run test:unit:shard1`
- `python3 scripts/agent/debug_frontend.py` (verified error is gone)

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 18:57:43 +00:00
google-labs-jules[bot]andPR0M3TH3AN 4f40025b9d fix(ai): frontend console error — strip xs on localhost (agent)
Diagnosed a CORS error on local development environment caused by WebTorrent fetching `.torrent` files from R2 buckets (via `xs` parameter) that do not allow localhost origin.

Modified `js/webtorrent.js` to strip the `xs` parameter from magnet links when running on `localhost` or `127.0.0.1`. This prevents the browser from attempting the blocked fetch request, resolving the console error while maintaining functionality (falling back to DHT/peers).

Verified using `scripts/agent/debug_frontend.py` which captures frontend console logs via Playwright.

Tests run:
- `npm run lint`
- `npm run test:unit:shard1`
- `python3 scripts/agent/debug_frontend.py` (verified error is gone)

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-30 18:53:25 +00:00