From ebcd3c6acd19cbc0473fb51556e2aef4dddb55e0 Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 16 Apr 2026 23:32:54 -0500 Subject: [PATCH] feat(electron): enhance backend connection handling and UI updates --- electron/crash.html | 70 ++++----- electron/loading.html | 141 +++++++++++++++--- electron/loadingStatusNotice.js | 98 ++++++++++++ electron/main.js | 89 ++++++++++- electron/preload.js | 3 + .../src/backend/data/THIRD_PARTY_NOTICES.txt | 79 +++++++++- .../src/backend/data/licenses_frontend.json | 12 +- meshchatx/src/frontend/js/GlobalState.js | 2 + package.json | 4 +- pnpm-lock.yaml | 20 +-- scripts/ensure-micron-parser-package.js | 26 ++++ 11 files changed, 454 insertions(+), 90 deletions(-) create mode 100644 electron/loadingStatusNotice.js create mode 100644 scripts/ensure-micron-parser-package.js diff --git a/electron/crash.html b/electron/crash.html index 159c9cb..277427d 100644 --- a/electron/crash.html +++ b/electron/crash.html @@ -11,32 +11,23 @@ -
-
-
-
- -
-
+
+
-
+
-
+
MeshChatX Crashed
-
- Critical error detected in backend service. +
+ The backend process exited unexpectedly.
-
+
Status
-
Offline
+
+ Backend unavailable +

Diagnostic Logs

-
+
Standard Output (stdout)

                                 
-
+
Standard Error (stderr)

                                 
@@ -128,19 +121,13 @@
- @@ -169,7 +156,7 @@ document.getElementById("stderr").innerText = "Error decoding logs."; } - function copyLogs() { + function copyLogs(event) { const stdout = document.getElementById("stdout").innerText; const stderr = document.getElementById("stderr").innerText; const exitCode = document.getElementById("exit-code").innerText; @@ -177,7 +164,10 @@ const fullReport = `MeshChatX Crash Report\nExit Code: ${exitCode}\n\n--- STDOUT ---\n${stdout}\n\n--- STDERR ---\n${stderr}`; navigator.clipboard.writeText(fullReport).then(() => { - const btn = event.target; + const btn = event && event.currentTarget ? event.currentTarget : null; + if (!btn) { + return; + } const originalText = btn.innerText; btn.innerText = "Copied!"; btn.classList.replace("text-blue-600", "text-emerald-600"); diff --git a/electron/loading.html b/electron/loading.html index 5568abd..09850ae 100644 --- a/electron/loading.html +++ b/electron/loading.html @@ -55,6 +55,10 @@ id="attempt-hint" class="mt-3 min-h-[1.25rem] text-center text-xs text-slate-500 dark:text-zinc-500" >

+

v0.0.0

@@ -63,13 +67,20 @@
+