debug: add logs to trace why events aren't processed

- Log sample event to see format
- Log map size after processEvents to see if it worked
- This will show if processEvents is failing silently
This commit is contained in:
Gigi
2025-10-19 12:13:45 +02:00
parent f3a83256a8
commit 16b3668e73

View File

@@ -146,9 +146,11 @@ class ReadingProgressController {
subscription.unsubscribe()
console.log('📊 [ReadingProgress] Processing', localEvents.length, 'events from local store')
console.log('📊 [ReadingProgress] Sample event:', localEvents[0] ? { kind: localEvents[0].kind, author: localEvents[0].pubkey?.slice(0, 8), tags: localEvents[0].tags } : 'none')
if (localEvents.length > 0) {
this.processEvents(localEvents)
console.log('📊 [ReadingProgress] After processEvents, map size:', this.currentProgressMap.size)
}
// 2. Then fetch from relays (incremental or full) to augment local data