{% from "_macros.html" import icon %} {# What sits where a task chat's composer would be. Three plain forms rather than htmx: each one changes what the page says about itself — when it next runs, whether it is paused, a whole new reply — so a redirect back is the honest response, and a refresh cannot re-submit it. Every button here is the reader acting on their own schedule, so nothing is checked against the chat's mode. That is the same argument the terminal panel, the directory browser and the jobs panel already make: the model is governed, the person is not. #}
{% if schedule %}
{{ schedule_summary }}
{%- if not schedule.enabled %} Paused. {%- elif schedule_next %} Next run {{ schedule_next.strftime("%a %-d %b, %H:%M") }}. {%- else %} Nothing left to run. {%- endif %} {%- if schedule.fired_count %} Run {{ schedule.fired_count }} times so far.{% endif %} {%- if schedule.target == "report" %} Files a report each time.{% endif %}
{% if schedule.last_error %}
{{ schedule.last_error }}
{% endif %}
{{ icon("gear", "icon--sm") }} Edit
{% else %} {# The schedule was removed but its chat was kept, which is the default when somebody deletes one. Said plainly rather than left as an empty bar. #} {% endif %}