perf: remove excessive debug logging for better performance

- Remove debug logs from highlight creation, publishing, and UI rendering
- Keep only essential error logging
- Improves performance by reducing console spam
- Flight mode detection still works via fallback mechanisms
This commit is contained in:
Gigi
2025-10-31 00:12:04 +01:00
parent 29eed3395f
commit 5013ccc552
4 changed files with 0 additions and 76 deletions

View File

@@ -44,14 +44,6 @@ export const useHighlightCreation = ({
}, [])
const handleCreateHighlight = useCallback(async (text: string) => {
console.log('🎯 [HIGHLIGHT-CREATION] Starting highlight creation process', {
text: text.substring(0, 50) + '...',
hasActiveAccount: !!activeAccount,
hasRelayPool: !!relayPool,
hasEventStore: !!eventStore,
hasCurrentArticle: !!currentArticle,
hasSelectedUrl: !!selectedUrl
})
if (!activeAccount || !relayPool || !eventStore) {
console.error('Missing requirements for highlight creation')
@@ -69,7 +61,6 @@ export const useHighlightCreation = ({
? currentArticle.content
: readerContent?.markdown || readerContent?.html
console.log('🎯 [HIGHLIGHT-CREATION] Calling createHighlight function')
const newHighlight = await createHighlight(
text,
source,
@@ -82,13 +73,6 @@ export const useHighlightCreation = ({
)
// Highlight created successfully
console.log('🎯 [HIGHLIGHT-CREATION] Highlight created successfully:', {
highlightId: newHighlight.id,
isLocalOnly: newHighlight.isLocalOnly,
publishedRelays: newHighlight.publishedRelays,
willShowAirplaneIcon: newHighlight.isLocalOnly
})
// Clear the browser's text selection immediately to allow DOM update
const selection = window.getSelection()
if (selection) {