{% extends "base.html" %} {% from "_macros.html" import icon, ref, empty_state %} {% block title %}{% if count %}({{ count }}) {% endif %}Now — apo{% endblock %} {% block body_class %}page-now{% endblock %} {% block content %} {% set lanes = [ ("problems", "Problems", "Faults only you can recover", "✕"), ("your_move", "Your move", "An agent is stopped on you, or nothing else will move this", "●"), ("ready_to_land", "Ready to land", "Finished work on a branch that isn't merged yet", "⇣"), ("asks", "Asks", "The agent is still working on other things meanwhile", "◐"), ("in_transit", "In transit", "Answered — on its way to an agent", "↻"), ("review", "Review", "Finished — not looked at", "◆"), ] %}
{% if project_chips %} {% endif %} {% macro away_counts(c) -%} {%- set parts = [] -%} {%- if c.filed %}{% set _ = parts.append(c.filed ~ " filed") %}{% endif -%} {%- if c.answered %}{% set _ = parts.append(c.answered ~ " answered") %}{% endif -%} {%- if c.done %}{% set _ = parts.append(c.done ~ " done") %}{% endif -%} {%- if c.errored %}{% set _ = parts.append(c.errored ~ " API error" ~ ("s" if c.errored != 1 else "")) %}{% endif -%} {%- if c.crashed %}{% set _ = parts.append(c.crashed ~ " crashed") %}{% endif -%} {{ parts | join(" · ") }} {%- endmacro %} {% if away %} {% set c = away.counts %}
{{ icon("chevron-right", cls="chev") }} Since you were away{% if away.since_at %} {{ away.since_at | ago }}{% endif %} {{ away_counts(c) or "Nothing notable happened" }} {%- if away.due %} {%- if away.due.overdue %} · {{ away.due.overdue }} overdue{% endif %} {%- if away.due.due_soon %} · {{ away.due.due_soon }} due soon{% endif %} {%- if away.due.stuck %} · {{ away.due.stuck }} stuck{% endif %} {%- endif %} {% if away.projects %}
{% for p in away.projects %}
{{ icon("chevron-right", cls="chev") }} {{ p.name }} {% set pc = away_counts(p.counts) %}{% if pc %}{{ pc }}{% endif %} {% if p.gist %}{{ p.gist }}{% endif %}
{% if p.recap %}

{{ icon("terminal") }}Latest {{ p.recap }}

{% endif %} {% if p.events %}
    {% for e in p.events %}
  • {% if e.decision_id %}{{ e.summary }}{% else %}{{ e.summary }}{% endif %}{% if e.repeat and e.repeat > 1 %} ×{{ e.repeat }}{% endif %}
  • {% endfor %}
{% endif %} {{ "+" ~ p.more ~ " more in " if p.more else "All " }}{{ p.name }} activity
{% endfor %}
{% endif %}
{% endif %} {% set shown = namespace(n=0) %}{% for lane, heading, hint, glyph in lanes %}{% if q[lane] %}{% set shown.n = shown.n + 1 %}{% endif %}{% endfor %} {% if shown.n %} {% endif %} {% for lane, heading, hint, glyph in lanes %}{% set items = q[lane] %}{% if items and lane == "in_transit" %}
{{ icon("chevron-right", cls="chev") }}{{ items | length }} answer{{ "s" if items | length != 1 }} on {{ "their" if items | length != 1 else "its" }} way to {{ "agents" if items | length != 1 else "an agent" }}
{% for item in items %} {% include "_now_item.html" %} {% endfor %}
{% elif items %} {% set fresh = items | rejectattr("stuck", "stale_for_now") | list %} {% set stale = items | selectattr("stuck", "stale_for_now") | list %}

{{ heading }} {{ items | length }}

{{ hint }}

{% if fresh %}
{% for item in fresh %} {% include "_now_item.html" %} {% endfor %}
{% endif %} {% if stale %}
{{ icon("chevron-right", cls="chev") }}Stale ({{ stale | length }}) waiting {{ stale_days }}+ days
{% for item in stale %} {% include "_now_item.html" %} {% endfor %}
{% endif %}
{% endif %}{% endfor %} {% if q.snoozed %}
{{ icon("chevron-right", cls="chev") }}Snoozed ({{ q.snoozed | length }})
{% endif %} {% if not q.problems and not q.your_move and not q.asks and not q.in_transit and not q.review %} {% call empty_state("check-circle", "Nothing needs you") %}

{{ q.quiet.working }} working · {{ q.quiet.at_rest }} at rest. Safe to look away.

{% endcall %} {% endif %}
{% endblock %} {% block extra_script %} {% endblock %}