19 Commits

Author SHA1 Message Date
Vlad Doloman
71b3c945ee feat: sleep duration timer in stats panel
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>
2026-06-28 13:49:50 +03:00
Vlad Doloman
a5e59df624 feat: show loading stage name, count, and overall progress
Progress bar now fills to overall completion across all stages.
Label shows e.g. "text model  1/3  23%" and stats panel shows
"text model (1/3)". Label bumped to 8px full amber for readability.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 18:29:45 +03:00
Vlad Doloman
7bda83998e fix: handle bare {"stage":"name"} loading payload; harden watcher against parser errors
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>
2026-06-26 18:27:52 +03:00
Vlad Doloman
e2996ff0b3 feat: add SVG favicon (llama head, amber on dark)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 18:21:03 +03:00
Vlad Doloman
ce9b2d73f7 docs: add README with setup, config, states, and reverse proxy guide
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 18:17:54 +03:00
Vlad Doloman
8712931c23 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>
2026-06-26 17:59:54 +03:00
Vlad Doloman
9dcb5b977a fix: error state, leg grouping, prompt→generating transition
- 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>
2026-06-22 22:10:43 +03:00
Vlad Doloman
311819b51c fix: sshfs polling, WebSocket broadcast, prompt progress bar, resizable stats panel
- 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>
2026-06-22 21:02:34 +03:00
Vlad Doloman
fddbd8f4d4 fix: seed initial state from last 8KB of log on startup 2026-06-22 20:11:00 +03:00
Vlad Doloman
c3b06d4e99 feat: WebSocket client with state animation mapping and auto-reconnect 2026-06-22 19:05:27 +03:00
Vlad Doloman
7e82eaf3f9 feat: LCD aesthetic CSS with responsive layout and per-state animations 2026-06-22 19:03:33 +03:00
Vlad Doloman
5541822936 feat: frontend HTML structure with SVG llama skeleton 2026-06-22 19:01:15 +03:00
Vlad Doloman
2e757fa645 feat: FastAPI server with WebSocket broadcast and static serving
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 18:58:49 +03:00
Vlad Doloman
3367eeb80b feat: asyncio log file watcher with offline detection 2026-06-22 18:57:17 +03:00
Vlad Doloman
1411ba241f feat: LogParser state machine with full state transitions 2026-06-22 18:46:12 +03:00
Vlad Doloman
54fba1b400 chore: add .gitignore (venv, pycache, pytest cache) 2026-06-22 18:43:28 +03:00
Vlad Doloman
28400b3cae feat: ServerState data model with serialization
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>
2026-06-22 18:42:45 +03:00
Vlad Doloman
ecfd759d7f feat: log line preprocessing (ts strip + router/child classify) 2026-06-22 18:41:22 +03:00
Vlad Doloman
206c913a9f chore: project bootstrap 2026-06-22 18:39:30 +03:00