Add activity_since and the Error activity state to the wire #102

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

The sidebar wants to show how long a session has been in its current state. Session::last_activity_at cannot answer that — it is the last observed PTY output, so it only tracks the Idle clock and says nothing about how long a session has been Active or AwaitingInput.

Add to maestro-protocol:

  • Session::activity_since: DateTime<Utc> — when the session entered its current ActivityState. #[serde(default)] to the Unix epoch, matching how last_activity_at already defaults, so payloads from older daemons stay forward-compatible.
  • ActivityState::Error — a new variant. Nothing infers it; only an agent reporting failure through #105 can set it. Keep the existing #[default] on Idle.

Mirror both in web/src/types.ts, which is a hand-maintained mirror of these shapes.

This is wire-only. Populating activity_since is #104, producing Error is #105, rendering either is #107 and #108.

The sidebar wants to show how long a session has been in its current state. `Session::last_activity_at` cannot answer that — it is the last observed PTY output, so it only tracks the Idle clock and says nothing about how long a session has been `Active` or `AwaitingInput`. Add to `maestro-protocol`: - `Session::activity_since: DateTime<Utc>` — when the session entered its current `ActivityState`. `#[serde(default)]` to the Unix epoch, matching how `last_activity_at` already defaults, so payloads from older daemons stay forward-compatible. - `ActivityState::Error` — a new variant. Nothing infers it; only an agent reporting failure through #105 can set it. Keep the existing `#[default]` on `Idle`. Mirror both in `web/src/types.ts`, which is a hand-maintained mirror of these shapes. This is wire-only. Populating `activity_since` is #104, producing `Error` is #105, rendering either is #107 and #108.
naps62-yolo added this to the Sidebar cards milestone 2026-08-24 19:02:08 +01:00
naps62-yolo added the area/protocoltype/featdifficulty/easy labels 2026-08-24 19:02:08 +01:00
naps62-yolo added a new dependency 2026-08-24 19:02:14 +01:00
naps62-yolo added a new dependency 2026-08-24 19:02:15 +01:00
naps62-yolo added a new dependency 2026-08-24 19:02:15 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#102