From c478224d670ce844e78facbcb296b25e22004fc7 Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Tue, 14 Apr 2026 15:25:13 +0400 Subject: [PATCH] fix(ui): remove buffer clear that wiped connect events The callDebugBuffer.length=0 in showCallScreen() ran AFTER the connect command returned, wiping all connect: events (path_negotiated, race_start, race_done, candidate_diags). Only media: events survived because they arrived after the clear. Removed all automatic buffer clearing. The reverse().find() already handles stale data by picking the most recent event. The manual "Clear log" button (line 624) is the only way to clear now. Co-Authored-By: Claude Opus 4.6 (1M context) --- desktop/src/main.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/desktop/src/main.ts b/desktop/src/main.ts index 00f4acc..df1c1f1 100644 --- a/desktop/src/main.ts +++ b/desktop/src/main.ts @@ -852,12 +852,6 @@ function showCallScreen() { connectScreen.classList.add("hidden"); callScreen.classList.remove("hidden"); - // Clear stale call-debug events from previous call so the P2P - // badge doesn't pick up old path_negotiated data. Cleared here - // (start of new call) rather than showConnectScreen (end of call) - // so the user can still read logs after hanging up. - callDebugBuffer.length = 0; - // Direct call → phone-style layout; room call → group layout. if (directCallPeer) { const fp = directCallPeer.fingerprint || "";