fix(ui): remove buffer clear that wiped connect events
Some checks failed
Mirror to GitHub / mirror (push) Failing after 28s
Build Release Binaries / build-amd64 (push) Failing after 3m35s

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) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-04-14 15:25:13 +04:00
parent 16dcc75514
commit c478224d67

View File

@@ -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 || "";