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>
This commit is contained in:
Vlad Doloman
2026-06-28 13:49:50 +03:00
parent a5e59df624
commit 71b3c945ee
4 changed files with 59 additions and 4 deletions

View File

@@ -340,6 +340,8 @@ body.state-sleeping #row-speed,
body.state-sleeping #row-tokens,
body.state-sleeping #row-load-stage { display: none; }
body:not(.state-sleeping) #row-sleep-timer { display: none; }
body.state-waiting #row-prompt,
body.state-waiting #row-speed,
body.state-waiting #row-tokens,