From 05ec9263171d77acf0044d2ffa2b14e3ddbd8db7 Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Sat, 11 Apr 2026 19:28:16 +0400 Subject: [PATCH] fix(ui): don't nuke the registered panel's children on status update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regression from 20375ec: the `signal-event reconnecting` and `signal-event registered` handlers were assigning to `directRegistered.textContent`, which is the PARENT element that holds the entire registered UI — the "Registered — waiting" header, incoming-call panel, recent-contacts section, call history, the fingerprint-input bar, and the Call button. Setting textContent on that parent wiped every child with a single text node, so after registration the user saw "✅ Registered" with NOTHING below it — no call input, no history, no call button. App unusable post-registration. Fix: - Add a dedicated `#registered-status`

inside the header of `#direct-registered` (this element already existed as a plain paragraph without an id; just giving it an id). - Rewrite both handlers to target that element by id instead of the parent, so `textContent =` only touches the status line and leaves the rest of the panel intact. - The `registered` handler now also explicitly `registerBtn.classList.add("hidden")` and `directRegistered.classList.remove("hidden")` so the first register event correctly reveals the UI. Belt-and-braces for the transparent-reconnect case too — if the supervisor re-registers after a drop, the UI stays in the registered state. Co-Authored-By: Claude Opus 4.6 (1M context) --- desktop/index.html | 2 +- desktop/src/main.ts | 31 +++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/desktop/index.html b/desktop/index.html index 303160c..f2d5e33 100644 --- a/desktop/index.html +++ b/desktop/index.html @@ -52,7 +52,7 @@