` +
body.String() +
`
package webui import ( "fmt" "html" "net/http" "os" "strings" ) func (h *handler) handleTaskPage(w http.ResponseWriter, r *http.Request) { id := r.PathValue("id") task, ok := globalQueue.findByID(id) if !ok { http.NotFound(w, r) return } snapshot := *task body := renderTaskDetailPage(h.opts, snapshot) w.Header().Set("Cache-Control", "no-store") w.Header().Set("Content-Type", "text/html; charset=utf-8") _, _ = w.Write([]byte(body)) } func renderTaskDetailPage(opts HandlerOptions, task Task) string { title := task.Name if strings.TrimSpace(title) == "" { title = task.ID } var body strings.Builder body.WriteString(`
./tasks.`)
body.WriteString(`