refactor(web_ui): Bus::effective_context_window, sigint_claude + per-connection hello, relocate fetch_reminder_stats, drop redundant guard

This commit is contained in:
müde 2026-07-05 22:47:14 +02:00
commit 9cebc128e2
7 changed files with 63 additions and 49 deletions

View file

@ -5,7 +5,6 @@ use axum::http::StatusCode;
use axum::response::{IntoResponse, Response};
use serde::Deserialize;
use super::state::fetch_reminder_stats;
use super::{AppState, error_response};
#[derive(Deserialize)]
@ -27,6 +26,27 @@ pub(super) async fn api_stats(
axum::Json(snapshot)
}
/// Fetch reminder activity stats from the broker via the per-agent / manager
/// socket. Returns None on any transport / decode failure — the stats are
/// decorative, not authoritative.
async fn fetch_reminder_stats(
socket: &std::path::Path,
window_secs: u64,
) -> Option<hive_sh4re::ReminderStats> {
match super::broker_request(
socket,
&hive_sh4re::Request::ReminderRollup {
since_secs: window_secs,
agent: None,
},
)
.await
{
Ok(hive_sh4re::Response::ReminderRollup(stats)) => Some(stats),
_ => None,
}
}
/// Proxy this agent's loose-ends list via the per-agent socket. The
/// web UI surfaces the result as a collapsible section in the page
/// so the operator can see at a glance what's pending against the