refactor(comments): extract comment-cache subsystem (7/10)

File-size decomposition (no behavior change). Move the localStorage comment-cache
methods (getCommentCacheKey, handleCommentCacheError, getCachedComments,
cacheComments, removeCommentCache, clearCommentCache, persistCommentCache,
serializeCommentsForCache) into js/services/commentThreadCache.js as functions
that take the service instance; the service keeps thin delegators so all call
sites are unchanged. Cache constants moved with them; FIVE_MINUTES_MS import
dropped from the service.

commentThreadService.js: 1296 -> 1100 lines (below its original 1122 baseline;
re-recorded to 1100).

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:31:13 -04:00
1 parent 87a29b8ff8
commit c562a326ae
3 files changed
+276 -215

No files matched your search

+1 -1
View File
@@ -64,7 +64,7 @@ const GRANDFATHERED = {
"js/services/r2Service.js": 1194,
"js/ui/applicationBootstrap.js": 1163,
"js/ui/components/EditModal.js": 1130,
"js/services/commentThreadService.js": 1122,
"js/services/commentThreadService.js": 1100,
"js/nostr/managers/SignerManager.js": 1106,
"js/nostr/nip46Connector.js": 1094,
"js/ui/overlay/popoverEngine.js": 1070,