{% if corrections %}
  {% for ev in corrections %}
  <div class="sc-event sc-status-{{ ev.outcome_status }}">
    <div class="sc-event-header">
      <span class="sc-status-badge sc-status-{{ ev.outcome_status }}">
        {% if ev.outcome_status == 'success' %}&#10003; CORRECTED
        {% elif ev.outcome_status == 'partial' %}&#9679; PARTIAL
        {% else %}&#10007; FAILED
        {% endif %}
      </span>
      <span class="sc-source-badge">{{ ev.source }}</span>
      <span class="sc-event-time">{{ ev.created_at[:19] }}</span>
    </div>
    <div class="sc-event-error-type">{{ ev.error_type }}</div>
    <div class="sc-event-intent"><span class="sc-label">INTENT:</span> {{ ev.original_intent[:120] }}{% if ev.original_intent | length > 120 %}&hellip;{% endif %}</div>
    <div class="sc-event-error"><span class="sc-label">ERROR:</span> {{ ev.detected_error[:120] }}{% if ev.detected_error | length > 120 %}&hellip;{% endif %}</div>
    <div class="sc-event-strategy"><span class="sc-label">STRATEGY:</span> {{ ev.correction_strategy[:120] }}{% if ev.correction_strategy | length > 120 %}&hellip;{% endif %}</div>
    <div class="sc-event-outcome"><span class="sc-label">OUTCOME:</span> {{ ev.final_outcome[:120] }}{% if ev.final_outcome | length > 120 %}&hellip;{% endif %}</div>
    {% if ev.task_id %}
    <div class="sc-event-meta">task: {{ ev.task_id[:8] }}</div>
    {% endif %}
  </div>
  {% endfor %}
{% else %}
  <div class="text-center text-muted py-3">No self-correction events recorded yet.</div>
{% endif %}
