mirror of
https://github.com/dergigi/boris.git
synced 2026-01-14 12:24:24 +01:00
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.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user