{{define "up-label"}}{{copy "nav.tasks"}}{{end}} {{define "title"}}{{.Thin.Task.Title}}{{end}} {{define "content"}} {{with .Thin.Task}}
{{template "mono-l" .Mono}}
{{copy "nav.tasks"}}{{template "placement-chip" .}}

{{.Title}}

{{template "who" .Creator}}{{template "source" .}}{{printf (copy "work.changed") .Ago}}{{template "task-menu" (dict "ID" .ID "Menu" .Menu "From" "task")}}
{{template "track-full" .}}

{{if .Live}}{{template "mark" ""}}{{end}}{{.Summary}}

{{template "work-task-hold" .}} {{if and .CopyCanSkip .Mine}}
{{end}} {{if .CopyHold}}

{{copy "copy.round_budget"}}

{{end}} {{with .CopyRepeat}}

{{copy "copy.repeated"}}

{{copy "copy.repeated_help"}}

  • {{printf (copy "copy.attempt") .Before.Attempt (short .Before.Candidate)}}
  • {{printf (copy "copy.attempt") .After.Attempt (short .After.Candidate)}}
{{end}} {{range .CopyFlags}}

{{copy "copy.flag"}}

{{.Text}}

{{.Flag}}

{{if .ID}}
{{copy "copy.edit"}}
{{end}}
{{end}} {{with .Spend}}

{{.}}

{{end}}{{with .SpendNote}}

{{.}}

{{end}} {{with .Dup}}{{if not $.Thin.Task.Decision}}

{{icon "alert-triangle"}}{{copy "work.dup"}} {{.Title}}{{if not $.Thin.Task.Mine}} {{printf (copy "work.dup_decides") $.Thin.Task.Creator.Name}}{{end}}

{{end}}{{end}} {{with .Folded}}
{{icon "check-circle"}}{{copy "work.combined_line"}} {{.Into.Title}}.{{if $.Thin.Task.Mine}}
{{end}}
{{end}} {{range .Combined}}
{{icon "check-circle"}}{{printf (copy "work.combined_here") .Title}} {{copy "work.combined_open"}}{{if $.Thin.Task.Mine}}
{{end}}
{{end}} {{if and .Decision (or (not .Card) (eq .Decision.Need "direction"))}}{{template "decision" (dict "Task" . "Head" false "From" "task")}}{{end}}

{{copy "work.tl.heading"}}

    {{range $i, $it := .Timeline}}
  1. {{if .Live}}{{template "mark" ""}}{{end}}

    {{if .Live}}{{.What}}{{with .Since}} {{template "elapsed" .}}{{end}}{{else}}{{.What}}{{end}}{{with .Badge}} {{template "badge" .}}{{end}}{{with .Took}} {{.}}{{end}}{{with .At}} {{end}}

    {{with .Headline}}

    {{.}}

    {{end}} {{if .Lines}}
      {{range .Lines}}
    1. {{.}}
    2. {{end}}
    {{end}} {{with .Research}}{{template "research-findings" .}}{{end}} {{with .Design}}{{template "design-gallery" .}}{{end}} {{if .HasDetails}}
    {{icon "chevron-down"}}{{copy "work.details"}}
    {{with .Markdown}}
    {{chatMarkdown .}}
    {{end}} {{with .Findings}}
      {{range .}}
    • {{with .Headline}}{{.}} {{end}}{{.Text}}{{if .Path}}{{.Path}}{{if .Line}}:{{.Line}}{{end}}{{end}}
    • {{end}}
    {{end}} {{range .Text}}

    {{.}}

    {{end}}
    {{end}} {{if .RetryStep}}
    {{end}} {{if .Decision}}{{template "decision" (dict "Task" $.Thin.Task "Head" false "From" "task")}}{{end}}
  2. {{end}}
{{icon "chevron-down"}}{{copy "work.details"}}
{{with .Brief}}

{{copy "work.details.brief"}}

{{chatMarkdown .}}
{{end}} {{if .Findings}}

{{copy "work.findings"}}

    {{range .Findings}}
  • {{.Text}}{{if .Path}}{{if .Repo}}{{.Repo}}:{{end}}{{.Path}}:{{.Line}}{{end}}
  • {{end}}
{{end}} {{range .Steps}}{{if or .Summary .LogTail}}

{{.Line}}

{{with .Result}}

{{.}}

{{end}}{{with .Summary}}
{{chatMarkdown .}}
{{end}}{{if .LogTail}}
{{.LogTail}}
{{end}}
{{end}}{{end}} {{if .EarlierSteps}}
{{copy "placement.history"}}{{range .EarlierSteps}}

{{.ID}} {{.Summary}}

{{end}}
{{end}}

{{copy "work.details.where"}}

{{if .Branch}}{{if not .Merged}}
{{copy "work.details.branch"}}
{{.Branch}}
{{end}}{{end}}{{with .CandidateSHA}}
{{copy "work.details.commit"}}
{{short .}}{{with $.Thin.Task.BaseSHA}} {{copy "work.details.on"}} {{short .}}{{end}}
{{end}}{{with .MergedLine}}
{{copy "work.details.merged"}}
{{.}}
{{end}}{{if .PreviewURL}}
{{copy "work.specialist.preview"}}
{{.PreviewLine}}
{{end}}
{{copy "work.details.task"}}
{{.ID}}
{{if .MergedLine}}
{{copy "work.open"}}
{{else if .URL}}
{{copy "work.open"}}
{{end}}
{{$thread := $.Thin.Thread}}

{{copy "work.thread"}}

{{with .StepSpend}}
    {{range .}}
  • {{.Line}}
  • {{end}}
{{end}}
    {{range $thread.Items}}{{if .Note}}
  1. {{.Author}}

    {{.Text}}

  2. {{else}}
  3. {{.Author}}

    {{.Text}}

  4. {{if .Answered}}
  5. {{icon "message-circle"}}{{.Who}}
    {{chatMarkdown .Answer}}
  6. {{else if .Waiting}}
  7. {{icon "message-circle"}}{{.Who}}

    {{.Waiting}}

  8. {{else}}
  9. {{.Ended}}

  10. {{end}}{{end}}{{else}}
  11. {{copy "work.thread_empty"}}
  12. {{end}}
{{if $thread.Ask}}{{$first := index $thread.Choices 0}}

{{printf (copy "work.ask.target") (index $thread.Names $first)}}{{if gt (len $thread.Choices) 1}}{{end}}

{{else}}
{{end}}
{{end}} {{end}} {{define "research-findings"}}
{{with .Summary}}

{{.}}

{{end}} {{if .Facts}}
{{range .Facts}}
{{.Label}}
{{.Value}}{{range .Sources}}{{if .URL}}{{.URL}}{{else}}{{.ID}}{{end}}{{end}}
{{end}}
{{end}} {{if .Gaps}}

{{copy "work.research.gaps"}}

{{end}} {{if .Images}}{{end}} {{if .Fetches}}
{{icon "chevron-down"}}{{printf (copy "work.research.log") (len .Fetches)}}
    {{range .Fetches}}
  1. {{.URL}}{{range .Hops}} {{.URL}}{{with .Status}} {{.}}{{end}}{{end}}{{with .Status}} {{.}}{{end}}{{with .Type}} {{.}}{{end}}{{with .Bytes}} {{fileSize .}}{{end}}{{with .Reason}} {{.}}{{end}}
  2. {{end}}
{{end}}
{{end}}