{#- The Review tab: the acceptance checklist with screenshots. Expects: t (the task), review, optional error. Refetched on live events; the comment boxes are inside it, so a refresh waits while one holds text (app.js). -#} {%- macro thumbs(items) -%} {% if items %} {% endif %} {%- endmacro -%}
{% if error %}{% endif %} {% if review.steps %}

{{ review.accepted }} of {{ review.steps|length }} accepted{% if review.rejected %} · {{ review.rejected }} rejected{% endif %}. A decision reaches {{ t.session_name or "the bound session" }} as a comment.

    {% for s in review.steps %} {%- set base = "/p/" ~ t.project_slug ~ "/t/" ~ t.key ~ "/review/" ~ s.id %}
  1. {{ s.status }}
    {% if s.details_md %}
    What, how and why
    {{ s.details_md|markdown }}
    {% endif %} {{ thumbs(s.attachments) }} {% if s.thread %} {#- The step's conversation like a messenger: the owner on the right, the agent on the left. #}
      {% for c in s.thread %}
    1. {% if not c.from_owner %}{{ "Agent" if c.author.startswith("local_") else c.author }}{% endif %} {%- set lead = "On step " ~ s.position ~ " '" ~ s.title ~ "': " %} {% if c.author_kind == "external" %}

      {{ c.body_md }}

      {% else %}
      {{ (c.body_md[lead|length:] if c.body_md.startswith(lead) else c.body_md)|markdown }}
      {% endif %} {%- if c.from_owner %}{% if c.read_at %} · read{% elif c.delivered_at %} · delivered{% else %} · not delivered yet{% endif %}{% endif %}
    2. {% endfor %}
    {% endif %}
    {% if s.status != "rejected" %}{% endif %} {% if s.status != "accepted" %}{% endif %}
  2. {% endfor %}
{% else %} {% with kind = "review" %}{% include "_tab_empty.html" %}{% endwith %} {% endif %} {% if review.loose %}

Other screenshots

{{ thumbs(review.loose) }} {% endif %}