dashboard: show meta-update progress in the META INPUTS panel
post_meta_update returns 200 immediately and runs the nix flake update + agent-rebuild ripple in a background task, so the META INPUTS panel looked idle for the whole multi-minute window (#259). Track in-flight runs with a Coordinator atomic counter, exposed via an RAII MetaUpdateGuard held across run_meta_update. Surface it as the meta_update_running snapshot field plus a MetaUpdateRunning SSE event (flipped only when the count crosses 0, so concurrent runs flip the flag once). The panel shows a pulsing in-progress banner and disables the update button while a run is active.
This commit is contained in:
parent
20d2b48fe5
commit
2f1b846baf
6 changed files with 119 additions and 3 deletions
|
|
@ -194,4 +194,14 @@ pub enum DashboardEvent {
|
|||
seq: u64,
|
||||
inputs: Vec<MetaInputView>,
|
||||
},
|
||||
/// A dashboard-triggered `meta-update` started (`running: true`) or
|
||||
/// finished (`running: false`). `post_meta_update` returns 200
|
||||
/// immediately and runs the `nix flake update` + agent-rebuild
|
||||
/// ripple in a background task — this event lets the META INPUTS
|
||||
/// panel show a disabled "updating…" state for that whole window
|
||||
/// instead of looking idle (issue #259). Emitted by
|
||||
/// `Coordinator::meta_update_guard` / `MetaUpdateGuard::drop` only
|
||||
/// when the active-run count crosses 0, so concurrent updates flip
|
||||
/// the flag exactly once.
|
||||
MetaUpdateRunning { seq: u64, running: bool },
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue