{#- The card shows only what is needed at a glance; the task dialog has everything else. -#}
{{ t.key }}
{% if t.tracker_ref or t.tracker_logged or (require_tracker_log and t.stage.value == "done") %}{% include "_tracker.html" %}{% endif %}
{% if t.session_link %}
{%- set status_text = (" (" ~ t.session_status ~ ")") if t.session_status else "" %}
{% if t.session_status %}{% endif %}
{% endif %}
{#- Shown only in compact mode; app.js keeps its state per browser, the server never knows. #}
{#- Who, not what: agents often append the step after a colon; the title keeps the full text. #}
{% if t.waiting_on and is_open %}waiting on {{ t.waiting_on.split(":", 1)[0].strip() or t.waiting_on }}{% endif %}
{% if t.branch %}{{ t.branch }}{% endif %}
{% endif %}
{% if t.next_step and is_open %}
Next: {{ t.next_step }}{% if t.next_step_stale %} stale{% endif %}