dashboard: surface peer questions + operator override
questions pane now shows both operator-targeted threads (target IS NULL) and agent-to-agent threads (target = some agent). filter chips above the list: all / @operator / @peer / per-participant. peer rows get a mauve left rule + a 0V3RR1D3 button that POSTs the same /answer-question endpoint (OperatorQuestions::answer already permits the operator as answerer on any target). wire changes: OperatorQuestions gains pending_all + recent_answered_all; QuestionAdded + QuestionResolved events carry target: Option<String>; emit sites drop their target.is_none() guard. answered-history rows show the answerer prefix so override answers are auditable at a glance.
This commit is contained in:
parent
e7ce35c503
commit
a15fafb5de
9 changed files with 187 additions and 71 deletions
|
|
@ -79,11 +79,11 @@ pub enum DashboardEvent {
|
|||
note: Option<String>,
|
||||
description: Option<String>,
|
||||
},
|
||||
/// An operator-targeted question landed in the queue
|
||||
/// (`Ask { to: None | Some("operator") }`). Peer-to-peer
|
||||
/// questions (target = Some(<agent>)) never fire this event —
|
||||
/// the dashboard only ever shows operator-bound questions, so
|
||||
/// the emit site filters on `target.is_none()`.
|
||||
/// A question landed in the queue. `target = None` means
|
||||
/// operator-targeted (`Ask { to: None | Some("operator") }`);
|
||||
/// `target = Some(<agent>)` means a peer-to-peer question. Both
|
||||
/// are surfaced on the dashboard so the operator can monitor /
|
||||
/// override-answer stuck threads.
|
||||
QuestionAdded {
|
||||
seq: u64,
|
||||
id: i64,
|
||||
|
|
@ -93,12 +93,13 @@ pub enum DashboardEvent {
|
|||
multi: bool,
|
||||
asked_at: i64,
|
||||
deadline_at: Option<i64>,
|
||||
target: Option<String>,
|
||||
},
|
||||
/// An operator-targeted question was answered (operator answer,
|
||||
/// peer override, or ttl watchdog `[expired]`). Clients move the
|
||||
/// row from pending to history. `cancelled = true` when the
|
||||
/// operator dismissed via the cancel button — same code path on
|
||||
/// the server but useful to surface differently in the UI.
|
||||
/// A question was answered (operator answer, peer answer,
|
||||
/// operator override on a peer thread, or ttl watchdog
|
||||
/// `[expired]`). Clients move the row from pending to history.
|
||||
/// `cancelled = true` when the operator dismissed via the cancel
|
||||
/// button.
|
||||
QuestionResolved {
|
||||
seq: u64,
|
||||
id: i64,
|
||||
|
|
@ -106,6 +107,7 @@ pub enum DashboardEvent {
|
|||
answerer: String,
|
||||
answered_at: i64,
|
||||
cancelled: bool,
|
||||
target: Option<String>,
|
||||
},
|
||||
/// A lifecycle action started for an agent (spawn / start / stop
|
||||
/// / restart / rebuild / destroy). Clients render a spinner next
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue