fix: wss support, polling fallback, cancellation, offline labels, screen sizing
- frontend/app.js: use wss:// when page is served over HTTPS; add HTTP polling
fallback (/state every 2s) when WebSocket is down, amber dot = polling mode;
stop polling on WS reconnect; clearer state labels (LOG OFFLINE, LOAD ERROR,
DISCONNECTED); fix replace('_',' ') to use regex for multi-underscore states
- frontend/style.css: add #ws-dot.polling (amber); min-height 280px on screen;
shrink llama-wrap/SVG; tighten screen padding and gap
- log_parser.py: detect cancelled requests (stop: cancel task / Connection
handling canceled) → idle; fix: switch to generating at progress=1.00
- server.py: add GET /state endpoint for polling fallback
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,15 +46,15 @@ html, body {
|
||||
#screen {
|
||||
position: relative;
|
||||
width: 280px;
|
||||
min-height: 380px;
|
||||
min-height: 280px;
|
||||
background: #0d0d06;
|
||||
border: 3px solid var(--amber-dim);
|
||||
border-radius: 12px;
|
||||
padding: 1.5rem 1rem 1rem;
|
||||
padding: 1.2rem 1rem 0.8rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.8rem;
|
||||
gap: 0.5rem;
|
||||
/* CRT scanline overlay */
|
||||
background-image: repeating-linear-gradient(
|
||||
0deg,
|
||||
@@ -78,6 +78,7 @@ html, body {
|
||||
transition: background 0.3s;
|
||||
}
|
||||
#ws-dot.connected { background: var(--green); }
|
||||
#ws-dot.polling { background: var(--amber-dim); }
|
||||
#ws-dot.pulse { animation: pulse-dot 0.3s ease-out; }
|
||||
|
||||
@keyframes pulse-dot {
|
||||
@@ -88,16 +89,16 @@ html, body {
|
||||
/* ── Llama container ─────────────────────────────────────────────────────── */
|
||||
#llama-wrap {
|
||||
position: relative;
|
||||
width: 160px;
|
||||
height: 200px;
|
||||
width: 150px;
|
||||
height: 175px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#llama {
|
||||
width: 140px;
|
||||
height: 180px;
|
||||
width: 135px;
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
/* SVG part colors */
|
||||
|
||||
Reference in New Issue
Block a user