From 756ceb62bebd940ddb4adcb17bb973d6027eb53a Mon Sep 17 00:00:00 2001 From: spencrmartin Date: Fri, 14 Nov 2025 14:30:59 -0500 Subject: [PATCH] debug: Add detailed deduplication logging to identify blocking issue - Add comprehensive logging to show exactly why messages are being blocked - Log both new and existing message details in deduplication checks - Show all comparison criteria (content, role, timestamp, ID) - This will help identify what existing message is causing the duplication block --- ui/desktop/src/components/pair.tsx | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/ui/desktop/src/components/pair.tsx b/ui/desktop/src/components/pair.tsx index 9264cd001e..bce1391051 100644 --- a/ui/desktop/src/components/pair.tsx +++ b/ui/desktop/src/components/pair.tsx @@ -143,7 +143,33 @@ export default function Pair({ const isVeryRecent = Math.abs(existing.created - msg.created) <= 2; const isDifferentId = existing.id !== msg.id; - return isSameContent && isSameRole && isVeryRecent && isDifferentId; + const wouldBlock = isSameContent && isSameRole && isVeryRecent && isDifferentId; + + if (wouldBlock) { + console.log(`🔍 DEDUP: Found potential duplicate for ${source}:`, { + newMessage: { + id: msg.id, + content: contentText.substring(0, 30) + '...', + role: msg.role, + timestamp: msg.created + }, + existingMessage: { + id: existing.id, + content: existingText.substring(0, 30) + '...', + role: existing.role, + timestamp: existing.created + }, + checks: { + isSameContent, + isSameRole, + isVeryRecent, + isDifferentId, + timeDiff: Math.abs(existing.created - msg.created) + } + }); + } + + return wouldBlock; }); if (recentDuplicate) {