rebuild_queue: dashboard panel + snapshot field + SSE event wireup

This commit is contained in:
damocles 2026-05-23 11:57:16 +02:00 committed by Mara
parent 11db5c2a8f
commit 47d2f766c9
4 changed files with 202 additions and 0 deletions

View file

@ -237,6 +237,12 @@ struct StateSnapshot {
/// disabled "updating…" state; live transitions arrive via the
/// `MetaUpdateRunning` event (issue #259).
meta_update_running: bool,
/// Current state of the global rebuild queue — pending + running
/// long-lived ops (rebuild / meta-update / spawn) plus the most
/// recent few terminal entries the queue retains for history.
/// Live transitions arrive via the `RebuildQueueChanged` event.
/// See `rebuild_queue.rs`.
rebuild_queue: Vec<crate::rebuild_queue::QueueEntry>,
/// Whether the hive-forge container is up. When true the dashboard
/// links each container's config + each approval's commit into the
/// forge's `agent-configs` repos.
@ -431,6 +437,7 @@ async fn api_state(headers: HeaderMap, State(state): State<AppState>) -> axum::J
question_history,
tombstones,
port_conflicts,
rebuild_queue: state.coord.rebuild_queue.snapshot(),
forge_present: crate::forge::is_present().await,
})
}