dashboard: derive operator inbox from message stream (drop snapshot field + refetch workaround)
This commit is contained in:
parent
1340a654e7
commit
fb669c17c8
3 changed files with 42 additions and 30 deletions
|
|
@ -161,10 +161,6 @@ struct StateSnapshot {
|
|||
/// Last 30 resolved approvals (approved / denied / failed), newest-
|
||||
/// first. Drives the "history" tab on the approvals section.
|
||||
approval_history: Vec<ApprovalHistoryView>,
|
||||
/// Latest messages addressed to `operator` — surfaces agent replies
|
||||
/// asynchronously so the operator can see them without watching the
|
||||
/// live panel during a turn.
|
||||
operator_inbox: Vec<hive_sh4re::InboxRow>,
|
||||
/// Pending operator questions (currently only from the manager).
|
||||
/// `ask_operator` returns immediately with the id; on `/answer-question`
|
||||
/// we mark the row answered and fire `HelperEvent::OperatorAnswered`
|
||||
|
|
@ -323,13 +319,9 @@ async fn api_state(headers: HeaderMap, State(state): State<AppState>) -> axum::J
|
|||
let tombstones = build_tombstone_views(&state.coord, &containers, &transient_snapshot);
|
||||
let port_conflicts = build_port_conflicts(&containers);
|
||||
|
||||
let operator_inbox = log_default(
|
||||
"broker.recent_for(operator)",
|
||||
state
|
||||
.coord
|
||||
.broker
|
||||
.recent_for(hive_sh4re::OPERATOR_RECIPIENT, 50),
|
||||
);
|
||||
// operator_inbox used to be served here as a 50-row array; the
|
||||
// dashboard now derives it client-side from the message stream
|
||||
// (terminal backfill + live SSE), so the snapshot stops shipping it.
|
||||
let questions = log_default("questions.pending", state.coord.questions.pending());
|
||||
let question_history =
|
||||
log_default("questions.recent_answered", state.coord.questions.recent_answered(20));
|
||||
|
|
@ -344,7 +336,6 @@ async fn api_state(headers: HeaderMap, State(state): State<AppState>) -> axum::J
|
|||
approvals,
|
||||
approval_history,
|
||||
meta_inputs: read_meta_inputs(),
|
||||
operator_inbox,
|
||||
questions,
|
||||
question_history,
|
||||
tombstones,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue