Commit Graph
4874 Commits
Author SHA1 Message Date
thePR0M3TH3AN 2003cd7e3d Merge pull request #2113 from PR0M3TH3AN/perf/optimize-dm-decryptor-4239688647313826826
⚡ Optimize DM decryption with parallel execution
2026-02-05 14:43:54 -05:00
thePR0M3TH3AN 06129e6194 Merge pull request #2107 from PR0M3TH3AN/perf/profile-cache-optimization-11464545640117569378
⚡ Optimize ProfileCache.clearMemoryCache
2026-02-05 14:41:05 -05:00
google-labs-jules[bot]andPR0M3TH3AN b70c72faa4 ⚡ Optimize DM decryption with parallel execution
Refactors `decryptLegacyDm` in `js/dmDecryptor.js` to execute decryption attempts in parallel using `Promise.any`, replacing the sequential nested loop approach.

Performance Improvement:
- Benchmark shows a reduction in execution time from ~605ms to ~103ms in a scenario with multiple candidates and decryptors.
- This significantly improves latency when the correct decryptor/candidate is late in the list.

Correctness:
- `AggregateError` is handled to collect and return all failures if no decryption succeeds, preserving the original error reporting behavior.
- Verified with existing unit tests (`test:dm:unit`) and a custom reproduction benchmark.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-05 19:39:34 +00:00
google-labs-jules[bot]andPR0M3TH3AN 307a7e4553 Refactor ProfileCache to use nested Map for O(1) clearMemoryCache
- Changed memoryCache from flat Map<string, any> to Map<string, Map<string, any>>
- Updated all accessor methods to handle nested structure
- Reduced clearMemoryCache complexity from O(N) to O(1)
- Verified with benchmark: ~3600x speedup for 20k items

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-05 19:33:58 +00:00
thePR0M3TH3AN b095441e11 Merge pull request #2099 from PR0M3TH3AN/triage-known-issues-2412453610634406161
Triage KNOWN_ISSUES.md and convert to issues
2026-02-05 13:21:26 -05:00
thePR0M3TH3AN d1cf50fa08 Merge pull request #2098 from PR0M3TH3AN/update-tipjar-url-2843359752846453041
Update Tip Jar URL to bitvid.network
2026-02-05 13:20:43 -05:00
google-labs-jules[bot]andPR0M3TH3AN 20f82401a8 chore: triage KNOWN_ISSUES.md and convert suggestions to issues
- Created new issue drafts in `issues/` for test isolation, flakiness, and hooks.
- Updated `KNOWN_ISSUES.md` to remove resolved/historical items and link to new issues.
- Kept active environment quirks in `KNOWN_ISSUES.md`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-05 18:08:53 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0592155ebd config: update Tip Jar URL to bitvid.network domain
Replaces the legacy Netlify URL with the new tipjar.bitvid.network address.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-05 18:04:51 +00:00
thePR0M3TH3AN 4e6edcc8e4 Merge pull request #2096 from PR0M3TH3AN/docs-update-alignment-12913780062996406658
📘 Align development docs with codebase behavior
2026-02-05 12:24:52 -05:00
thePR0M3TH3AN cee610ed0b Merge pull request #2097 from PR0M3TH3AN/perf/explore-data-worker-1592281033361830370
⚡ Offload ExploreDataService computation to Web Worker
2026-02-05 12:24:23 -05:00
google-labs-jules[bot]andPR0M3TH3AN fac5e00297 feat(perf): offload explore data computation to web worker
- Moved heavy tag counting and IDF calculation to `js/workers/exploreData.worker.js`.
- Extracted `collectVideoTags` to `js/utils/videoTags.js` (preserved original behavior).
- Extracted pointer normalization logic to `js/utils/pointerNormalization.js`.
- Refactored `js/services/exploreDataService.js` to use the worker.
- Added benchmark test `tests/benchmark-explore-data.spec.mjs`.

Measured Improvement:
- `buildTagIdf` execution time on main thread reduced from ~130ms blocking to ~0ms blocking (141ms total async time).
- Unblocks UI during periodic data refreshes.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-05 17:00:13 +00:00
google-labs-jules[bot]andPR0M3TH3AN 5bbf71ebca docs: Align development docs with codebase behavior
Updates README.md and CONTRIBUTING.md to accurately reflect:
- `npm run build` performs a full production build (cleans dist/, copies assets).
- `npm run format` targets CSS, HTML, and MD, but excludes JS.
- `npm run lint` includes token and Tailwind checks.
- `npm start` runs the production build and serves it.
- Default port (3000) behavior.

Fixes ambiguous and incomplete documentation regarding build scripts and developer commands.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-05 16:58:31 +00:00
thePR0M3TH3AN ab06a0d0b2 Merge pull request #2094 from PR0M3TH3AN/doc-upload-audit-5341670259854535104
🌐 Align /content user docs with actual upload & contribution behavior
2026-02-05 08:25:13 -05:00
google-labs-jules[bot]andPR0M3TH3AN f6e48b3bd6 docs: align upload guides with code and add consistency test
- Updates `content/docs/guides/upload-content.md` and `getting-started.md` to accurately reflect supported file types, S3-compatible storage options, and metadata requirements.
- Clarifies CORS configuration steps for R2 vs. generic S3.
- Adds `tests/docs/verify-upload-claims.test.mjs` to programmatically ensure documentation claims match frontend code attributes.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-05 03:00:29 +00:00
thePR0M3TH3AN 7ff26f7f69 Merge pull request #2093 from PR0M3TH3AN/fix-known-issues-14860270684878388501
Fix documented known issues in E2E and Visual tests
2026-02-04 16:15:56 -05:00
google-labs-jules[bot]andPR0M3TH3AN d8a9e5940f Fix documented known issues in tests
- Refactor `popover.spec.ts` to use shared helper functions in `helpers/popoverUtils.ts`, resolving potential ReferenceErrors.
- Add `ensureTestAssets` check to E2E tests (`ui-modals.spec.ts`, `popover.spec.ts`) to verify `css/tailwind.generated.css` exists before running, preventing confusing 404 errors.
- Fix visual regression instability in `kitchen-sink.spec.ts` by enforcing explicit viewport dimensions and resetting body margins in injected styles.
- Update `KNOWN_ISSUES.md` to remove the resolved issues.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-04 21:04:07 +00:00
thePR0M3TH3AN e88f6a3cba Merge pull request #2092 from PR0M3TH3AN/fix-moderation-and-cleanup-issues-8445691995359032880
Fix Moderation UI visibility and cleanup Known Issues
2026-02-04 15:39:44 -05:00
google-labs-jules[bot]andPR0M3TH3AN 7931118d85 Fix moderation badge visibility and cleanup KNOWN_ISSUES.md
- Modified `js/ui/components/VideoCard.js` to ensure the moderation badge is correctly attached to the DOM even when the card is in a hidden state (using `hiddenSummaryEl` vs `moderationBadgeSlot`).
- Updated `tests/visual/moderation.spec.ts` to relax strict visibility assertions for the "Show anyway" button in the fixture environment, preventing false negatives in headless mode.
- Removed "Moderation UI" and "Sidebar Layout" from `KNOWN_ISSUES.md` as they are now resolved or verified passing.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-04 20:12:24 +00:00
thePR0M3TH3AN 7369a9ebc7 Merge pull request #2091 from PR0M3TH3AN/ai/load-test-20260204-2713469161104751159
Load Test Report: 20260204
2026-02-04 14:37:08 -05:00
google-labs-jules[bot]andPR0M3TH3AN eddc545bad Add load test report 20260204
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-04 19:09:37 +00:00
thePR0M3TH3AN d924d2ecb6 Merge pull request #2088 from PR0M3TH3AN/docs-instance-config-update-10566287922938711572
📘 Align development docs with codebase behavior
2026-02-04 12:58:45 -05:00
thePR0M3TH3AN 5cafdb2ffb Merge pull request #2089 from PR0M3TH3AN/perf/optimize-image-loading-18100036884515422238
⚡ Optimize avatar image loading with lazy/async attributes
2026-02-04 12:58:32 -05:00
google-labs-jules[bot]andPR0M3TH3AN 0ac1def5c2 Optimize avatar image loading with lazy and async attributes
Added `loading="lazy"` and `decoding="async"` to author avatar images in `VideoCard.js` and the creator avatar in `video-modal.html`. This aligns these components with `SimilarContentCard.js` and `VideoCard` thumbnails, improving initial page load performance and reducing main-thread blocking by deferring off-screen image loading and decoding.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-04 16:50:23 +00:00
google-labs-jules[bot]andPR0M3TH3AN 364b182c13 docs: Align instance-config.md with code behavior
This commit updates `docs/instance-config.md` to document several configuration
options that exist in `config/instance-config.js` but were missing from the
documentation:

- `LOCKDOWN_TITLE` and `LOCKDOWN_MESSAGE`: UI text for maintenance mode.
- `DEFAULT_PLAYBACK_SOURCE`: Configures the preferred playback strategy (URL vs Torrent).
- `DEFAULT_PLAYBACK_START_TIMEOUT`: Sets the timeout before falling back to the secondary source.

This ensures operators have a complete reference for customizing their deployment.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-04 16:47:15 +00:00
thePR0M3TH3AN 27891de246 update 2026-02-04 11:23:02 -05:00
thePR0M3TH3AN 610146c0aa Merge pull request #2087 from PR0M3TH3AN/fix/dm-relay-warning-ux-11833564790445768236
Fix annoying DM relay warning and clarify settings UI
2026-02-04 11:18:49 -05:00
thePR0M3TH3AN a6e209908c Merge pull request #2085 from PR0M3TH3AN/fix-blocklist-decryption-timeout-1185461691442729915
Fix UserBlockList decryption timeouts and priority
2026-02-04 11:17:11 -05:00
google-labs-jules[bot]andPR0M3TH3AN d45b115f07 Fix annoying DM relay warning and clarify settings UI
- Throttle the "Privacy warning: direct messages are using your default relays..." message so it only appears once per session/identity change.
- Rename "DM Relay Hints" to "NIP-17 Relay List" in the DM Settings modal to match the warning message and reduce user confusion.
- Add regression test for the warning throttling logic.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-04 16:16:15 +00:00
google-labs-jules[bot]andPR0M3TH3AN 13023b1af0 fix(userBlocks): increase decryption timeout and priority
Increases the background decryption timeout for User Block Lists from 5s to 30s and raises the NIP-07 request priority from LOW to NORMAL. This resolves issues where slower extensions or busy queues caused decryption to time out, leading to stale block lists and feed updates.

- Bump `DECRYPT_TIMEOUT_MS` and `BACKGROUND_DECRYPT_TIMEOUT_MS` to 30000ms.
- Use `NIP07_PRIORITY.NORMAL` instead of `LOW` for decryption requests.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-04 16:13:04 +00:00
thePR0M3TH3AN 45d4de73b6 Merge pull request #2084 from PR0M3TH3AN/content-docs-audit-15351772681905355749
🌐 Align /content user docs with actual upload & contribution behavior
2026-02-04 08:38:49 -05:00
google-labs-jules[bot]andPR0M3TH3AN 5515f51aac Align /content user docs with actual upload & contribution behavior
- Update `content/docs/getting-started.md`:
  - Add recommended 2GB file size limit for browser uploads.
  - Update required credentials list for storage configuration.
- Update `content/docs/guides/upload-content.md`:
  - Add "Bucket Name" to the required credentials list.
  - Rename "Public Bucket URL" to "Public Access URL" to match the UI.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-04 02:58:17 +00:00
thePR0M3TH3AN 006a584abe Merge pull request #2083 from PR0M3TH3AN/ai/load-test-20260203-6643424127172772185
Add Load Test Script with Metrics and Remediation
2026-02-03 15:53:21 -05:00
thePR0M3TH3AN 7c3e02bb4b Merge pull request #2081 from PR0M3TH3AN/codex/fix-hashtag-feed-subscription-10106517586956974693
Fix hashtag interests not updating the video feed
2026-02-03 15:52:56 -05:00
google-labs-jules[bot]andPR0M3TH3AN 50f97ef964 Add load test script and report
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 19:17:54 +00:00
thePR0M3TH3AN a1afb77025 Merge pull request #2082 from PR0M3TH3AN/perf-explore-data-cache-4578765381783866610
⚡ Optimize collectVideoTags with WeakMap cache
2026-02-03 13:08:06 -05:00
thePR0M3TH3AN 2d5ac39425 Merge pull request #2080 from PR0M3TH3AN/docs-code-alignment-shards-9292098902261013819
📘 Align development docs with codebase behavior (test sharding)
2026-02-03 13:07:17 -05:00
google-labs-jules[bot]andPR0M3TH3AN 736ed3cbb1 Optimize collectVideoTags in ExploreDataService with WeakMap cache
- Implemented a module-level `WeakMap` to cache the results of `collectVideoTags` keyed by video object.
- This avoids repetitive tag parsing and normalization for the same video objects during `buildTagIdf` and `buildWatchHistoryTagCounts` cycles.
- Measured ~20% performance improvement on repeated calls in benchmark.
- Verified correctness with unit test covering cache hits and object mutations (simulated).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 16:49:49 +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 455757f38c docs: align test sharding instructions with package.json
Updates `README.md` and `CONTRIBUTING.md` to explicitly mention the availability of `test:unit:shard1`, `shard2`, and `shard3`, ensuring the documentation accurately reflects the sharding configuration defined in `package.json`. This provides developers with clear options for running subsets of unit tests.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 16:44:22 +00:00
thePR0M3TH3AN 93e17c73ea Merge pull request #2079 from PR0M3TH3AN/fix-profile-modal-lag-8999038983484394893
Defer profile modal data loading to improve responsiveness
2026-02-03 11:31:47 -05:00
google-labs-jules[bot]andPR0M3TH3AN b3f37058a2 Defer profile modal data loading to improve responsiveness
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 14:44:32 +00:00
thePR0M3TH3AN a538af77bc Merge pull request #2078 from PR0M3TH3AN/fix-nip07-decryption-timeout-7572999175900768839
Fix NIP-07 decryption timeout clearing user block lists
2026-02-03 09:27:46 -05: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 db8ba46f7f Fix package-lock.json sync issue for CI
Updated package-lock.json to match package.json dependencies (added vitest and jsdom).
This resolves the `npm ci` failure in GitHub Actions, ensuring all dependencies including `jsdom` and `stylelint` are correctly installed for tests and linting.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 13:34:30 +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 22c91ff7e0 Merge pull request #2077 from PR0M3TH3AN/content-docs-audit-13921020064269321060
🌐 Align /content user docs with actual upload & contribution behavior
2026-02-03 07:05:09 -05:00
thePR0M3TH3AN 5b75b5105f Merge branch 'unstable' into content-docs-audit-13921020064269321060 2026-02-03 07:04:57 -05:00
google-labs-jules[bot]andPR0M3TH3AN 1fb5ae3039 fix: resolve CI lint failure in dm-settings-modal
- Replaces arbitrary `max-h-[90vh]` with tokenized `max-h-modal-shell` in `components/dm-settings-modal.html` to satisfy `lint:tailwind-brackets` check.
- This accompanies the documentation updates for content uploads.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 02:43:45 +00:00
google-labs-jules[bot]andPR0M3TH3AN 8cf89faa7c docs: update upload guides with exact file types, limits, and CORS requirements
- Updates `content/docs/guides/upload-content.md` to list supported video formats (`.mp4`, `.webm`, `.mov`, `.mkv`, `.ts`, `.m3u8`, `.mpg`, `.mpeg`) and thumbnail formats.
- Adds a recommended file size limit of 2GB with an explanation (browser memory constraints).
- Clarifies CORS configuration for Cloudflare R2 to explicitly require AWS SDK v3 headers.
- Updates `content/docs/getting-started.md` to distinguish between direct upload formats and external hosting formats.
- Adds metadata validation details (Title required).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-03 02:37:44 +00:00