{% extends "base.html" %} {% block content %}

Thread #{{ thread.id }}

Subject: {{ thread.subject }}

Account: {{ thread.account_email }}

{% if thread.requires_reply %} Needs reply {% else %} Up to date {% endif %}

AI Analysis

Actionable: {% if ai.actionable %}Yes{% else %}No{% endif %}

Summary: {{ ai.summary or thread.ai_summary }}

Confidence: {{ ai.confidence }} • Model: {{ ai.model }}

Last stored: {{ thread.last_analyzed_at }}

Last alert level sent: {{ thread.last_alert_level_sent }} at {{ thread.last_alert_sent_at }}

Messages

{% for m in messages %}
{{ m.date_sent }} • {% if m.is_incoming %}Incoming{% else %}Outgoing{% endif %} • {{ m.folder }}
From: {{ m.from_email }} → To: {{ m.to_email }}
{{ m.subject }}
{{ m.body }}
{% else %}

No messages.

{% endfor %}
{% endblock %}