summaryrefslogtreecommitdiff
path: root/internal/api/server.go
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-05-25 05:05:27 +0000
committerClaude <noreply@anthropic.com>2026-05-25 05:05:27 +0000
commitb44c8277465c3b4e03fe4de4dd93850413023b69 (patch)
treef79131cb5f4d7444f2c358f35ad7749bad612bda /internal/api/server.go
parent6890bafa65a309b540cbe1562c39df137f202369 (diff)
feat(api,web): event-stream timeline (Phase 3)
Adds GET /api/tasks/{id}/events (seq-ordered, ?since_seq for incremental polling) as the timeline data source, and a per-task Timeline section in the web UI that fetches and renders the observability event stream. New pure, unit-tested JS helpers: formatEventText, renderEventTimeline, fetchTaskEvents. The timeline load is async and guarded on a global fetch so the synchronous renderTaskPanel path (and its DOM-mock unit tests) is unaffected. Verified via Go endpoint tests and node --test (272 JS tests pass). Note: the live in-browser panel render was not exercised in this environment — only unit-level coverage. https://claude.ai/code/session_01SESwn7kQ7oP62trWw6pc39
Diffstat (limited to 'internal/api/server.go')
-rw-r--r--internal/api/server.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/api/server.go b/internal/api/server.go
index 6564280..a4b7ea1 100644
--- a/internal/api/server.go
+++ b/internal/api/server.go
@@ -144,6 +144,7 @@ func (s *Server) routes() {
s.mux.HandleFunc("DELETE /api/tasks/{id}", s.handleDeleteTask)
s.mux.HandleFunc("GET /api/tasks/{id}/subtasks", s.handleListSubtasks)
s.mux.HandleFunc("GET /api/tasks/{id}/executions", s.handleListExecutions)
+ s.mux.HandleFunc("GET /api/tasks/{id}/events", s.handleListTaskEvents)
s.mux.HandleFunc("GET /api/executions", s.handleListRecentExecutions)
s.mux.HandleFunc("GET /api/stats", s.handleGetDashboardStats)
s.mux.HandleFunc("GET /api/agents/status", s.handleGetAgentStatus)