From 763f7bef4d6cec1d0159ea06bcbc1ce54c4d6474 Mon Sep 17 00:00:00 2001 From: Gigi Date: Mon, 20 Oct 2025 00:23:04 +0200 Subject: [PATCH] debug: add granular logging to identify where loading hangs Added logs at each step: - Setting up timeline subscription - Timeline subscription ready - Querying reading progress events - Got reading progress events count - Generation changed abort This will show exactly which step is blocking. --- src/services/readingProgressController.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/services/readingProgressController.ts b/src/services/readingProgressController.ts index 6fbc97c0..0fb580cc 100644 --- a/src/services/readingProgressController.ts +++ b/src/services/readingProgressController.ts @@ -214,6 +214,7 @@ class ReadingProgressController { this.timelineSubscription = null } + console.log('[readingProgress] Setting up timeline subscription...') const timeline$ = eventStore.timeline({ kinds: [KINDS.ReadingProgress], authors: [pubkey] @@ -225,6 +226,7 @@ class ReadingProgressController { if (!Array.isArray(localEvents) || localEvents.length === 0) return this.processEvents(localEvents) }) + console.log('[readingProgress] Timeline subscription ready') // Query events from relays // Force full sync if map is empty (first load) or if explicitly forced @@ -240,9 +242,12 @@ class ReadingProgressController { filter.since = lastSynced } + console.log('[readingProgress] Querying reading progress events...') const relayEvents = await queryEvents(relayPool, filter, { relayUrls: RELAYS }) + console.log('[readingProgress] Got reading progress events:', relayEvents.length) if (startGeneration !== this.generation) { + console.log('[readingProgress] Generation changed, aborting') return }