{# Inline action status indicator, polled via HTMX every 2s while any action is running. #} {# When all actions are idle/done/error, polling attribute is omitted to self-terminate. #} {# Completed banners are consumed server-side (shown once); client-side 8s auto-dismiss #} {# and a × button provide immediate control before the next poll fires. #} {% set any_running = statuses.values() | selectattr("state", "equalto", "running") | list | length > 0 %} {% set any_completed = statuses.values() | selectattr("state", "in", ["done", "error", "info"]) | list | length > 0 %} {% for name, st in statuses.items() %} {% if st.state == "running" %} ⏳ {{ name }}{% if st.message %}: {{ st.message }}{% else %}…{% endif %} {% elif st.state == "done" and st.message %} ✓ {{ name }}: {{ st.message }} {% elif st.state == "error" and st.message %} ✗ {{ name }}: {{ st.message }} {% elif st.state == "info" and st.message %} ℹ {{ name }}: {{ st.message }} {% endif %} {% endfor %} {% if any_completed %} {% endif %}