fix(ci): reduce channelProfile.js size and bound relay concurrency

- 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]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-17 10:55:28 +00:00
1 parent 575c169be6
commit 004c0bed83
2 files changed
+28 -11

No files matched your search

+3 -11
View File
@@ -70,7 +70,7 @@ import {
} from "./ui/components/staticModalAccessibility.js";
import { setModalState as setGlobalModalState } from "./state/appState.js";
import { attachFeedInfoPopover } from "./ui/components/FeedInfoPopover.js";
import { pMap } from "./utils/asyncUtils.js";
import { pMapSettled } from "./utils/asyncUtils.js";
import { RELAY_BACKGROUND_CONCURRENCY } from "./nostr/relayConstants.js";
const getApp = () => getApplication();
@@ -5410,19 +5410,11 @@ async function loadUserVideos(pubkey) {
userLogger.error("Relay error (default pool):", error);
}
} else {
const settled = await pMap(
const settled = await pMapSettled(
relayList,
async (url) => {
try {
const value = await nostrClient.pool.list([url], [filter]);
return { status: "fulfilled", value };
} catch (reason) {
return { status: "rejected", reason };
}
},
(url) => nostrClient.pool.list([url], [filter]),
{ concurrency: RELAY_BACKGROUND_CONCURRENCY }
);
settled.forEach((result, index) => {
const relayUrl = relayList[index];