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

@@ -147,6 +147,10 @@
<span class="sk">STAGE</span>
<span class="sv" id="sv-load-stage"></span>
</div>
<div class="stat-row" id="row-sleep-timer">
<span class="sk">ASLEEP</span>
<span class="sv" id="sv-sleep-timer"></span>
</div>
<div class="stat-row" id="row-reqs">
<span class="sk">REQS</span>
<span class="sv" id="sv-reqs">0</span>