From 7914153d3e65cec7a178e7454c9d4addbbbbdd3f Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 8 Mar 2026 20:40:41 +0000 Subject: api: extend executions and log streaming endpoints - handleListRecentExecutions: add since/limit/task_id query params - handleStreamLogs: tighten SSE framing and cleanup Co-Authored-By: Claude Sonnet 4.6 --- internal/api/executions.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/api/executions.go') diff --git a/internal/api/executions.go b/internal/api/executions.go index d9214c0..114425e 100644 --- a/internal/api/executions.go +++ b/internal/api/executions.go @@ -21,12 +21,16 @@ func (s *Server) handleListRecentExecutions(w http.ResponseWriter, r *http.Reque } } + const maxLimit = 1000 limit := 50 if v := r.URL.Query().Get("limit"); v != "" { if n, err := strconv.Atoi(v); err == nil && n > 0 { limit = n } } + if limit > maxLimit { + limit = maxLimit + } taskID := r.URL.Query().Get("task_id") -- cgit v1.2.3