From c70e6bc2aa5e0a9d76e05d7c65e0884755bc0cae Mon Sep 17 00:00:00 2001 From: Gigi Date: Wed, 22 Oct 2025 00:57:47 +0200 Subject: [PATCH] debug: log hydration progress to track content population - Add logging to see how many hydrated items have content - This will help diagnose why bookmarks are showing IDs instead of content --- src/services/bookmarkHelpers.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/services/bookmarkHelpers.ts b/src/services/bookmarkHelpers.ts index 3795d5a7..ae0d9ccb 100644 --- a/src/services/bookmarkHelpers.ts +++ b/src/services/bookmarkHelpers.ts @@ -170,7 +170,7 @@ export function hydrateItems( items: IndividualBookmark[], idToEvent: Map ): IndividualBookmark[] { - return items + const hydrated = items .map(item => { const ev = idToEvent.get(item.id) if (!ev) return item @@ -202,6 +202,14 @@ export function hydrateItems( const isBookmarkListEvent = item.kind === 10003 || item.kind === 30003 || item.kind === 30001 return !isBookmarkListEvent }) + + // Debug: log how many items have content + const withContent = hydrated.filter(i => i.content && i.content.length > 0) + if (withContent.length > 0 || hydrated.length > 0) { + console.log(`📝 Hydrated ${withContent.length}/${hydrated.length} items have content`) + } + + return hydrated } // Note: event decryption/collection lives in `bookmarkProcessing.ts`