diff --git a/internal/webui/embed.go b/internal/webui/embed.go index 378b29a9..d8de640b 100644 --- a/internal/webui/embed.go +++ b/internal/webui/embed.go @@ -28,13 +28,9 @@ var pageTemplates = []string{ "templates/persona_detail.html", "templates/pipeline_detail.html", "templates/contract_detail.html", - "templates/skills.html", "templates/skill_detail.html", - "templates/compose.html", "templates/issue_detail.html", "templates/pr_detail.html", - "templates/analytics.html", - "templates/retros.html", "templates/compare.html", "templates/webhooks.html", "templates/webhook_detail.html", @@ -62,6 +58,10 @@ var standalonePageTemplates = []string{ "templates/contracts.html", "templates/personas.html", "templates/notfound.html", + "templates/analytics.html", + "templates/retros.html", + "templates/skills.html", + "templates/compose.html", } // parseTemplates parses all embedded HTML templates using a clone-per-page diff --git a/internal/webui/handlers_analytics.go b/internal/webui/handlers_analytics.go index dc7444e4..260aedbf 100644 --- a/internal/webui/handlers_analytics.go +++ b/internal/webui/handlers_analytics.go @@ -80,7 +80,7 @@ func (s *Server) handleAnalyticsPage(w http.ResponseWriter, r *http.Request) { } w.Header().Set("Content-Type", "text/html; charset=utf-8") - if err := s.assets.templates["templates/analytics.html"].ExecuteTemplate(w, "templates/layout.html", data); err != nil { + if err := s.assets.templates["templates/analytics.html"].Execute(w, data); err != nil { log.Printf("[webui] template error rendering analytics page: %v", err) http.Error(w, "template error", http.StatusInternalServerError) } diff --git a/internal/webui/handlers_compose.go b/internal/webui/handlers_compose.go index f190c3bb..83364b5c 100644 --- a/internal/webui/handlers_compose.go +++ b/internal/webui/handlers_compose.go @@ -33,7 +33,7 @@ func (s *Server) handleComposePage(w http.ResponseWriter, r *http.Request) { } w.Header().Set("Content-Type", "text/html; charset=utf-8") - if err := s.assets.templates["templates/compose.html"].ExecuteTemplate(w, "templates/layout.html", data); err != nil { + if err := s.assets.templates["templates/compose.html"].Execute(w, data); err != nil { http.Error(w, "template error: "+err.Error(), http.StatusInternalServerError) } } diff --git a/internal/webui/handlers_retro_page.go b/internal/webui/handlers_retro_page.go index 5bdff566..0df0c0c6 100644 --- a/internal/webui/handlers_retro_page.go +++ b/internal/webui/handlers_retro_page.go @@ -164,7 +164,7 @@ func (s *Server) handleRetrosPage(w http.ResponseWriter, r *http.Request) { } w.Header().Set("Content-Type", "text/html; charset=utf-8") - if err := s.assets.templates["templates/retros.html"].ExecuteTemplate(w, "templates/layout.html", data); err != nil { + if err := s.assets.templates["templates/retros.html"].Execute(w, data); err != nil { log.Printf("[webui] template error rendering retros page: %v", err) http.Error(w, "template error", http.StatusInternalServerError) } diff --git a/internal/webui/handlers_skills.go b/internal/webui/handlers_skills.go index 326db5e0..514bb279 100644 --- a/internal/webui/handlers_skills.go +++ b/internal/webui/handlers_skills.go @@ -40,7 +40,7 @@ func (s *Server) handleSkillsPage(w http.ResponseWriter, r *http.Request) { } w.Header().Set("Content-Type", "text/html; charset=utf-8") - if err := s.assets.templates["templates/skills.html"].ExecuteTemplate(w, "templates/layout.html", data); err != nil { + if err := s.assets.templates["templates/skills.html"].Execute(w, data); err != nil { http.Error(w, "template error: "+err.Error(), http.StatusInternalServerError) } } diff --git a/internal/webui/templates/analytics.html b/internal/webui/templates/analytics.html index 4b0c55bf..8418ed0b 100644 --- a/internal/webui/templates/analytics.html +++ b/internal/webui/templates/analytics.html @@ -1,95 +1,127 @@ -{{define "title"}}Analytics · Wave{{end}} -{{define "content"}} -