{% extends "base.html" %} {% import "_tabs.html" as tabs with context %} {% import "_report.html" as rpm %} {% import "_project_tasks.html" as ptm %} {% block title %}{{ e.name }} · {{ t.task.name }}{% endblock %} {% block crumbs %}/ {{ e.name }} / tasks / {{ t.task.name }}{% endblock %} {% block main %} {% set base = "/p/" ~ (e.name|urlencode) %} {% set k = t.task %} {{ tabs.top(e, card, "tasks", work) }}

{% if t.prev %}← task {{ t.prev }}{% endif %} {% if t.next %}task {{ t.next }} →{% endif %}

{{ k.name|capitalize }} {% if k.running %}RUNNING{% elif k.state == "NEEDS_INPUT" %}NEEDS_INPUT{% else %}{{ k.state }}{% endif %}

{% if k.first %}steps {{ k.first }}{% if k.last != k.first %}–{{ k.last }}{% endif %}{% else %}no steps yet{% endif %} · {{ k.cost_usd|money }}{% if k.running %} · live view{% elif k.next %} · next: {{ k.next }}{% endif %}

{% if k.reason %}

[{{ k.reason }}]

{% endif %}

Instruction

{% if k.text %}
{% if t.text_html is not none %}
{{ t.text_html|safe }}
{% else %}
{{ k.text }}
{% endif %}
{% else %}

{{ "The packet's first instruction (it is not recorded per task)." if k.n == 1 else "Resumed with no new instruction." }}

{% endif %} {% set r = t.report %} {% if r %}
{{ "Failed" if k.state == "FAILED" else "Finished" }} · completion report{% if k.report_step %} · written by step {{ k.report_step|int }}{% elif k.report != "report.md" %} · {{ k.report }}{% endif %}

{{ rpm.outcome(r) }}

{{ rpm.body(e, r) }} {% if r.snapshot %}

Deliverables open as they were when this task finished.

{% elif r.deliverables %}

Deliverables open as they are now: this report predates the copy a step keeps of them.

{% endif %}
{% elif k.state in ("COMPLETED", "FAILED") and not k.running %}
{{ "Failed" if k.state == "FAILED" else "Finished" }} without a completion report. Last summary:

{{ k.summary or "(none)" }}

{% endif %} {% if t.children %}

Sub-tasks

{{ ptm.table(e, t.children, full=True) }} {% endif %}

Steps

{% if k.steps %}
{% for s in k.steps %} {% endfor %}
StepStartedOutcomeTimeCostSummary
{{ s.n }}{% if s.outcome == "failed" %}.{{ s.attempt }}{% endif %} {{ s.start|when }} {{ s.outcome }}{% if s.worker and s.worker != "agent" %} {{ s.worker }}{% endif %} {{ s.duration_s|secs }} {{ s.cost_usd|money }} {% if s.why %}{{ s.why }}{% else %}{{ s.summary }}{% endif %}
{% else %}

None yet.

{% endif %} {% endblock %}