{% extends "base.html" %} {% block title %}Email Detail{% endblock %} {% block content %}
← Back

{{ entry.subject or '(no subject)' }}

{{ status_labels.get(entry.status, entry.status) }} {% if entry.error_message %} — {{ entry.error_message }} {% endif %}

Envelope

From
{{ entry.sender_name or '' }} {% if entry.sender_name %}<{{ entry.sender_address }}>{% else %}{{ entry.sender_address }}{% endif %}
Mailbox
{{ entry.mailbox }}
Received
{{ entry.received_at.strftime('%Y-%m-%d %H:%M:%S UTC') if entry.received_at else '—' }}
Attachments
{% if entry.has_attachments %}yes{% else %}no{% endif %}
Sender Type
{{ sender_type_labels.get(entry.sender_type, entry.sender_type) }}

Decision

Final Action
{{ action_labels.get(entry.final_action, entry.final_action) }}
{% if entry.action_overridden %}
LLM Suggested
{{ action_labels.get(entry.llm_suggested_action, entry.llm_suggested_action or '—') }}
⚡ Overridden by business rule
{% endif %}
Executed At
{{ entry.action_executed_at.strftime('%H:%M:%S UTC') if entry.action_executed_at else '—' }}
{% if entry.action_error %}
Error
{{ entry.action_error }}
{% endif %}
Retry Count
{{ entry.retry_count }}

LLM Classification

{% if entry.llm_classification %}
Classification
{{ classification_labels.get(entry.llm_classification, entry.llm_classification) }}
Confidence
{% if entry.llm_confidence is not none %}{{ (entry.llm_confidence * 100)|int }}%{% else %}—{% endif %}
Model
{{ entry.llm_model or '—' }}
Tokens
{% if entry.llm_input_tokens %}{{ entry.llm_input_tokens + (entry.llm_output_tokens or 0) }}{% else %}—{% endif %}
{% if entry.llm_input_tokens %}
{{ entry.llm_input_tokens }} in / {{ entry.llm_output_tokens or 0 }} out
{% endif %}
{% if entry.llm_reasoning %}
Reasoning
{{ entry.llm_reasoning }}
{% endif %} {% if entry.llm_raw_response %}
Raw LLM response
{{ entry.llm_raw_response | tojson(indent=2) }}
{% endif %} {% else %}

No LLM classification data.

{% endif %}

Sender Profile

{% if not profile %} {% endif %}
{% include "sender_profile_card.html" %}

Pipeline Timing

Started
{{ entry.processing_started_at.strftime('%H:%M:%S UTC') if entry.processing_started_at else '—' }}
Completed
{{ entry.processing_completed_at.strftime('%H:%M:%S UTC') if entry.processing_completed_at else '—' }}
Duration
{% if entry.processing_started_at and entry.processing_completed_at %} {{ ((entry.processing_completed_at - entry.processing_started_at).total_seconds() * 1000)|int }}ms {% else %}—{% endif %}
Log Created
{{ entry.created_at.strftime('%Y-%m-%d %H:%M:%S UTC') if entry.created_at else '—' }}
Graph Message ID
{{ entry.graph_message_id[:40] }}…
{% endblock %}