debug: remove console logging for kind:1 hydration

- Removed 📝, 💧, 🎨 and 📊 debug logs
- These were added for troubleshooting but are no longer needed
- Kind:1 content hydration and rendering is working correctly
This commit is contained in:
Gigi
2025-10-21 23:58:16 +02:00
parent e08ce0e477
commit 51e48804fe
4 changed files with 3 additions and 49 deletions

View File

@@ -145,19 +145,6 @@ export const BookmarkList: React.FC<BookmarkListProps> = ({
.filter(hasContent)
.filter(b => !settings?.hideBookmarksWithoutCreationDate || hasCreationDate(b))
// Debug: log kind:1 events in allIndividualBookmarks
const kind1Bookmarks = allIndividualBookmarks.filter(b => b.kind === 1)
if (kind1Bookmarks.length > 0) {
console.log('📊 BookmarkList kind:1 events after filtering:', {
total: kind1Bookmarks.length,
samples: kind1Bookmarks.slice(0, 3).map(b => ({
id: b.id.slice(0, 8),
content: b.content?.slice(0, 30),
hasUrls: extractUrlsFromContent(b.content).length > 0
}))
})
}
// Apply filter
const filteredBookmarks = filterBookmarksByType(allIndividualBookmarks, selectedFilter)

View File

@@ -30,18 +30,9 @@ export const CompactView: React.FC<CompactViewProps> = ({
const isWebBookmark = bookmark.kind === 39701
const isClickable = hasUrls || isArticle || isWebBookmark
// Debug logging for kind:1 without URLs
if (bookmark.kind === 1 && !hasUrls) {
console.log('🎨 CompactView rendering kind:1 without URLs:', {
id: bookmark.id.slice(0, 8),
content: bookmark.content?.slice(0, 50),
contentLength: bookmark.content?.length,
hasUrls,
displayText: (isArticle && articleSummary ? articleSummary : bookmark.content)?.slice(0, 50)
})
}
// Calculate progress color (matching BlogPostCard logic)
const displayText = isArticle && articleSummary ? articleSummary : bookmark.content
// Calculate progress color
let progressColor = '#6366f1' // Default blue (reading)
if (readingProgress && readingProgress >= 0.95) {
progressColor = '#10b981' // Green (completed)
@@ -59,11 +50,6 @@ export const CompactView: React.FC<CompactViewProps> = ({
}
}
// For articles, prefer summary; for others, use content
const displayText = isArticle && articleSummary
? articleSummary
: bookmark.content
return (
<div key={`${bookmark.id}-${index}`} className={`individual-bookmark compact ${bookmark.isPrivate ? 'private-bookmark' : ''}`}>
<div

View File

@@ -146,16 +146,6 @@ class BookmarkController {
idToEvent.set(event.id, event)
// Debug logging for kind:1 events
if (event.kind === 1) {
console.log('📝 Fetched kind:1 event:', {
id: event.id.slice(0, 8),
content: event.content?.slice(0, 50),
contentLength: event.content?.length,
created_at: event.created_at
})
}
// Also index by coordinate for addressable events
if (event.kind && event.kind >= 30000 && event.kind < 40000) {
const dTag = event.tags?.find((t: string[]) => t[0] === 'd')?.[1] || ''

View File

@@ -184,15 +184,6 @@ export function hydrateItems(
}
}
// Debug logging for kind:1 events
if (ev.kind === 1 && content) {
console.log('💧 Hydrated kind:1 with content:', {
id: item.id.slice(0, 8),
content: content.slice(0, 50),
contentLength: content.length
})
}
// Ensure all events with content get parsed content for proper rendering
const parsedContent = content ? (getParsedContent(content) as ParsedContent) : undefined