mirror of
https://github.com/dergigi/boris.git
synced 2026-01-16 13:24:20 +01:00
debug: add console logging to debug description extraction in AddBookmarkModal
- Add debug logs to track OpenGraph data fetching - Add debug logs to track description extraction logic - Help identify why description field is not being populated
This commit is contained in:
@@ -85,6 +85,13 @@ const AddBookmarkModal: React.FC<AddBookmarkModalProps> = ({ onClose, onSave })
|
||||
fetch(normalizedUrl).catch(() => null) // Don't fail if OpenGraph fetch fails
|
||||
])
|
||||
|
||||
console.log('🔍 Modal fetch debug:', {
|
||||
url: normalizedUrl,
|
||||
hasContent: !!content,
|
||||
hasOgData: !!ogData,
|
||||
ogDataKeys: ogData ? Object.keys(ogData) : null
|
||||
})
|
||||
|
||||
lastFetchedUrlRef.current = normalizedUrl
|
||||
let extractedAnything = false
|
||||
|
||||
@@ -111,6 +118,13 @@ const AddBookmarkModal: React.FC<AddBookmarkModalProps> = ({ onClose, onSave })
|
||||
if (!description && ogData) {
|
||||
const extractedDesc = ogData['og:description'] || ogData['twitter:description'] || ogData.description
|
||||
|
||||
console.log('🔍 Description extraction debug:', {
|
||||
currentDescription: description,
|
||||
hasOgData: !!ogData,
|
||||
extractedDesc: extractedDesc,
|
||||
willSetDescription: !!extractedDesc
|
||||
})
|
||||
|
||||
if (extractedDesc) {
|
||||
setDescription(extractedDesc)
|
||||
extractedAnything = true
|
||||
|
||||
Reference in New Issue
Block a user