{# Partial: gateway policy status panel (polled every 5s by the list page). T-157. Pull-based (no SSE). #}
{% if not status.reachable %}
⚠ gateway unreachable {% if status.error %} · {{ status.error }}{% endif %}

The watcher will pick up disk saves within ~2s. Set NEURALGENTICS_GATEWAY_URL for immediate reloads.

{% elif not status.enabled %}
gateway policy subsystem disabled

No policies_dir configured on the gateway.

{% else %}
{{ status.statements }} statements in {{ status.files|length }} file{{ '' if status.files|length == 1 else 's' }} default: {{ status.default_decision }}
{% if status.last_reload %}
last reload: {{ status.last_reload }} {% if status.watch_enabled %}· watcher on ({{ status.watch_interval_seconds }}s){% else %}· watcher off{% endif %}
{% else %}
no reload recorded yet
{% endif %}
{{ status.gateway_policies_dir }}
{% endif %}