Commit Graph
5018 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 12ba9f07e6 chore: remove dead code and unused promises in Application.init
Removes commented-out `await Promise.all` and refactors the associated
`accessControlPromise` and `adminPanePromise` variables in `js/app.js`.

The promises were only assigned for use in the commented-out line.
This change:
- Converts `accessControl.refresh()` to a direct expression statement.
- Simplifies `adminPanePromise` logic into a direct `if` block, removing
  the unnecessary `else { Promise.resolve(null) }` branch.
- Preserves the existing fire-and-forget behavior for these initialization tasks.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 23:56:45 +00:00
thePR0M3TH3AN c539fef553 Merge pull request #2183 from PR0M3TH3AN/jules-fix-unused-import-appjs-3659969045676148831
chore(js): remove unused splitAndZap import in app.js
2026-02-07 17:40:17 -05:00
bitvid-agent 73093ae916 fix(ai): formatting (agent) suggested 2026-02-07 22:17:31 +00:00
google-labs-jules[bot]andPR0M3TH3AN 31dc297991 chore(js): remove unused splitAndZap import in app.js
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 22:14:19 +00:00
thePR0M3TH3AN 2c5fb67985 Merge pull request #2182 from PR0M3TH3AN/refactor/feed-types-constants-7142050680573542479
🧹 Refactor hardcoded feed identifiers to constants
2026-02-07 17:03:10 -05:00
bitvid-agent 9f710c1f77 fix(ai): formatting (agent) suggested 2026-02-07 22:02:54 +00:00
google-labs-jules[bot]andPR0M3TH3AN a829cd95ca Refactor hardcoded feed identifiers to use constants
Introduced FEED_TYPES constants in js/constants.js and updated js/app/authSessionCoordinator.js, js/hashChangeHandler.js, js/viewManager.js, and js/app/feedCoordinator.js to use them. This improves maintainability and reduces the risk of typos in feed view names.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 21:59:37 +00:00
thePR0M3TH3AN 38f63e5851 Merge pull request #2181 from PR0M3TH3AN/refactor/deduplicate-hex64-regex-4819369490365472168
🧹 Refactor: Deduplicate HEX64_REGEX constant
2026-02-07 16:57:49 -05:00
bitvid-agent 955398d338 fix(ai): formatting (agent) suggested 2026-02-07 21:56:02 +00:00
google-labs-jules[bot]andPR0M3TH3AN a084bb59de refactor: deduplicate HEX64_REGEX to js/utils/hex.js
Moves the repeatedly defined HEX64_REGEX constant to a shared utility
module to improve maintainability and consistency. Updates all consumers
to import from the new location.

Signed-off-by: Jules <[email protected]>

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 21:52:51 +00:00
thePR0M3TH3AN 4c30228fad Merge pull request #2180 from PR0M3TH3AN/chore-remove-unused-nip46-constants-17069818061582667621
🧹 Remove unused NIP-46 constants exports
2026-02-07 16:49:29 -05:00
bitvid-agent ac96ef76ea fix(ai): formatting (agent) suggested 2026-02-07 21:48:59 +00:00
thePR0M3TH3AN 136c09e93e Merge pull request #2179 from PR0M3TH3AN/chore/remove-unused-import-app-js-6603743995432153207
🧹 Remove unused MAX_WALLET_DEFAULT_ZAP import from app.js
2026-02-07 16:46:23 -05:00
bitvid-agent ad336a708e fix(ai): formatting (agent) suggested 2026-02-07 21:46:06 +00:00
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 5f12eadd4d chore: remove unused MAX_WALLET_DEFAULT_ZAP import from app.js
Removes the unused `MAX_WALLET_DEFAULT_ZAP` import from `js/app.js` to improve code health and reduce confusion. This variable was imported from `config.js` but never used within `app.js`.

Verification:
- Confirmed `MAX_WALLET_DEFAULT_ZAP` is not present in `js/app.js`.
- Ran `tests/app/is-user-logged-in.test.mjs` to ensure `js/app.js` still loads and functions correctly.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 21:42:58 +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 5a3256afef Merge pull request #2173 from PR0M3TH3AN/ai/load-test-20260207-17226311979336768263
feat(agent): implement nostr relay load test script
2026-02-07 16:34:21 -05:00
thePR0M3TH3AN 6c57794aa2 Merge pull request #2172 from PR0M3TH3AN/fix-known-issues-20260207-9290030417190436591
fix(tests): remediate known issues in LoginModal and VideoCard tests
2026-02-07 16:34:07 -05:00
thePR0M3TH3AN c58ead0b3f Merge pull request #2171 from PR0M3TH3AN/docs-align-behavior-17496722204495467027
📘 Align development docs with codebase behavior
2026-02-07 16:33:33 -05:00
thePR0M3TH3AN 5335d134ed Merge branch 'unstable' into docs-align-behavior-17496722204495467027 2026-02-07 16:33:22 -05:00
thePR0M3TH3AN c3c7d4f044 Merge pull request #2170 from PR0M3TH3AN/perf/optimize-explore-diversity-sorter-11300380522406167028
⚡ Optimize Explore Diversity Sorter with Inverted Index
2026-02-07 16:32:55 -05:00
thePR0M3TH3AN 5ea7ad30ae Merge pull request #2165 from PR0M3TH3AN/ai/lint-20260207-5252793567895615076
chore(ai): apply formatting/lint autofixes
2026-02-07 16:24:30 -05:00
thePR0M3TH3AN 4381620024 Merge pull request #2162 from PR0M3TH3AN/ai/reproducers-known-bugs-20240522-9928543418568370400
docs(repro): add minimal reproducers for known bugs
2026-02-07 16:23:59 -05:00
thePR0M3TH3AN 95b71d5b27 Merge pull request #2161 from PR0M3TH3AN/ai/tests-profileMetadataService-20231027-2017918492743877587
Add unit tests for profileMetadataService
2026-02-07 16:22:53 -05:00
thePR0M3TH3AN 0982e41147 Merge pull request #2160 from PR0M3TH3AN/ai/changelog-20260207-984122091094384877
docs(ai): weekly changelog draft
2026-02-07 16:22:27 -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
thePR0M3TH3AN 0f2a7c3c4f Merge pull request #2158 from PR0M3TH3AN/ai/onboarding-20250218-8642622031709636919
docs(ai): improve onboarding steps and enforce node version
2026-02-07 16:21:13 -05:00
thePR0M3TH3AN 446443167e Merge pull request #2157 from PR0M3TH3AN/ai/interop-tests-15938759699659615005
Add Nostr Protocol Interop Tests
2026-02-07 16:20:31 -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 5fa40e3750 feat(agent): implement nostr relay load test script
Implements a load testing script for Nostr relays that simulates multiple clients, generates mixed event traffic (View/Video), and measures performance metrics including latency, throughput, and CPU usage. It also includes strict safety guardrails to prevent accidental load testing against public relays.

Signed-off-by: Jules <[email protected]>

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 19:38:41 +00:00
google-labs-jules[bot]andPR0M3TH3AN cc9064617e fix(tests): remediate known issues in LoginModal and VideoCard tests
- Fix `LoginModalController` async activity leak by binding `setTimeout` to `this.window`.
- Fix `VideoCard` moderation test by explicitly updating `ModerationDecorator` settings.
- Verify `popover.spec.ts` issue persists and update `KNOWN_ISSUES.md`.
- Update `KNOWN_ISSUES.md` to reflect fixes and current status.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 18:36:41 +00:00
google-labs-jules[bot]andPR0M3TH3AN b312848c8c docs: align development docs with codebase behavior
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 17:00:40 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2320887665 perf: optimize createExploreDiversitySorter with inverted index
- Implements an Inverted Index to reduce redundant similarity checks.
- Replaces O(N) array splice with O(1) Map deletion for candidate tracking.
- Reduces runtime from ~3.5s to ~0.9s for 5000 items (3.9x speedup).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 16:55:05 +00:00
thePR0M3TH3AN 4f13d49f66 Merge pull request #2156 from PR0M3TH3AN/telemetry-aggregator-update-15409738198546473637
Update telemetry aggregator to parse test_output.txt
2026-02-07 09:27:28 -05:00
thePR0M3TH3AN 2626024d0d Merge pull request #2155 from PR0M3TH3AN/ai/schema-validate-20250220-8797542597260908870
chore(ai): event schema validation tool + fixes
2026-02-07 09:27:17 -05:00
thePR0M3TH3AN e7a6cc2a19 Merge pull request #2154 from PR0M3TH3AN/content-docs-audit-15817802463202455501
🌐 Align /content user docs with actual upload & contribution behavior
2026-02-07 09:26:52 -05:00
thePR0M3TH3AN f3c65d1439 Merge pull request #2168 from PR0M3TH3AN/claude/fix-nostr-login-performance-KYX9y
Optimize login performance with shared decryption scheme cache
2026-02-07 09:24:47 -05:00
Claude 71c153f68d perf: speed up post-login list sync with shared decryption cache
Three performance bottlenecks were causing slow list loading after NIP-07 login:

1. Each list service (blocks, subscriptions, hashtag preferences) maintained
   its own isolated decryptionSuccessCache. When blocks decrypted with nip44_v2,
   subscriptions and hashtag preferences had no way to know — they each had to
   independently probe all schemes through the NIP-07 extension queue, tripling
   the number of extension calls during the critical login path.

2. List loading was gated on both relaysReadyPromise AND permissionPromise in
   the coordinator. Since the NIP-07 extension already grants decrypt permissions
   during loginWithExtension(), the redundant pre-grant was adding 2-5 seconds
   of unnecessary latency before any list fetching could begin.

3. The DECRYPT_RETRY_DELAY_MS was 10 seconds across all services. When a decrypt
   attempt failed transiently (extension still initializing), the retry waited
   far too long before trying again.

Changes:
- Create shared decryptionSchemeCache module used by all three list services
- Add fast-path: when shared cache knows the correct scheme, try ONLY that
  scheme before falling back to parallel Promise.any() probe
- Remove permissionPromise from the list-loading gate in authSessionCoordinator
- Reduce DECRYPT_RETRY_DELAY_MS from 10s to 3s in all three services
- Clear shared cache on logout

https://claude.ai/code/session_013QrGMnxtMTsGTPqaP35jMj
2026-02-07 13:43:15 +00:00
google-labs-jules[bot]andPR0M3TH3AN 05adc0d9b4 chore(ai): check linting (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 13:12:44 +00:00
thePR0M3TH3AN d792570b69 Merge pull request #2163 from PR0M3TH3AN/claude/fix-hashtag-lists-XNv9d
Fix decryption error reporting and permission prompt handling
2026-02-07 08:11:40 -05:00
google-labs-jules[bot]andPR0M3TH3AN 4afc66951b docs(repro): add minimal reproducers for known bugs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 12:10:55 +00:00
google-labs-jules[bot]andPR0M3TH3AN 6eb86b1459 test(ai): add unit tests for profileMetadataService (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 11:14:03 +00:00
google-labs-jules[bot]andPR0M3TH3AN a2d5818880 docs(ai): weekly changelog draft
- Update CHANGELOG.md with recent changes (new views, performance improvements).
- Create releases/draft-20260207.md with highlights and upgrade notes.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 10:33:16 +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 e3d9ea7e3a feat: add interoperability test script for Nostr protocol verification
- Implements `scripts/agent/interop-test.mjs` to verify Video Post, View Event, and DM flows.
- Uses `NostrClient` with ephemeral keys and a local relay.
- Ensures correct event construction via `nostrEventSchemas.js`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 07:10:56 +00:00
google-labs-jules[bot]andPR0M3TH3AN c0251965da Update telemetry aggregator to include test_output.txt
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 06:06:59 +00:00
Claude 1403d2d4cc fix: handle permission-required errors in hashtag preferences background loading
When hashtag preferences decryption fails with "permission-required" during
background loading (allowPermissionPrompt=false), the service silently returned
without setting loaded state, scheduling a retry, or emitting a change event.
This left the UI stuck showing empty hashtag lists. The subscriptions module
already handled this case correctly.

Also fix error scheme mapping in Promise.any() catch blocks for both hashtag
preferences and subscriptions — the index into the original order array was
wrong after filtering out deduplicated scheme families.

https://claude.ai/code/session_016xYxLQ1U2XVVY5rFuCRKfc
2026-02-07 05:42:24 +00:00
google-labs-jules[bot]andPR0M3TH3AN da7fc65e94 chore(ai): event schema validation tool + fixes
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-07 05:09:50 +00:00