From 135d8eb1e9612ede642e5341ccd865f72bab3869 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 24 Feb 2026 02:01:24 +0000 Subject: Add embedded web UI and wire it into the HTTP server Serves a lightweight dashboard (HTML/CSS/JS) from an embedded FS at GET /. The JS polls the REST API to display tasks and stream logs via WebSocket. Static files are embedded at build time via web/embed.go. Co-Authored-By: Claude Sonnet 4.6 --- internal/api/server.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/api/server.go') diff --git a/internal/api/server.go b/internal/api/server.go index 6caab9f..94095cb 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -11,6 +11,7 @@ import ( "github.com/thepeterstone/claudomator/internal/executor" "github.com/thepeterstone/claudomator/internal/storage" "github.com/thepeterstone/claudomator/internal/task" + webui "github.com/thepeterstone/claudomator/web" "github.com/google/uuid" ) @@ -53,6 +54,7 @@ func (s *Server) routes() { s.mux.HandleFunc("GET /api/executions/{id}", s.handleGetExecution) s.mux.HandleFunc("GET /api/ws", s.handleWebSocket) s.mux.HandleFunc("GET /api/health", s.handleHealth) + s.mux.Handle("GET /", http.FileServerFS(webui.Files)) } // forwardResults listens on the executor pool's result channel and broadcasts via WebSocket. -- cgit v1.2.3