From ef90dc381322122ecfb9af039cf790de92807514 Mon Sep 17 00:00:00 2001
From: Dennis Fink
Date: Sat, 21 Nov 2026 14:49:28 +0100
Subject: feat(sender): split source and delivery history
Add per-Webmention detail pages so delivery state, failure guidance,
status URLs, and delivery history no longer crowd the source overview.
Track source lifecycle events separately for discovery, revision,
deletion, and restoration, and add a source-level action to resend only
failed Webmentions.
---
.../templates/sent_webmention_detail.html | 176 +++++++++++++++++++++
1 file changed, 176 insertions(+)
create mode 100644 webmentions_ssg/templates/sent_webmention_detail.html
(limited to 'webmentions_ssg/templates/sent_webmention_detail.html')
diff --git a/webmentions_ssg/templates/sent_webmention_detail.html b/webmentions_ssg/templates/sent_webmention_detail.html
new file mode 100644
index 0000000..fc7d7a4
--- /dev/null
+++ b/webmentions_ssg/templates/sent_webmention_detail.html
@@ -0,0 +1,176 @@
+
+{% extends "base.html" %}
+
+{% from "bootstrap5/pagination.html" import render_pagination %}
+{% from "includes/failure_guidance.html" import render_failure %}
+{% set sent_status_presentation = {
+ "sent": {
+ "badge_class": "text-bg-success",
+ "label": "Sent"
+ },
+ "no_endpoint": {
+ "badge_class": "text-bg-warning",
+ "label": "Unsupported"
+ },
+ "failed": {
+ "badge_class": "text-bg-danger",
+ "label": "Failed"
+ }
+} %}
+
+{% block content %}
+
+
+
Sent Webmention
+ {% set style = sent_status_presentation.get(webmention.status, {"badge_class": "text-bg-info", "label": "Pending"}) %}
+ {{ style.label }}
+
+
+
+
Delivery details
+
+ Source
+
+ {{ source.url }}
+
+ Target
+
+ {{ webmention.target }}
+
+ Link
+
+ {{ 'Linked' if webmention.linked else 'Removed' }}
+
+ Created
+
+ {{ webmention.created_at | relative_time }}
+
+ Revisions
+
+ Desired {{ webmention.desired_revision }} · Processed {{ webmention.processed_revision if webmention.processed_revision is not none else '—' }} · Sent {{ webmention.sent_revision if webmention.sent_revision is not none else '—' }}
+
+ Attempts
+
+ {{ webmention.attempt_count }}
+
+ {% if webmention.next_retry_at is not none and webmention.awaiting_processing %}
+ Next retry
+
+ {{ webmention.next_retry_at | relative_time }}
+
+ {% endif %}
+ Last attempted
+
+ {% if webmention.last_attempted_at is not none %}
+ {{ webmention.last_attempted_at | relative_time }}
+{% else %}—{% endif %}
+
+ Last sent
+
+ {% if webmention.last_sent_at is not none %}
+ {{ webmention.last_sent_at | relative_time }}
+{% else %}—{% endif %}
+
+ {% if webmention.webmention_endpoint is not none %}
+ Endpoint
+
+ {{ webmention.webmention_endpoint }}
+
+ {% endif %}
+ {% if webmention.endpoint_response_status is not none %}
+ Endpoint HTTP
+
+ {{ webmention.endpoint_response_status }}
+
+ {% endif %}
+ {% if webmention.status_url is not none %}
+ Status URL
+
+ {% if webmention.status_url | is_http_url %}{{ webmention.status_url }} {% else %}{{ webmention.status_url }}{% endif %}
+
+ {% endif %}
+ {% if webmention.failure_reason %}
+ Failure
+
+ {{ render_failure(webmention.failure_reason, "sent") }}
+
+ {% endif %}
+ Webmention ID
+
+ {{ webmention.uuid }}
+
+
+
+
+
+ Resend
+
+
+ Delivery history
+ {% if history.items %}
+
+ {% for event in history.items %}
+ {% set event_style = sent_status_presentation.get(event.status, {"badge_class": "text-bg-info", "label": "Pending"}) %}
+
+
+ {{ event_style.label }}
+ {{ event.action }}
+ {{ event.occurred_at | relative_time }}
+
+
+ Revision {{ event.revision }} · Attempt {{ event.attempt_count }}
+ {% if event.endpoint_response_status is not none %}· HTTP {{ event.endpoint_response_status }}{% endif %}
+
+ {% if event.failure_reason %}
+ {{ render_failure(event.failure_reason, "sent") }}
+ {% endif %}
+
+ {% endfor %}
+
+ {% if history.pages > 1 %}
+
+ {{ render_pagination(
+ history,
+ endpoint='webmentions.sent_webmention_history_pagination',
+ args=dict(
+ filters,
+ source_uuid=source.uuid,
+ webmention_uuid=webmention.uuid,
+ source_page=source_page if source_page > 1 else none,
+ webmentions_page=webmentions_page if webmentions_page > 1 else none
+ ),
+ fragment='status-history-heading'
+ ) }}
+
+ {% endif %}
+ {% else %}
+ No delivery events have been recorded for this Webmention yet.
+ {% endif %}
+
+ {% include "includes/confirmation_modal.html" %}
+{% endblock %}
+
+{% block scripts %}
+ {{ super() }}
+
+{% endblock %}
--
cgit v1.3.1