fix: emit SchedulesChanged from manager-server + approval paths
Agent-triggered schedule mutations (cancel_schedule, fire_schedule_now, edit_schedule MCP tools) go through manager_server.rs, not the HTTP API handlers. Approval-resolved SchedulePrompt inserts go through actions.rs. Neither was emitting SchedulesChanged. - manager_server.rs: add emit_schedules_snapshot() on Ok in handle_cancel_schedule, handle_fire_schedule_now, handle_edit_schedule - actions.rs: emit_schedules_snapshot() after successful run_approval_schedule_prompt (covers request_schedule_prompt approval resolving) Coverage is now complete: every path that writes a scheduled_prompts row emits the SSE snapshot.
This commit is contained in:
parent
76c4a67b1c
commit
68108fe5f8
2 changed files with 17 additions and 4 deletions
|
|
@ -116,7 +116,11 @@ pub async fn approve(coord: Arc<Coordinator>, id: i64) -> Result<()> {
|
|||
// at the scheduled time). Run inline + fire
|
||||
// `ApprovalResolved` so the approval row leaves Pending
|
||||
// immediately.
|
||||
run_approval_schedule_prompt(&coord, approval).await
|
||||
let result = run_approval_schedule_prompt(&coord, approval).await;
|
||||
if result.is_ok() {
|
||||
coord.emit_schedules_snapshot();
|
||||
}
|
||||
result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue