From a578d67b1ec2e4edd203eefabace5f897aa0dcce Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 23 Oct 2025 21:14:15 +0200 Subject: [PATCH] fix: load reading positions for web bookmarks (kind:39701) Web bookmarks store their URL in the 'd' tag, not in content. The getBookmarkReadingProgress function was only extracting URLs from content, which meant reading progress indicators weren't showing for web bookmarks. Now it properly extracts URLs from the 'd' tag for kind:39701 bookmarks. --- src/components/BookmarkList.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/BookmarkList.tsx b/src/components/BookmarkList.tsx index ab60bba5..4026b085 100644 --- a/src/components/BookmarkList.tsx +++ b/src/components/BookmarkList.tsx @@ -105,7 +105,18 @@ export const BookmarkList: React.FC = ({ return undefined } } - // For web bookmarks and other types, try to use URL if available + + // For web bookmarks (kind:39701), URL is in the 'd' tag + if (bookmark.kind === 39701) { + const dTag = bookmark.tags.find(t => t[0] === 'd')?.[1] + if (dTag) { + // Ensure URL has protocol + const url = dTag.startsWith('http') ? dTag : `https://${dTag}` + return readingProgressMap.get(url) + } + } + + // For other bookmark types, try to extract URL from content const urls = extractUrlsFromContent(bookmark.content) if (urls.length > 0) { return readingProgressMap.get(urls[0])