Add a static demo mode for a GitHub Pages showcase

GitHub Pages only serves static files, but the real app needs a Node gateway and Rust connector to speak the TS3 protocol - neither of which can run there. This adds a fake WebSocket (DemoSocket) that simulates a connection with canned channels/clients entirely client-side, gated behind VITE_DEMO_MODE so the normal Docker build is unaffected, plus a GitHub Actions workflow that builds and publishes it to Pages.

Also fixes a real bug surfaced while testing the disconnect flow: a clean disconnect incorrectly showed "Connection closed before the server responded" because the socket's onclose handler couldn't tell a clean disconnect apart from one that never connected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
MoepchiandClaude Sonnet 5 committed 2026-08-01 00:19:22 +02:00
1 parent 9b83e9d93f
commit fe1b5ff991
5 files changed
+283 -5

No files matched your search

+16
View File
@@ -52,6 +52,22 @@
color-scheme: dark;
}
/* Demo mode banner */
.ts-demo-banner {
flex-shrink: 0;
padding: 0.35rem 0.75rem;
background: #7a4d00;
color: #fff;
font-size: 12px;
text-align: center;
}
.ts-demo-banner a {
color: #fff;
text-decoration: underline;
}
/* Toolbar */
.ts-menubar {