dashboard: transient_set / transient_cleared mutation events + client derived state

This commit is contained in:
müde 2026-05-17 14:20:51 +02:00
parent 1879b2f485
commit 7956e1c627
3 changed files with 103 additions and 7 deletions

View file

@ -105,4 +105,20 @@ pub enum DashboardEvent {
answered_at: i64,
cancelled: bool,
},
/// A lifecycle action started for an agent (spawn / start / stop
/// / restart / rebuild / destroy). Clients render a spinner next
/// to the row; the client computes "seconds in this state"
/// locally from `since_unix` so a slow rebuild's elapsed time
/// ticks without polling.
TransientSet {
seq: u64,
name: String,
/// Lifecycle kind: `"spawning"` / `"starting"` / `"stopping"` /
/// `"restarting"` / `"rebuilding"` / `"destroying"`.
transient_kind: &'static str,
since_unix: i64,
},
/// The matching lifecycle action resolved (success or failure).
/// Clients drop the spinner row.
TransientCleared { seq: u64, name: String },
}