hive-c0re: remove the dashboard's ask/answer surface
This commit is contained in:
parent
a295fba09c
commit
47cac50e6e
8 changed files with 25 additions and 463 deletions
|
|
@ -97,44 +97,6 @@ pub enum DashboardEvent {
|
|||
note: Option<String>,
|
||||
description: Option<String>,
|
||||
},
|
||||
/// 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,
|
||||
asker: String,
|
||||
question: String,
|
||||
options: Vec<String>,
|
||||
multi: bool,
|
||||
asked_at: DateTime<Utc>,
|
||||
deadline_at: Option<DateTime<Utc>>,
|
||||
target: Option<String>,
|
||||
/// Verified file-path tokens that appear in `question`.
|
||||
/// Same shape as broker `Sent`/`Delivered` events; the
|
||||
/// client linkifies only what hive-c0re vouched for.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
question_refs: Vec<String>,
|
||||
},
|
||||
/// 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,
|
||||
answer: String,
|
||||
answerer: String,
|
||||
answered_at: DateTime<Utc>,
|
||||
cancelled: bool,
|
||||
target: Option<String>,
|
||||
/// Verified file-path tokens that appear in `answer`.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
answer_refs: Vec<String>,
|
||||
},
|
||||
/// 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"
|
||||
|
|
@ -297,8 +259,6 @@ impl DashboardEvent {
|
|||
DashboardEvent::Delivered { .. } => "delivered",
|
||||
DashboardEvent::ApprovalAdded { .. } => "approval_added",
|
||||
DashboardEvent::ApprovalResolved { .. } => "approval_resolved",
|
||||
DashboardEvent::QuestionAdded { .. } => "question_added",
|
||||
DashboardEvent::QuestionResolved { .. } => "question_resolved",
|
||||
DashboardEvent::TransientSet { .. } => "transient_set",
|
||||
DashboardEvent::TransientCleared { .. } => "transient_cleared",
|
||||
DashboardEvent::ContainerStateChanged { .. } => "container_state_changed",
|
||||
|
|
@ -377,28 +337,6 @@ mod tests {
|
|||
note: None,
|
||||
description: None,
|
||||
},
|
||||
DashboardEvent::QuestionAdded {
|
||||
seq: 1,
|
||||
id: 1,
|
||||
asker: "a".into(),
|
||||
question: String::new(),
|
||||
options: Vec::new(),
|
||||
multi: false,
|
||||
asked_at: hive_sh4re::wire_time::from_secs(0),
|
||||
deadline_at: None,
|
||||
target: None,
|
||||
question_refs: Vec::new(),
|
||||
},
|
||||
DashboardEvent::QuestionResolved {
|
||||
seq: 1,
|
||||
id: 1,
|
||||
answer: String::new(),
|
||||
answerer: "a".into(),
|
||||
answered_at: hive_sh4re::wire_time::from_secs(0),
|
||||
cancelled: false,
|
||||
target: None,
|
||||
answer_refs: Vec::new(),
|
||||
},
|
||||
DashboardEvent::TransientSet {
|
||||
seq: 1,
|
||||
name: "x".into(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue