From 88f54d9a7699944b7d56f978e724b1c0b54dde98 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 19 Nov 2026 19:42:41 +0100 Subject: feat(sender): add bulk resend and delivery history Allow admins to resend all failed Webmentions globally or requeue every delivery for a source using the shared confirmation workflow. Record outgoing status history, expand sent source details, and provide human-readable guidance for current and historical delivery failures. --- webmentions_ssg/templates/sent_source.html | 442 +++++++++++++++++------------ 1 file changed, 258 insertions(+), 184 deletions(-) (limited to 'webmentions_ssg/templates/sent_source.html') diff --git a/webmentions_ssg/templates/sent_source.html b/webmentions_ssg/templates/sent_source.html index a24bde3..600934c 100644 --- a/webmentions_ssg/templates/sent_source.html +++ b/webmentions_ssg/templates/sent_source.html @@ -6,6 +6,7 @@ SPDX-License-Identifier: BSD-3-Clause {% extends "base.html" %} {% from "bootstrap5/pagination.html" import render_pagination %} +{% from "includes/failure_guidance.html" import render_failure %} {% set sent_status_presentation = { "sent": { "row_class": "table-success", @@ -28,204 +29,277 @@ SPDX-License-Identifier: BSD-3-Clause
← Back to Sent Webmentions
-
+

Sent Webmention Source

+ {% if source.deleted_at is none %} + Active + {% else %} + Deleted + {% endif %}
-
-
-
UUID
-
- {{ source.uuid }} -
-
Hash
-
- {{ source.content_hash }} -
-
Path
-
- {{ source.path }} -
-
URL
-
- {{ source.url }} -
-
Created at
-
- -
-
Last seen at
-
- -
-
Revised at
-
- -
-
Deleted at
-
- {% if source.deleted_at is none %} - N/A - {% else %} -
+
Last seen
+
+ +
+
Revised
+
+ +
+
Deleted
+
+ {% if source.deleted_at is none %} + Never + {% else %} + + {% endif %} +
+
Revision
+
+ {{ source.revision }} +
+
+
+ +
+
- {% if webmentions.items %} -
- - - - - - - - - - - - - - {% for webmention in webmentions %} - {% set style = sent_status_presentation.get(webmention.status, {"row_class": "table-info", "badge_class": "text-bg-info", "label": "Pending" }) %} - - - - - - {% endfor %} - -
StatusTargetActiveRevisionsDeliveryLast activityActions
- {{ style.label }} - {% if webmention.failure_reason is not none %} -
{{ webmention.failure_reason }}
- {% endif %} - {% if webmention.awaiting_processing and webmention.attempt_count > 0 and webmention.next_retry_at is not none %} -
- Retry scheduled after attempt {{ webmention.attempt_count }}: - +
+
+

Sent Webmentions

+ {{ webmentions.total }} webmentions +
+ {% if webmentions.items %} +
+ + + + + + + + + + + + + + {% for webmention in webmentions %} + {% set style = sent_status_presentation.get(webmention.status, {"row_class": "table-info", "badge_class": "text-bg-info", "label": "Pending" }) %} + + + + + - - - - + + + + + {% endfor %} + +
StatusTargetActiveRevisionsDeliveryLast activityActions
+ {{ style.label }} + {% if webmention.failure_reason is not none %} +
{{ render_failure(webmention.failure_reason, "sent") }}
+ {% endif %} + {% if webmention.awaiting_processing and webmention.attempt_count > 0 and webmention.next_retry_at is not none %} +
+ Retry scheduled after attempt {{ webmention.attempt_count }}: + +
+ {% endif %} +
+ {{ webmention.target }} + + {% if webmention.linked %} + Active + {% else %} + Removed + {% endif %} + +
+ Desired: + {{ webmention.desired_revision }}
- {% endif %} -
- {{ webmention.target }} - - {% if webmention.linked %} - Active - {% else %} - Removed - {% endif %} - -
- 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 "—" }} -
-
- {% if webmention.webmention_endpoint is not none %} -
- Endpoint: - {{ webmention.webmention_endpoint }} +
+ Processed: + {{ webmention.processed_revision + if webmention.processed_revision is not none + else "—" }}
- {% endif %} - {% if webmention.endpoint_response_status is not none %} +
+ Sent: + {{ webmention.sent_revision + if webmention.sent_revision is not none + else "—" }} +
+
+ {% if webmention.webmention_endpoint is not none %} + + {% endif %} + {% if webmention.endpoint_response_status is not none %} +
+ HTTP: + {{ webmention.endpoint_response_status }} +
+ {% endif %} + {% if webmention.status_url is not none %} +
+ Status: + {% if webmention.status_url | is_http_url %} + {{ webmention.status_url }} + {% else %} + {{ webmention.status_url }} + {% endif %} +
+ {% endif %} +
- HTTP: - {{ webmention.endpoint_response_status }} + Attempted: +
+ {% if webmention.last_attempted_at is not none %} + + {% else %} + — + {% endif %}
- {% endif %} - {% if webmention.status_url is not none %}
- Status: - {% if webmention.status_url | is_http_url %} - {{ webmention.status_url }} + Sent: +
+ {% if webmention.last_sent_at is not none %} + {% else %} - {{ webmention.status_url }} + — {% endif %}
+
+ +
+
+ {% if webmentions.pages > 1 %} +
{{ render_pagination(webmentions, args=dict(filters, source_page=source_page, history_page=history.page)) }}
+ {% endif %} + {% else %} +

No Webmentions have been discovered for this source.

+ {% endif %} +
+
+

Status history

+ {% if history.items %} +
    + {% for event in history.items %} + {% set style = sent_status_presentation.get(event.status, {"badge_class": "text-bg-info", "label": "Pending"}) %} +
  1. +
    +
    + {{ style.label }} + {{ event.action }} + +
    + +
    + Revision {{ event.revision }} · Attempt {{ event.attempt_count }} + {% if event.endpoint_response_status is not none %} + · HTTP {{ event.endpoint_response_status }} {% endif %} -
-
- Attempted: -
- {% if webmention.last_attempted_at is not none %} - - {% else %} - — - {% endif %} -
-
- Sent: -
- {% if webmention.last_sent_at is not none %} - - {% else %} - — - {% endif %} -
-
- -
-
- {% if webmentions.pages > 1 %} -
{{ render_pagination(webmentions, args=dict(filters, source_page=source_page)) }}
+
+ {% if event.failure_reason %} +
{{ render_failure(event.failure_reason, "sent") }}
+ {% endif %} + + + {% endfor %} + + {% if history.pages > 1 %} +
+ {{ render_pagination( + history, + endpoint='webmentions.sent_source_history_pagination', + args=dict( + filters, + source_uuid=source.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 historical delivery events were recorded for this source. Current Webmention statuses appear above.

{% endif %} - {% include "includes/confirmation_modal.html" %} - {% else %} -

No Webmentions have been discovered for this source.

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