debug: add logging to investigate tooltip showing all relays

- Add debug log to see what highlight data is available when rendering
- Check if publishedRelays or seenOnRelays are being used
- This will help identify why tooltip shows all relays instead of just published ones
This commit is contained in:
Gigi
2025-10-30 23:54:07 +01:00
parent d6911b2acb
commit bcfc04c35c

View File

@@ -310,6 +310,18 @@ export const HighlightItem: React.FC<HighlightItemProps> = ({
const isLocalOnly = highlight.isLocalOnly
const publishedRelays = highlight.publishedRelays || []
// Debug: Log what we're working with (remove after fixing)
if (highlight.id && (isLocalOnly !== undefined || publishedRelays.length > 0)) {
console.log('🔍 [HIGHLIGHT-UI-DEBUG] Highlight data:', {
highlightId: highlight.id,
isLocalOnly,
publishedRelays,
seenOnRelays: highlight.seenOnRelays,
willUsePublishedRelays: !!(highlight.publishedRelays && highlight.publishedRelays.length > 0),
willUseSeenOnRelays: !!(highlight.seenOnRelays && highlight.seenOnRelays.length > 0)
})
}
// Show highlighter icon with relay info if available
if (highlight.publishedRelays && highlight.publishedRelays.length > 0) {
const relayNames = highlight.publishedRelays.map(url =>