chore: remove debug logging from bookmark grouping

Removed temporary console.log statements added for debugging. The issue has been identified and fixed - bookmarks were being filtered out by hasContent() when they only had IDs.
This commit is contained in:
Gigi
2025-10-18 00:18:33 +02:00
parent 2004ce76c9
commit 0fbf80b04f

View File

@@ -93,8 +93,6 @@ export const sortIndividualBookmarks = (items: IndividualBookmark[]) => {
export function groupIndividualBookmarks(items: IndividualBookmark[]) {
const sorted = sortIndividualBookmarks(items)
console.log('[bookmark] 🗂️ Grouping', sorted.length, 'items')
// Group by source list, not by content type
const nip51Public = sorted.filter(i => i.sourceKind === 10003 && !i.isPrivate)
const nip51Private = sorted.filter(i => i.sourceKind === 10003 && i.isPrivate)
@@ -102,23 +100,6 @@ export function groupIndividualBookmarks(items: IndividualBookmark[]) {
const amethystPrivate = sorted.filter(i => i.sourceKind === 30001 && i.isPrivate)
const standaloneWeb = sorted.filter(i => i.sourceKind === 39701)
console.log('[bookmark] 🗂️ Groups:', {
nip51Public: nip51Public.length,
nip51Private: nip51Private.length,
amethystPublic: amethystPublic.length,
amethystPrivate: amethystPrivate.length,
standaloneWeb: standaloneWeb.length
})
// Debug: sample first few items to see their properties
if (sorted.length > 0) {
console.log('[bookmark] 🗂️ Sample items:', sorted.slice(0, 3).map(i => ({
sourceKind: i.sourceKind,
isPrivate: i.isPrivate,
id: i.id.slice(0, 16)
})))
}
return {
nip51Public,
nip51Private,