refactor(subscriptions): extract helpers from subscriptions (6/10)

File-size decomposition (no behavior change). Move the state-free TinyEventEmitter,
the decrypt-retry helpers (isTransientDecryptError, computeRetryDelay + tables),
the normalize helpers (normalizeHexPubkey, normalizeEncryptionToken), and the
subscription-list codec (serializeSubscriptionTagMatrix, parseSubscriptionPlaintext,
parseCachedSubscriptionSnapshot) into js/subscriptionsHelpers.js.

subscriptions.js: 2584 -> 2361 lines (below its original 2426 baseline;
re-recorded to 2361 to lock the reduction).

Build + full unit suite green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Opus 4.8 committed 2026-06-19 16:22:08 -04:00
1 parent 8871c4e3a1
commit 87a29b8ff8
3 files changed
+253 -234

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@ const GRANDFATHERED = {
"js/ui/loginModalController.js": 2552,
"js/historyView.js": 2613,
"js/services/moderationService.js": 2512,
"js/subscriptions.js": 2426,
"js/subscriptions.js": 2361,
"js/userBlocks.js": 2428,
"js/services/nostrService.js": 2227,
"js/nostr/watchHistory.js": 2388,