{% comment %}Agent drawer (agent.js loads it into #agent-drawer-body): the case's recent agent changes, with Undo, and the agent's notes. Notes and revision notes are plain text: autoescaped, line breaks only, never rendered as HTML or markdown. The buttons are handled by agent.js (data-agent-undo / data-agent-dismiss), not by htmx.{% endcomment %}

Notes

{% for note in notes %}
{{ note.author }} {{ note.created|date:"M d, H:i" }} {% if note.dismissed %} read {% else %} {% endif %}
{{ note.body|linebreaksbr }}
{% empty %}
No notes from the agent.
{% endfor %}

Changes revision {{ case.revision }}

{% for rev in revisions %}
#{{ rev.number }} {{ rev.get_source_display|lower }} {{ rev.author }} {{ rev.created|date:"M d, H:i:s" }} {% if rev.undone_by_id %} undone {% else %} {% endif %}
{% if rev.note %}
{{ rev.note|linebreaksbr }}
{% endif %} {% for key, old, new in rev.display_changes %} {% empty %} {% endfor %}
{{ key }} {% if old is None %}—{% else %}{{ old|truncatechars:60 }}{% endif %} → {% if new is None %}—{% else %}{{ new|truncatechars:60 }}{% endif %}
No values changed.
{% empty %}
The agent has not changed this case.
{% endfor %}