Track sleeping_since (ISO timestamp) in ServerState; auto-cleared by _set()
whenever state leaves sleeping. Frontend runs a 1s interval showing elapsed
time as "Xs", "Xm Ys", or "Xh Ym" in a new ASLEEP stat row (visible only
during state-sleeping). Timer survives page reload via server-side timestamp.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The stage-transition payload {"state":"loading","payload":{"stage":"mmproj_model"}}
lacks the stages/current/value keys — accessing them raised KeyError which crashed
the LogWatcher task, freezing the UI at the last good state indefinitely.
- log_parser: skip loading payloads missing stages/current/value (next message
has the full payload within milliseconds)
- log_watcher: wrap on_line calls in try/except so any future parser error
keeps the tail loop alive instead of killing the task
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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>
- log_parser: detect model load failure (child + router patterns) → state=error;
switch to generating at progress=1.00 and at prompt eval summary line
- frontend: add state-error (llama flashes red, CSS variable override);
group each leg+hoof in <g> so walk animation moves hooves with legs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- log_watcher: add --reopen-log mode (close/reopen each poll) for sshfs/network
filesystems; fix nonlocal clients bug causing UnboundLocalError on first broadcast;
fix list(clients) copy to prevent RuntimeError on concurrent set mutation
- log_parser: capture progress=X.XX from prompt timing lines into Metrics.prompt_progress
- frontend: show progress bar during processing_prompt state with PROMPT N% label;
widen stats panel to 300px; remove model name truncation; add drag handle on
right border of stats panel to resize between 280px–840px
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add dataclasses for ServerState, LoadingInfo, and Metrics to represent
the server's runtime state. ServerState includes a to_dict() method for
serialization with timestamp.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>