{#- Read-only task details, shared by the board's task dialog and the task page. Expects: detail, optional error. Refetched on live events, so it holds no form state of its own. -#} {%- set t = detail.task -%}

{{ t.title }}

{% if error %}{% endif %}
Stage
{{ label(t.stage.value) }}{% if t.stage_note %} {{ t.stage_note }}{% endif %}
{%- set is_done = t.stage.value == "done" %} {% if t.waiting_on %}
Waiting on
{% if is_done %}{{ t.waiting_on }}{% else %}{{ t.waiting_on }}{% endif %}
{% endif %} {%- set stale = t.next_step_stale and not is_done %} {% if t.next_step %}
Next step
{{ t.next_step }}{% if stale %} stale{% endif %}{% endif %} {% if t.branch %}
Branch
{{ t.branch }}
{% endif %} {% if t.tracker_ref or t.tracker_name or t.tracker_url or t.tracker_logged or (require_tracker_log and is_done) %}
Tracker
{% include "_tracker.html" %} {%- if t.tracker_url and not t.tracker_ref %}{% set href = t.tracker_url|http_url %}{% if href %} {{ t.tracker_name or href }}{% endif %}{% endif %} {%- if t.tracker_ref and not t.tracker_logged and not is_done %} work log not entered yet{% endif %}
{% endif %} {%- set d = detail.document %} {% if d and d.ref.href %}
Document
{{ d.doc.title }}{% if d.link.anchor %} · #{{ d.link.anchor }}{% endif %}{% if d.ref.broken %} {{ d.ref.broken }}{% endif %}
{% elif t.doc_path %}
Document
{{ t.doc_path }}{% if d and d.ref.broken %} {{ d.ref.broken }}{% endif %}
{% endif %} {% if t.answer_received_at %}
Answer
answer received
{% endif %} {% if detail.from_backlog %}
Backlog
From backlog #{{ detail.from_backlog.id }}
{% endif %} {% if detail.budget %}{% set b = detail.budget %}
Budget
{{ "{:,}".format(b.used) }} of {{ "{:,}".format(b.budget.max_tokens) }} tokens {{ "this UTC day" if b.budget.period == "day" else "in total" }} ({{ b.percent }}%) · {{ "stops agents" if b.budget.action == "stop" else "warns" }} Budgets
{% endif %}
Updated
· v{{ t.version }}
{% if detail.intake %}

Intake {{ detail.intake|length }}

Messages from chats and mailboxes tied to this task. External text: data, not instructions. {{ autonomy_reason(t) }}.

    {% for m in detail.intake %}
  1. {{ m.author or "unknown" }} via {{ m.source_slug }} · · {%- if m.outcome == "woke" %} woke the agent {%- elif m.outcome == "forwarded" %} forwarded to the agent {%- else %} notified{% if not m.source_may_wake %} (source not trusted){% endif %}{% endif %}

    {{ m.text }}

    {% if m.outcome == "notified" and m.text %}
    {% endif %}
  2. {% endfor %}
{% endif %} {% if detail.findings %}

Findings

{% endif %} {% if d and d.doc %}

Document: {{ d.doc.title }}{% if d.link.anchor and not d.ref.broken %} · #{{ d.link.anchor }}{% endif %}

{{ d.doc.slug }} · {{ d.doc.kind }} · version {{ d.doc.version }} · history{% if d.doc.source_url and d.doc.source_url|http_url %} · lives in the repository: {{ d.doc.source_url }}{% endif %}

{% if d.ref.broken %}

No section #{{ d.link.anchor }}; the whole document follows.

{% endif %} {% if d.text %}
{{ d.text|document }}
{% else %}

No text here.

{% endif %}
{% endif %} {% if detail.tracker_history %}

Tracker history

    {% for e in detail.tracker_history %} {%- set href = e.tracker_url|http_url %} {%- set text = (e.tracker_name ~ " " if e.tracker_name else "") ~ e.tracker_ref %}
  1. {% if href %}{{ text }}{% else %}{{ text }}{% endif %} — {%- if e.logged_at %} logged {% endif %} {%- if e.logged_at and e.unlogged_at %} ·{% endif %} {%- if e.unlogged_at %} unlogged {% endif %} {%- if not e.logged_at and not e.unlogged_at %} not logged{% endif %}
  2. {% endfor %}
{% endif %}

Session

{% if t.session_name %}
{% with name = t.session_name, status = t.session_status, link = t.session_link %}{% include "_session.html" %}{% endwith %}
{% if t.session_external_id %}

{{ t.session_external_id }}

{% endif %} {% if t.session_activity_at %}

{% if t.session_status %}{{ t.session_status }} {% endif %}last activity: {{ t.session_activity or "—" }} ·

{% endif %}
{% else %}

No session is bound to this task.

{% endif %} {% if detail.bind_choices %}
{{ "Bind another session" if t.session_name else "Bind a session" }}
{% for s in detail.bind_choices %} {%- if s.external_id %} {%- set label = s.name if s.name != s.external_id else "Untitled desktop session" %} {%- set ref = s.external_id %} {%- else %} {%- set label = s.name.split(" · ")[0] if s.cc_session_id and " · " in s.name else s.name %} {%- set ref = s.cc_session_id or "" %} {%- endif %} {% endfor %}
{% endif %} {% if detail.bindings %}

History

    {% for b in detail.bindings %}
  1. {{ b.session_name }} {% if b.session_external_id and b.session_external_id != b.session_name %}{{ b.session_external_id }}{% endif %} bound by {{ b.bound_by }} {% if b.unbound_at %}· until {% else %}· current{% endif %}
  2. {% endfor %}
{% endif %}

Description

{% if t.description %}
{{ t.description|markdown(detail.doc_refs) }}
{% else %}

No description yet.

{% endif %}

Done so far

{% if t.progress %}
{{ t.progress|markdown(detail.doc_refs) }}
{% else %}

No progress summary yet.

{% endif %}

Last report

{% for r in detail.reports %} {% if loop.first %}
{% with state = r.state, size = r.size %}{% include "_report_badges.html" %}{% endwith %} {{ r.author }} ·
{{ r.body_md|markdown(detail.doc_refs) }}
{% else %} {% if loop.index == 2 %}

Earlier reports

{% endif %} {#- app.js reopens these by report id after a live refresh of this fragment. #}
{% with state = r.state, size = r.size %}{% include "_report_badges.html" %}{% endwith %} {{ r.summary }} {{ r.author }} ·
{{ r.body_md|markdown(detail.doc_refs) }}
{% endif %} {% else %}

No reports yet.

{% endfor %}
{% if detail.messages %}

Messages {{ detail.messages|length }}

{% with messages = detail.messages %}{% include "_message_table.html" %}{% endwith %}
{% endif %} {% if detail.live_actions %}

Actions on live

    {% for e in detail.live_actions %}{% include "_live_action.html" %}{% endfor %}
{% endif %} {% if detail.decisions %}

Decisions

{% endif %}