Track activity-state transition times in the daemon #104

Closed
opened 2026-08-24 19:02:08 +01:00 by naps62-yolo · 0 comments
Collaborator

Populate Session::activity_since (#102) in the daemon.

The activity watcher already recomputes ActivityState on every liveness tick via crate::activity::decide. Stamp activity_since only when the decided state differs from the stored one — never on every tick, or the duration the sidebar shows resets continuously and always reads zero.

Restarting the daemon resets the clock to the restart time. That is acceptable and should be stated in the code, not worked around: the daemon cannot know how long a recovered session had already been sitting idle.

Depends on #102 for the field.

Depends on: #1

Populate `Session::activity_since` (#102) in the daemon. The activity watcher already recomputes `ActivityState` on every liveness tick via `crate::activity::decide`. Stamp `activity_since` only when the decided state differs from the stored one — never on every tick, or the duration the sidebar shows resets continuously and always reads zero. Restarting the daemon resets the clock to the restart time. That is acceptable and should be stated in the code, not worked around: the daemon cannot know how long a recovered session had already been sitting idle. Depends on #102 for the field. Depends on: #1
naps62-yolo added this to the Sidebar cards milestone 2026-08-24 19:02:08 +01:00
naps62-yolo added the area/daemontype/featdifficulty/easy labels 2026-08-24 19:02:08 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#104