{{define "up"}}/journey{{end}} {{define "up-label"}}{{copy "nav.journey"}}{{end}} {{define "content"}}

{{copy "task.plan"}}

{{template "region:activity" .}}{{end}} {{define "region:activity"}}
{{with .TaskView}} {{template "task-card" .}}

{{.Task.ReviewRef}}

{{.Task.MergeOwner}}

{{if .MergeReference}}

{{.MergeReference}}

{{end}} {{if .CanStopOldRunner}}

{{copy "task.old_runner_stopped.help"}}

{{end}} {{if .CanCancel}}
{{end}} {{if .CanMerge}}{{copy "task.merge"}}{{end}} {{if eq .Task.Kind "rendered_change"}}{{copy "evidence.render_approval"}}{{end}}

{{copy "task.selected"}}

{{range .Steps}}

{{copy (printf "plan.action.%s" .Action)}}: {{.Model}} {{.Account}}

{{if .Actual}}

{{copy "task.actual"}}: {{.Actual}}

{{end}}{{if .AllowanceKnown}}

{{copy "usage.allowance"}}: {{.AllowanceRemaining}}

{{else}}{{if .Model}}

{{copy "usage.allowance_unknown"}}

{{end}}{{end}}{{template "isolation-history" .Isolation}}{{end}}

{{copy "budget.usage"}}

{{if .UsageKnown}}

{{copy "usage.counted_turns"}}: {{.CountedTurns}}

{{copy "usage.tokens"}}: {{.InputTokens}} / {{.OutputTokens}}

{{else}}

{{copy "usage.unknown"}}

{{end}}

{{copy "task.questions"}}

{{range .Questions}}
{{.Text}}

{{copy (printf "question.%s" .State)}}

{{if .CanAnswer}}{{copy "task.answer"}}{{end}}
{{end}}

{{copy "task.evidence"}}

{{range .Evidence}}

{{.Role}} {{.Hash}}

{{if .Unconfined}}

{{copy "isolation.unconfined"}}

{{end}}

{{.Actual}}

{{template "isolation-history" .Isolation}}
{{.Detail}}
{{end}} {{range .Logs}}
{{if .Unconfined}}

{{copy "isolation.unconfined"}}

{{end}}

{{.Actual}}

{{template "isolation-history" .Isolation}}
{{.Detail}}
{{end}} {{end}}
{{end}} {{define "isolation-history"}}{{template "trial-label" .}}{{if .ObservedTuples}}
{{copy "task.provenance"}}{{range .ObservedTuples}}

{{.Provider}} {{.ProviderVersion}} / {{if .LauncherVersion}}{{.LauncherVersion}} / {{.BwrapVersion}} / {{.PolicyVersion}}{{else}}{{.PaseoVersion}}{{end}} / {{.IsolationConfigHash}}

{{end}}

{{copy "isolation.acknowledgements"}}: {{range .AcknowledgementIDs}}{{.}} {{end}}

{{end}}{{end}}