Commit Graph
5429 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 83499ae5c4 audit(tests): fix skipped auth tests and produce audit report
- Refactored `tests/auth-service.test.mjs` to use `node:test` API so it is detected by the runner.
- Removed console noise from `tests/watchHistory/watch-history-telemetry.test.mjs`.
- Generated daily audit report `test-audit-report-2026-02-12.md`.
- Updated test logs and tracking artifacts.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 14:36:45 +00:00
thePR0M3TH3AN 68b583fb9b Merge pull request #2382 from PR0M3TH3AN/perf/bound-comment-concurrency-6703856395977422565
perf: bound comment relay concurrency and fix docs port
2026-02-12 09:15:23 -05:00
thePR0M3TH3AN 45ab69ef78 Merge branch 'unstable' into perf/bound-comment-concurrency-6703856395977422565 2026-02-12 09:13:51 -05:00
thePR0M3TH3AN c6577c874d Merge pull request #2381 from PR0M3TH3AN/nip-compliance-audit-6030465474083437041
NIP Compliance Audit and Verification
2026-02-12 09:11:38 -05:00
thePR0M3TH3AN c41b83ca9a Merge pull request #2380 from PR0M3TH3AN/ai/lint-20260212-692706183802420406
chore(ai): verify lint compliance
2026-02-12 09:11:11 -05:00
thePR0M3TH3AN 65603fedfd Merge pull request #2378 from PR0M3TH3AN/ai/onboarding-20260212-15095221016580125533
docs(ai): improve onboarding steps
2026-02-12 09:10:32 -05:00
thePR0M3TH3AN 2540eb3c09 Merge pull request #2377 from PR0M3TH3AN/unstable-4082822914869153269
[constants] Refactor duplicate numeric constants
2026-02-12 09:10:12 -05:00
thePR0M3TH3AN 8bff7b3ad8 Merge pull request #2376 from PR0M3TH3AN/unstable-11604996520805801721
[security] Migrate searchView.js to safe DOM APIs
2026-02-12 09:09:50 -05:00
thePR0M3TH3AN e591767ec2 Merge pull request #2375 from PR0M3TH3AN/audit-report-unstable-8970526814582376174
Update Weekly Audit Report
2026-02-12 09:09:22 -05:00
thePR0M3TH3AN bbc93a1d72 Merge pull request #2374 from PR0M3TH3AN/content-audit-upload-docs-5907481948378405901
🌐 Align /content user docs with actual upload & contribution behavior
2026-02-12 09:08:30 -05:00
thePR0M3TH3AN 896373cb50 Merge pull request #2373 from PR0M3TH3AN/ai/ci-health-20260214-13930097721434955965
chore(ai): CI health fixes (flaky tests)
2026-02-12 09:07:59 -05:00
thePR0M3TH3AN eea1fde57d Merge pull request #2372 from PR0M3TH3AN/chore/todo-triage-14698517532806281682
chore(ai): Triage TODOs and report findings
2026-02-12 09:07:41 -05:00
google-labs-jules[bot]andPR0M3TH3AN 852bf51b0a refactor: extract CommentTargetNormalizer to fix file size violation
- Extracted `CommentTargetNormalizer` and related helpers to `js/nostr/commentTargetNormalizer.js`.
- Refactored `js/nostr/commentEvents.js` to import from the new module.
- Compacted helper functions in `js/nostr/commentTargetNormalizer.js` to ensure it stays under the 1000-line limit for new files.
- Verified with `npm run lint:file-size` and `tests/nostr/comment-events.test.mjs`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 13:49:47 +00:00
google-labs-jules[bot]andPR0M3TH3AN 4d73092613 perf: bound comment relay concurrency and fix docs port
- Replace `Promise.all` with `pMap` in `js/nostr/commentEvents.js` to limit concurrent relay requests to `RELAY_BACKGROUND_CONCURRENCY` (3).
- Update `content/docs/guides/upload-content.md` to use port 3000 for CORS, matching `npm start` default.
- Update agent artifacts (`CONTEXT.md`, `TODO.md`, `DECISIONS.md`, `TEST_LOG.md`, `INITIAL_BASELINE.md`).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 13:39:52 +00:00
google-labs-jules[bot]andPR0M3TH3AN 36d79afc55 feat: verify NIP compliance and add NIP-07 test
- Add `tests/compliance/nip07_compliance.test.mjs` to verify NIP-07 retry logic.
- Update `NIP_INVENTORY.md` with verified compliance status for NIPs 04, 07, 44, 51, 56, 65, and kinds 30078, 30079.
- Generate `nip-report-2026-02-12.md` summarizing findings.
- Update `TEST_LOG.md` and `TODO.md`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 13:38:26 +00:00
google-labs-jules[bot]andPR0M3TH3AN 87506f3a23 chore(ai): verify lint compliance
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 13:10:05 +00:00
google-labs-jules[bot]andPR0M3TH3AN 538fce992e docs(ai): improve onboarding steps
- Add `npm run lint` to README verification steps.
- Update CONTRIBUTING.md to clarify build prerequisites for linting.
- Update .devcontainer/devcontainer.json to use `npx playwright install --with-deps`.
- Generate ONBOARDING_REPORT.md.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 08:40:21 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2aae4094e7 [constants] refactor duplicate numeric constants
- Add `UI_FEEDBACK_DELAY_MS`, `DEBOUNCE_DELAY_MS`, and `NETWORK_RETRY_DELAY_MS` to `js/constants.js`.
- Replace magic numbers (5000, 2000, 1500) with semantic constants in:
  - `js/ui/notificationController.js`
  - `js/ui/profileModal/ProfileDirectMessageActions.js`
  - `js/ui/urlHealthController.js`
  - `js/app/uiCoordinator.js`
  - `js/ui/components/VideoModal.js`
  - `js/ui/components/UploadModal.js`
  - `js/services/dmNostrService.js`
  - `js/services/hashtagPreferencesService.js`
  - `js/app/feedCoordinator.js`
  - `js/services/moderationService.js`

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 03:43:03 +00:00
google-labs-jules[bot]andPR0M3TH3AN fd9daef40b [security] Remove innerHTML usage from searchView.js
Refactored `js/searchView.js` to use safe DOM APIs (`document.createElement`, `replaceChildren`, `textContent`) instead of `innerHTML`.
This reduces the attack surface for XSS vulnerabilities.
Updated `scripts/check-innerhtml.mjs` baseline.
Verified with unit tests and a frontend verification script.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 03:41:34 +00:00
google-labs-jules[bot]andPR0M3TH3AN 472e627192 docs: update weekly audit report for unstable branch
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 03:19:43 +00:00
google-labs-jules[bot]andPR0M3TH3AN afb3ed3a4b docs: align upload guide with verified codebase behavior
Updates `content/docs/guides/upload-content.md` to reflect the actual
implementation of the upload and playback workflows:
- Clarifies the 2GB file size limit as a client-side memory constraint.
- Explicitly instructs self-hosters to configure CORS with their instance domain.
- Adds the "External Link" flow to the upload lifecycle.
- Notes that playback priority (URL vs Torrent) depends on instance settings.
- Updates Advanced Options to mention IMETA variants.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 02:45:37 +00:00
google-labs-jules[bot]andPR0M3TH3AN 99e6fe3c9c chore(ai): CI health fixes (flaky tests)
Fix flaky test in `tests/hashtag-preferences.test.mjs` by using `waitFor` to handle async decryption timing. The previous implementation relied on direct assertion after a promise resolution, which was prone to microtask timing issues with `runNip07WithRetry`.

Also ran `npm audit` and `npm install` to ensure environment health, but no lockfile changes were needed.

Ref: https://github.com/bitvid/bitvid/issues/CI-HEALTH

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 02:23:29 +00:00
google-labs-jules[bot]andPR0M3TH3AN af7e439deb chore(ai): Triage TODOs and report findings
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 01:54:43 +00:00
thePR0M3TH3AN a090864bc2 Merge pull request #2371 from PR0M3TH3AN/fix-ci-and-visual-tests-990569406279712647
Fix CI configuration and unskip visual tests
2026-02-11 19:22:19 -05:00
google-labs-jules[bot]andPR0M3TH3AN 3571b52b13 fix(ci): unskip visual tests and align node versions
- Unskip `mobile sidebar shares desktop rail behavior` in `tests/visual/overlay-layers.spec.ts`.
- Enable visibility check in `tests/visual/moderation.spec.ts` (removed TODO).
- Update `daily-design-system-audit.yml` and `agent-pr-review.yml` to use Node.js 22.
- Set `fetch-depth: 0` in `ci.yml` build job to ensure `sw-compat` lint check runs.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 22:41:18 +00:00
thePR0M3TH3AN 37b1f48f1a Merge pull request #2370 from PR0M3TH3AN/nip-compliance-audit-4843223870475612808
NIP Compliance Audit & Verification Tests
2026-02-11 17:13:58 -05:00
thePR0M3TH3AN 1470434e3d Merge branch 'unstable' into nip-compliance-audit-4843223870475612808 2026-02-11 17:12:07 -05:00
google-labs-jules[bot]andPR0M3TH3AN 7054401c37 feat: add NIP compliance audit artifacts and regression tests
- Added `NIP_INVENTORY.md` tracking compliance status for all referenced NIPs/Kinds.
- Added `nip-report-2025-02-12.md` summarizing audit findings.
- Added `CONTEXT.md`, `TODO.md`, `DECISIONS.md`, `TEST_LOG.md`.
- Added automated regression tests in `tests/compliance/`:
  - `nip04_44_compliance.test.mjs`: Verifies encryption fallback logic.
  - `nip65_compliance.test.mjs`: Verifies relay list loading (Kind 10002).
  - `video_note_compliance.test.mjs`: Verifies video note (Kind 30078) structure and NIP-71 tagging.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 21:37:21 +00:00
thePR0M3TH3AN 78355b685b Merge pull request #2369 from PR0M3TH3AN/perf/bound-relay-concurrency-233457197976374344
perf: bound relay background concurrency to 3
2026-02-11 16:33:50 -05:00
google-labs-jules[bot]andPR0M3TH3AN d3fa684e45 perf: bound relay background concurrency to 3
Replaces unbounded `Promise.all(relays.map(...))` calls with `pMap` using a concurrency limit of 3 for background operations like history hydration, metadata fetching, and DM sending.
This prevents network saturation and potential main-thread jank when many relays are configured.
Includes benchmark verification script `benchmarks/relay_concurrency_repro.mjs`.
Audited upload docs and confirmed accuracy.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 21:31:53 +00:00
thePR0M3TH3AN 0607367f1a Merge pull request #2368 from PR0M3TH3AN/decompose-profile-modal-controller-1637476114002717833
Decompose ProfileModalController
2026-02-11 16:17:07 -05:00
google-labs-jules[bot]andPR0M3TH3AN 7300977a6d [decompose] extract DM and Relay controllers from ProfileModalController
Extracted ProfileDirectMessageController (split into Controller, Actions, Renderer, Helper) and ProfileRelayController from ProfileModalController to reduce file size and improve maintainability.

ProfileModalController.js size reduced from ~12000 lines to ~8750 lines.
Updated unit tests to reflect the new structure.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 21:15:06 +00:00
thePR0M3TH3AN 244f5f80a8 Merge pull request #2367 from PR0M3TH3AN/claude/fix-sync-and-dm-issues-NMShC
Fix NIP-07 adapter support and improve signer resolution
2026-02-11 15:01:35 -05:00
Claude 53b8a2609c fix: recognize NIP-07 signer type for extension permission pre-granting
The NIP-07 adapter uses type "nip07" but all permission pre-granting
checks only matched type "extension", causing NIP-07 browser extension
users to fail decryption for block/mute lists, subscriptions, DMs, and
watch history. Hashtag preferences appeared to work because their read
path had a separate fix, masking the systemic issue.

Changes:
- shouldRequestExtensionPermissions() now matches both "extension" and
  "nip07" signer types (central fix affecting DM signals, comments,
  publish helpers, and watch history fetch)
- buildDmDecryptContext() pre-grants extension permissions for NIP-07
- userBlocks.js: remove capabilities-gated decryptor check that failed
  with lazy NIP-07 module injection (same fix already in subscriptions.js);
  always resolve signer regardless of allowPermissionPrompt; increase
  fast-path relay timeout from 6s to 10s
- watchHistoryService: recognize NIP-07 type and always resolve signer
- All publish paths (blocks, subscriptions, hashtags, relays, uploads,
  sharing, moderation) now pre-grant permissions for NIP-07 signers

https://claude.ai/code/session_01PipsdaTQmw7wBTJ1LmJjkk
2026-02-11 19:41:53 +00:00
thePR0M3TH3AN b22ab427c8 Merge pull request #2366 from PR0M3TH3AN/ai/load-test-20250211-1287785161033109563
Load Test Report and Verification
2026-02-11 14:38:01 -05:00
google-labs-jules[bot]andPR0M3TH3AN f9d8f1737f Load Test Report and Verification
Executed the `scripts/agent/load-test.mjs` script with 1000 clients for 60 seconds against a local relay. The test passed successfully with ~86 events/sec throughput and <2ms latency.

Attached the generated load report: `artifacts/load-report-20260211.json`.

No cryptographic bottlenecks were identified (avg signing time 0.74ms).

Note: Added `!artifacts/load-report-*.json` to `.gitignore` to allow tracking of load reports.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 19:29:29 +00:00
thePR0M3TH3AN 617ec08666 Merge pull request #2363 from PR0M3TH3AN/perf-optimization-worker-transfer-9240404854716586294
⚡ Optimize Explore Data Worker Transfer
2026-02-11 12:38:10 -05:00
thePR0M3TH3AN 4862c7aea4 Merge pull request #2362 from PR0M3TH3AN/docs-playback-alignment-10640790855097534081
📘 Align development docs with codebase behavior
2026-02-11 12:30:48 -05:00
google-labs-jules[bot]andPR0M3TH3AN 99e904d7c1 Optimize explore data worker transfer with lightweight video objects
- Implements `toLightweightVideo` helper in `js/services/exploreDataService.js` to strip large fields (content, signatures, etc.) from video objects before sending to the worker.
- Updates `buildWatchHistoryTagCounts` and `buildTagIdf` to use lightweight objects.
- Adds `tests/services/exploreDataService.optimization.test.mjs` to verify correctness.
- Adds `benchmarks/worker_transfer_lightweight_bench.js` demonstrating ~40% improvement in transfer time.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 17:15:25 +00:00
google-labs-jules[bot]andPR0M3TH3AN 761a5a2dd2 docs: align playback strategy documentation with codebase behavior
Updates AGENTS.md and README.md to reflect the configurable hybrid playback strategy (URL vs. WebTorrent) instead of asserting a strict "URL-First" rule, which contradicted the default configuration.

- Updated "Mission" in AGENTS.md to "Hybrid Playback Strategy".
- Clarified that `DEFAULT_PLAYBACK_SOURCE` controls priority.
- Updated README.md "How playback works" section.
- Adjusted QA checklists to focus on "configured priority" rather than "URL-first".

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 17:00:12 +00:00
thePR0M3TH3AN 1d2118d15e Merge pull request #2361 from PR0M3TH3AN/ds-audit/2026-02-11-14522978470477659374
Update Daily Design System Audit Report
2026-02-11 11:25:35 -05:00
google-labs-jules[bot]andPR0M3TH3AN 288fd053c7 chore: Update Daily Design System Audit Report and Script
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 15:56:51 +00:00
thePR0M3TH3AN d07bf6308f Merge pull request #2360 from PR0M3TH3AN/ai/doc-events-cache-20250209-13537943595919351490
chore(ai): document js/nostr/managers/EventsCacheStore.js
2026-02-11 10:33:26 -05:00
thePR0M3TH3AN f89c812580 Merge pull request #2359 from PR0M3TH3AN/refactor-comment-normalization-8775062398993018564
Refactor normalizeCommentTarget into a class
2026-02-11 10:32:40 -05:00
google-labs-jules[bot]andPR0M3TH3AN 676f41d76d chore(ai): doc js/nostr/managers/EventsCacheStore.js (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 15:30:45 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7c462693a5 fix(ci): authenticate git fetch upstream with GITHUB_TOKEN
Explicitly injects the GITHUB_TOKEN into the upstream remote URL in the agent-pr-review workflow. This prevents authentication failures when fetching the upstream repository in CI environments where plain HTTPS URLs trigger interactive credential prompts.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 15:26:50 +00:00
google-labs-jules[bot]andPR0M3TH3AN 78e53a8a1d refactor: simplify comment target normalization logic
Introduces `CommentTargetNormalizer` class to decompose the complex `normalizeCommentTarget` function into smaller, state-managed methods. This improves readability and maintainability without changing the external API or behavior.

- Extracted logic into `extractPointers`, `resolveEventsAndTags`, `extractInitialValues`, `enrichFromTags`, and `applyDefaults`.
- Preserved all fallback logic and tag parsing rules.
- Ensured strict string normalization in `extractInitialValues` to match original behavior.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 15:23:45 +00:00
thePR0M3TH3AN d218baae4d Merge pull request #2358 from PR0M3TH3AN/testing-improvement-s3uploadservice-13802788661266692247
🧪 Add tests for S3UploadService and refactor for testability
2026-02-11 09:54:36 -05:00
thePR0M3TH3AN 89d26c9d2f Merge pull request #2357 from PR0M3TH3AN/ai/docs-update-20250222-10909080055527982820
Update Documentation: Quickstart and Typo Fix
2026-02-11 09:54:17 -05:00
google-labs-jules[bot]andPR0M3TH3AN 3078c46b89 feat(tests): add S3UploadService tests and refactor for testability
- Refactor `S3UploadService` to accept dependencies in constructor
- Move `resolveUploadIdentifier` to class method for mocking
- Add comprehensive unit tests for `S3UploadService` covering event emitter, validation, and upload logic
- Ensure `WebTorrent` dependency is mocked or polyfilled in test environment

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 14:42:01 +00:00