diff --git a/src/components/HighlightItem.tsx b/src/components/HighlightItem.tsx index 2dca377e..9828da05 100644 --- a/src/components/HighlightItem.tsx +++ b/src/components/HighlightItem.tsx @@ -178,7 +178,7 @@ export const HighlightItem: React.FC = ({ } } - // Always show server icon, even if we don't have relay info + // Show server icon with relay info if available if (highlight.publishedRelays && highlight.publishedRelays.length > 0) { const relayNames = highlight.publishedRelays.map(url => url.replace(/^wss?:\/\//, '').replace(/\/$/, '') @@ -190,10 +190,21 @@ export const HighlightItem: React.FC = ({ } } + if (highlight.seenOnRelays && highlight.seenOnRelays.length > 0) { + const relayNames = highlight.seenOnRelays.map(url => + url.replace(/^wss?:\/\//, '').replace(/\/$/, '') + ) + return { + icon: faServer, + tooltip: `Seen on ${relayNames.length} relay(s):\n${relayNames.join('\n')}\n\nClick to rebroadcast`, + spin: false + } + } + // Default server icon for highlights without relay info return { icon: faServer, - tooltip: 'Click to rebroadcast to all relays', + tooltip: 'Fetched from network\n\nClick to rebroadcast to all relays', spin: false } } diff --git a/src/types/highlights.ts b/src/types/highlights.ts index 2f576fb7..0b07df2b 100644 --- a/src/types/highlights.ts +++ b/src/types/highlights.ts @@ -16,7 +16,8 @@ export interface Highlight { // Level classification (computed based on user's context) level?: HighlightLevel // Relay tracking for offline/local-only highlights - publishedRelays?: string[] // URLs of relays that acknowledged this event + publishedRelays?: string[] // URLs of relays where this was published (for user-created highlights) + seenOnRelays?: string[] // URLs of relays where this event was fetched from isLocalOnly?: boolean // true if only published to local relays isOfflineCreated?: boolean // true if created while in flight mode (offline) isSyncing?: boolean // true if currently being synced to remote relays