Fix browser client WS connection: missing brace, error handling, localhost fallback

Removing the Enabled else-if branch in a previous commit left the Soll
if-block unclosed, crashing app.js at parse time so no JS ran at all.
Also adds: onerror handler surfaces connection failures in the status
label; try/catch for invalid URL; 'Connecting…' feedback; localhost
fallback when location.hostname is empty (file:// open); wider host
input field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DF16nV2ispNw1C9SbvqbRQ
This commit is contained in:
2026-06-27 20:56:34 +02:00
co-authored by Claude Sonnet 4.6
parent dd6193fa46
commit 734da781f8
2 changed files with 19 additions and 3 deletions
+1
View File
@@ -69,6 +69,7 @@ header#connection-bar {
padding: 0.6em 0;
border-bottom: 1px solid var(--border);
}
#host { width: 18em; }
.status-connected { color: var(--green); font-weight: bold; }
.status-disconnected { color: var(--text-muted); }