diff --git a/src/components/Debug.tsx b/src/components/Debug.tsx index 8a40f044..8d268524 100644 --- a/src/components/Debug.tsx +++ b/src/components/Debug.tsx @@ -81,7 +81,7 @@ const Debug: React.FC = ({ const [decryptedEvents, setDecryptedEvents] = useState>(new Map()) // Highlight loading state - const [highlightMode, setHighlightMode] = useState<'article' | 'url' | 'author'>('article') + const [highlightMode, setHighlightMode] = useState<'article' | 'url' | 'author'>('author') const [highlightArticleCoord, setHighlightArticleCoord] = useState('') const [highlightUrl, setHighlightUrl] = useState('') const [highlightAuthor, setHighlightAuthor] = useState('') @@ -332,15 +332,17 @@ const Debug: React.FC = ({ return } + // Default to logged-in user's highlights if no specific query provided const getValue = () => { if (highlightMode === 'article') return highlightArticleCoord.trim() if (highlightMode === 'url') return highlightUrl.trim() - return highlightAuthor.trim() + const authorValue = highlightAuthor.trim() + return authorValue || pubkey || '' } const value = getValue() if (!value) { - DebugBus.warn('debug', 'Please provide a value to query') + DebugBus.warn('debug', 'Please provide a value to query or log in') return } @@ -742,7 +744,7 @@ const Debug: React.FC = ({ {/* Highlight Loading Section */}

Highlight Loading

-
Test highlight loading with EOSE-based queryEvents (kind: 9802)
+
Test highlight loading with EOSE-based queryEvents (kind: 9802). Author mode defaults to your highlights.
Query Mode:
@@ -799,7 +801,7 @@ const Debug: React.FC = ({ setHighlightAuthor(e.target.value)} disabled={isLoadingHighlights}