dashboard: question_added / question_resolved mutation events + client derived state
This commit is contained in:
parent
56d615b51f
commit
1879b2f485
6 changed files with 175 additions and 15 deletions
|
|
@ -77,4 +77,32 @@ 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()`.
|
||||
QuestionAdded {
|
||||
seq: u64,
|
||||
id: i64,
|
||||
asker: String,
|
||||
question: String,
|
||||
options: Vec<String>,
|
||||
multi: bool,
|
||||
asked_at: i64,
|
||||
deadline_at: Option<i64>,
|
||||
},
|
||||
/// 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.
|
||||
QuestionResolved {
|
||||
seq: u64,
|
||||
id: i64,
|
||||
answer: String,
|
||||
answerer: String,
|
||||
answered_at: i64,
|
||||
cancelled: bool,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue