<div id="overlay-build-status"
     {% if latest_build_is_running %}hx-get="/overlays/{{ overlay.id }}/build-status"
     hx-trigger="every 2s" hx-swap="outerHTML"{% endif %}>
  <div class="server-actions">
    <span class="state-badge {{ build_state_class }}">{{ build_state_label }}</span>
  </div>
  {% if latest_build %}
  <p class="last-job">
    <a href="/jobs/{{ latest_build.id }}">{{ latest_build_phrase }}</a>
    {% if latest_build_is_running %}since{% endif %}
    {{ latest_build_at | timeago }}
    (<a href="/overlays/{{ overlay.id }}/jobs">show all</a>)
  </p>
  {% endif %}
  {% if latest_build_is_running %}
  <pre class="log-stream job-log" data-sse-url="/jobs/{{ latest_build.id }}/stream"></pre>
  {% endif %}
</div>
