hermes-agent/apps
Teknium 9d72680ca3
fix(desktop): make the running-turn timer per-session (#41182)
The desktop statusbar turn timer read a single process-global $turnStartedAt,
set/cleared only for the active session. With multiple same-profile sessions
running at once, switching to session B reset the one shared clock, so
session A's still-running turn "restarted from zero" the moment you left it —
exactly the behaviour @Da7_Tech reported after the profile-scoped session work.

Move turnStartedAt onto ClientSessionState so each session owns its own turn
clock. The global atom now just mirrors whichever session is focused, written
on view-sync (the flush that already stages the active session's state). A
backgrounded turn keeps counting in its own cache entry, and focusing it
restores its real elapsed time instead of zeroing it.

Set/clear sites: message.start (seed), message.complete + error + interrupted
bail (clear), and the session.info running-state path (seed if missing / clear
on stop) so a turn that goes busy via session.info — e.g. resuming a session
that's already running — also gets a clock.

Note: the agent loop itself never froze — every same-profile session runs in
its own backend thread and background deltas are buffered per-session. This
fixes the timer-reset symptom; the "no live progress until you return" is
inherent to a single-view transcript and is out of scope here.
2026-06-07 04:29:05 -07:00
..
bootstrap-installer test(bootstrap-installer): cover PowerShell path layout cross-platform 2026-06-06 19:59:16 -07:00
desktop fix(desktop): make the running-turn timer per-session (#41182) 2026-06-07 04:29:05 -07:00
shared fix(desktop): guard reconnect sockets and keep branch search precise 2026-06-03 13:13:21 -05:00