- `handleVisibility` only scheduled intervals but didn't trigger an immediate refresh when returning to the tab.
- This caused `tests/unit/services/exploreDataService.test.mjs` to fail (assertion `0 !== 1`).
- Added explicit calls to `refreshWatchHistoryTagCounts` and `refreshTagIdf` when `document.hidden` becomes false.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Replaced unbounded `Promise.all` with `pMap` and `RELAY_BACKGROUND_CONCURRENCY || 3` in `js/nostr/dmSignalEvents.js` and `js/services/dmNostrService.js` to prevent network saturation.
- Updated `scripts/check-hex.js` to exclude agent artifact directories (`perf/`, `test_logs/`, `context/`, etc.) to prevent lint failures when agents log code snippets or hex codes.
- Increased `maxBuffer` in `scripts/check-hex.js` to 10MB to be robust against large matches.
- Updated `js/services/exploreDataService.js` to trigger immediate data refresh (`refreshWatchHistoryTagCounts` and `refreshTagIdf`) when visibility state changes to visible, fixing a unit test failure.
- Includes daily performance report and context logs.
Co-authored-by: PR0M3TH3AN <[email protected]>
Extracted DM Relay UI logic and DM Attachment logic into separate binder modules to reduce the size of ProfileModalController.js. Updated file size baseline.
Co-authored-by: PR0M3TH3AN <[email protected]>
Identified and fixed unbounded concurrency in js/relayManager.js during relay list hydration. Uses pMap with RELAY_BACKGROUND_CONCURRENCY (3).
Daily perf agent run 2026-02-17.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Refactored `js/channelProfile.js` to use `pMapSettled` from `js/utils/asyncUtils.js`, fixing both the concurrency issue (P1) and the file size lint failure.
- `pMapSettled` replaces a bulky inline `pMap` wrapper, reducing code volume.
- Ensures `js/channelProfile.js` stays within its grandfathered line count limit (5579 lines).
Co-authored-by: PR0M3TH3AN <[email protected]>
- Replaced unbounded `Promise.all` with `pMap` and `RELAY_BACKGROUND_CONCURRENCY || 3` in `js/nostr/dmSignalEvents.js` and `js/services/dmNostrService.js` to prevent network saturation.
- Increased `maxBuffer` in `scripts/check-hex.js` to 10MB to prevent `ENOBUFS` when git text search matches large minified files in CI.
- Verified documentation in `content/docs/guides/upload-content.md` correctly specifies port 3000.
- Passed all unit and integration tests.
Co-authored-by: PR0M3TH3AN <[email protected]>
Replaces unbounded Promise.all with pMap and RELAY_BACKGROUND_CONCURRENCY (3) in js/nostr/dmSignalEvents.js and js/services/dmNostrService.js to prevent network saturation. Includes context logs and daily performance report.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Modifies `js/services/exploreDataService.js` to prevent starting background intervals if the document is hidden at initialization.
- Updates `scripts/check-hex.js` to increase max buffer size and exclude `js/webtorrent.min.js` to prevent `ENOBUFS` crashes.
- Adds `perf/hits-2026-02-17.json` inventory.
- Adds `daily-perf-report-2026-02-17.md` report.
- Adds `docs/agents/task-logs/daily/2026-02-17_06-45-57_perf-agent_completed.md`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Modifies `js/services/exploreDataService.js` to prevent starting background intervals if the document is hidden at initialization.
- Updates `scripts/check-hex.js` to increase max buffer size and exclude `js/webtorrent.min.js` to prevent `ENOBUFS` crashes.
- Adds `perf/hits-2026-02-17.json` inventory.
- Adds `daily-perf-report-2026-02-17.md` report.
- Adds `docs/agents/task-logs/daily/2026-02-17_06-45-57_perf-agent_completed.md`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Modified `loadLegacyR2Settings` to check `localStorage` if IndexedDB is empty.
- Implemented immediate migration of settings from `localStorage` to IndexedDB upon access.
- Added logic to clear `localStorage` after successful migration to prevent secret exposure.
- Verified fix with reproduction script and regression tests.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Replaced deprecated `document.execCommand("copy")` with `navigator.clipboard.writeText` in `EmbedVideoModal.js`.
- Simplified fallback mechanism in `EmbedVideoModal.js` to select text and prompt user for manual copy.
- Removed `document.execCommand("copy")` fallback in `LoginModalController.js` and updated tests.
- Added unit tests for `EmbedVideoModal` copy functionality.
- Updated `LoginModalController` tests to cover NIP-46 copy button behavior.
Co-authored-by: PR0M3TH3AN <[email protected]>
Refactors `_softDeleteVersions` to execute `revertVideo` calls in parallel using `Promise.all`. This allows network publishing operations (which are the bottleneck) to overlap, while `SignRequestQueue` ensures signing remains sequential and safe.
Measured improvement for 20 versions: ~2200ms -> ~300ms.
Verification:
- `tests/nostr-delete-flow.test.mjs` passed.
- `npm run lint` checks passed.
Co-authored-by: PR0M3TH3AN <[email protected]>
Removes unused imports `normalizeNostrPubkey`, `CACHE_POLICIES`, and `STORAGE_TIERS` from `js/userBlocks.js` to improve code cleanliness.
This change does not affect functionality as these imports were not used in the file.
Verified with lint checks and by running `tests/user-blocks.test.mjs` (which has a known unrelated failure).
Co-authored-by: PR0M3TH3AN <[email protected]>
- Migrated 6 out of 7 innerHTML assignments to safe DOM APIs (createElement, textContent, replaceChildren).
- Reduced innerHTML baseline for the file from 7 to 1.
- Updated scripts/check-innerhtml.mjs baseline.
- Verified with lint, unit tests, and frontend verification.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Added JSDoc to ModerationService class and methods.
- Added architectural overview in docs/moderationService-overview.md.
- Created task log.
Co-authored-by: PR0M3TH3AN <[email protected]>