From 5e24e8307f650e72881f747661a2b6e52db15f2d Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Tue, 17 Nov 2026 19:43:04 +0100 Subject: feat(receiver): add Webmention detail and status history Add an authenticated detail view with full failure information, timestamps, actions, public status links, and recorded lifecycle transitions. Persist verification and resubmission events, backfill existing rows during migration, and clean up history when received Webmentions are deleted. --- webmentions_ssg/templates/received_detail.html | 148 +++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 webmentions_ssg/templates/received_detail.html (limited to 'webmentions_ssg/templates/received_detail.html') diff --git a/webmentions_ssg/templates/received_detail.html b/webmentions_ssg/templates/received_detail.html new file mode 100644 index 0000000..091e2e4 --- /dev/null +++ b/webmentions_ssg/templates/received_detail.html @@ -0,0 +1,148 @@ + +{% extends "base.html" %} + +{% set status_presentation = { + "received": { + "badge": "text-bg-info", + "label": "Pending" + }, + "verifying": { + "badge": "text-bg-warning", + "label": "Verifying" + }, + "verified": { + "badge": "text-bg-success", + "label": "Verified" + }, + "failed": { + "badge": "text-bg-danger", + "label": "Declined (failed)" + }, + "source_removed": { + "badge": "text-bg-danger", + "label": "Declined (source removed)" + } +} %} + +{% block styles %} + {{ super() }} + +{% endblock %} + +{% block content %} +
+ ← Back to received Webmentions +
+
+

Received Webmention

+ {% set style = status_presentation.get(webmention.status, {"badge": "text-bg-secondary", "label": "Unknown"}) %} + {{ style.label }} +
+
+
+

Details

+
+
Source
+
+ {{ webmention.source }} +
+
Target
+
+ {{ webmention.target }} +
+
Received
+
+ +
+
Last updated
+
+ +
+
Recovery attempts
+
+ {{ webmention.recovery_attempts }} (automatic stale-verification recoveries; resets when verification is explicitly reopened) +
+
Webmention ID
+
+ {{ webmention.uuid }} +
+
Public status
+
+ View public status page +
+
Failure reason
+
+ {% if webmention.failure_reason %} +
{{ webmention.failure_reason }}
+ {% else %} + None + {% endif %} +
+
+
+
+
+ + + +
+
+

Status history

+ {% if history %} +
    + {% for event in history %} + {% set event_style = status_presentation.get(event.status, {"badge": "text-bg-secondary", "label": "Unknown"}) %} +
  1. +
    + {{ event_style.label }} + {{ event.action }} + +
    +
    Recovery attempts: {{ event.recovery_attempts }}
    + {% if event.failure_reason %} +
    {{ event.failure_reason }}
    + {% endif %} +
  2. + {% endfor %} +
+ {% else %} +

No historical transitions were recorded for this Webmention. Its current status appears above.

+ {% endif %} +
+ {% include "includes/confirmation_modal.html" %} +{% endblock %} + +{% block scripts %} + {{ super() }} + +{% endblock %} -- cgit v1.3.1