{#- 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 (tracker_log_required(t) 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 %} {#- The state word of the task dialog's state line (design 0025), next to the session's dot. #} {%- set st = card_state(t) %} {% if st.key != "none" %}{% if not t.session_link %}{% endif %}{{ st.label }}{% endif %} {#- Shown only in compact mode; app.js keeps its state per browser, the server never knows. #} {#- The keyboard and phone way of what a drag does (board.js); a stage move lands on top. #}
{% for s in stages if s != t.stage %}{% endfor %} {% if t.stage.value == "done" %}{% if task_archived(t) %}{% else %}{% endif %}{% endif %} {% if t.stage.value == "live" %}{% endif %}
{#- The areas on a line of their own above the title: whole, never cut by the top row's icons. #} {% if t.areas %}
{% include "_area_chip.html" %}
{% endif %}

{{ t.title }}

{#- A done task waits on nobody: its "waiting on" and "next step" are history, not shown here. #} {%- set is_open = t.stage.value != "done" %} {#- Waiting on the owner is already the state word "Waits for you" above; the chip is only for someone else (a person, a role, another session). -#} {%- set waits_on_other = t.waiting_on and is_open and ("waiting on " ~ t.waiting_on.strip()) not in st.reasons %} {#- The day time log (design 0028): only a card with time today; `times` may be missing. #} {%- set tm = times.get(t.id) if times else None %} {#- A start time, not a running duration: nothing ticks in the browser, so it never goes stale. #} {% if tm and tm.current %}now since {{ tm.since.strftime('%H:%M') }} · today {{ tm.today|hm }} {%- elif tm and tm.today %}today {{ tm.today|hm }}{% endif %} {#- An open approval request: the owner decides it in the dialog, right under Next. #} {% if t.open_approvals and is_open %}approval waits{% if t.open_approvals > 1 %} · {{ t.open_approvals }}{% endif %}{% endif %} {#- Agent replies the owner has not read. #} {% if t.unread_replies %}{% if t.unread_replies > 1 %}replies · {{ t.unread_replies }}{% else %}reply{% endif %}{% endif %} {% if t.inspect_only %}inspect-only{% endif %} {% if t.cancelled %}cancelled{% endif %} {#- Only the blockers still open; one at live or done is listed in the task dialog alone. #} {% for b in (blockers.get(t.id, []) if blockers else []) %}blocked by {{ b.key }} · {{ b.stage }} {% endfor %} {% if t.review_total %} {%- set done = t.review_accepted == t.review_total %} Review {{ t.review_accepted }}/{{ t.review_total }} {% endif %} {% if t.plan_total %} {%- set draft = t.plan_status != "accepted" %} {%- set draft_hours = plan_draft_hours(t) %} Plan {{ t.plan_done }}/{{ t.plan_total }}{% if draft %} · draft{% if draft_hours %} · {{ draft_hours }} h{% endif %}{% endif %}{% if t.plan_deviations %} · {{ t.plan_deviations }} deviation{{ "s" if t.plan_deviations > 1 else "" }}{% endif %}{% if t.plan_now %} · now: {{ t.plan_now }}{% endif %} {% endif %} {%- set c = code.get(t.id) if code else None %} {#- The branch shows on the repository rows when the task linked any (backlog #99). #} {%- set branch_chip = t.branch and not (c and c.repos) %} {% if waits_on_other or branch_chip %}
{#- Who, not what: agents often append the step after a colon; the title keeps the full text. #} {% if waits_on_other %}waiting on {{ t.waiting_on.split(":", 1)[0].strip() or t.waiting_on }}{% endif %} {% if branch_chip %}{{ t.branch }}{% endif %}
{% endif %} {% if c and c.board_shown %}
{% with branch = t.branch %}{% include "_code_row.html" %}{% endwith %}{{ c.summary }}
{% endif %} {% if t.next_step and is_open %}

Next: {{ t.next_step }}{% if t.next_step_stale %} stale{% endif %}

{% endif %}