feat(#1106): transient wake for bash tasks — bypass broker sqlite

This commit is contained in:
damocles 2026-06-03 10:40:33 +02:00 committed by mara
commit a1c6736ba5
8 changed files with 102 additions and 19 deletions

View file

@ -899,7 +899,7 @@ async fn dashboard_history(State(state): State<AppState>) -> Response {
messages.reverse();
let events: Vec<crate::dashboard_events::DashboardEvent> = messages
.into_iter()
.map(|m| match m {
.filter_map(|m| match m {
crate::broker::MessageEvent::Sent {
id,
from,
@ -909,7 +909,7 @@ async fn dashboard_history(State(state): State<AppState>) -> Response {
in_reply_to,
} => {
let file_refs = scan_validated_paths(&body);
crate::dashboard_events::DashboardEvent::Sent {
Some(crate::dashboard_events::DashboardEvent::Sent {
seq: 0,
id,
from,
@ -918,7 +918,7 @@ async fn dashboard_history(State(state): State<AppState>) -> Response {
at,
in_reply_to,
file_refs,
}
})
}
crate::broker::MessageEvent::Delivered {
id,
@ -929,7 +929,7 @@ async fn dashboard_history(State(state): State<AppState>) -> Response {
in_reply_to,
} => {
let file_refs = scan_validated_paths(&body);
crate::dashboard_events::DashboardEvent::Delivered {
Some(crate::dashboard_events::DashboardEvent::Delivered {
seq: 0,
id,
from,
@ -938,8 +938,11 @@ async fn dashboard_history(State(state): State<AppState>) -> Response {
at,
in_reply_to,
file_refs,
}
})
}
// Ping events are never persisted to sqlite — this arm is
// unreachable in practice but required for exhaustiveness.
crate::broker::MessageEvent::Ping { .. } => None,
})
.collect();
axum::Json(serde_json::json!({ "seq": seq, "events": events })).into_response()