autonomy M2 phase2: add idle budget/block stats and source/status filters in task queue UI

This commit is contained in:
DBT
2026-02-28 06:42:37 +00:00
parent aca66ea9f4
commit 5adaf8b955
3 changed files with 47 additions and 5 deletions

View File

@@ -1475,7 +1475,19 @@ func (s *RegistryServer) handleWebUITaskQueue(w http.ResponseWriter, r *http.Req
}
}
_ = json.NewEncoder(w).Encode(map[string]interface{}{"ok": true, "running": running, "items": items})
stats := map[string]int{"total": len(items), "running": len(running), "idle_round_budget": 0, "active_user": 0, "manual_pause": 0}
for _, it := range items {
reason := fmt.Sprintf("%v", it["block_reason"])
switch reason {
case "idle_round_budget":
stats["idle_round_budget"]++
case "active_user":
stats["active_user"]++
case "manual_pause":
stats["manual_pause"]++
}
}
_ = json.NewEncoder(w).Encode(map[string]interface{}{"ok": true, "running": running, "items": items, "stats": stats})
}
func (s *RegistryServer) handleWebUIExecApprovals(w http.ResponseWriter, r *http.Request) {