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. --- webmentions_ssg/templates/sent_source.html | 227 ++++++++--------------------- 1 file changed, 60 insertions(+), 167 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 600934c..d3da4ea 100644 --- a/webmentions_ssg/templates/sent_source.html +++ b/webmentions_ssg/templates/sent_source.html @@ -6,20 +6,16 @@ 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", "badge_class": "text-bg-success", "label": "Sent" }, "no_endpoint": { - "row_class": "table-warning", "badge_class": "text-bg-warning", "label": "Unsupported" }, "failed": { - "row_class": "table-danger", "badge_class": "text-bg-danger", "label": "Failed" } @@ -39,16 +35,8 @@ SPDX-License-Identifier: BSD-3-Clause
-

Details

+

Source details

-
Source ID
-
- {{ source.uuid }} -
-
Content hash
-
- {{ source.content_hash }} -
Path
{{ source.path }} @@ -57,46 +45,53 @@ SPDX-License-Identifier: BSD-3-Clause
{{ source.url }}
+
Revision
+
+ {{ source.revision }} +
Created
+ title="{{ source.created_at | utc_timestamp }}">{{ source.created_at | relative_time }}
Last seen
+ title="{{ source.last_seen_at | utc_timestamp }}">{{ source.last_seen_at | relative_time }}
-
Revised
+
Last revised
+ title="{{ source.revised_at | utc_timestamp }}">{{ source.revised_at | relative_time }}
-
Deleted
-
- {% if source.deleted_at is none %} - Never - {% else %} + {% if source.deleted_at is not none %} +
Deleted
+
- {% endif %} + title="{{ source.deleted_at | utc_timestamp }}">{{ source.deleted_at | relative_time }} +
+ {% endif %} +
Source ID
+
+ {{ source.uuid }}
-
Revision
+
Content hash
- {{ source.revision }} + {{ source.content_hash }}
+ + Details {% endfor %} @@ -247,35 +157,18 @@ SPDX-License-Identifier: BSD-3-Clause

No Webmentions have been discovered for this source.

{% endif %} -
-

Status history

+
+

Source 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 %} -
      - {% if event.failure_reason %} -
      {{ render_failure(event.failure_reason, "sent") }}
      - {% endif %} +
    2. +
      + {{ event.action }} + Revision {{ event.revision }} +
    3. {% endfor %} @@ -291,12 +184,12 @@ SPDX-License-Identifier: BSD-3-Clause source_page=source_page if source_page > 1 else none, webmentions_page=webmentions.page if webmentions.page > 1 else none ), - fragment='status-history-heading' + fragment='source-history-heading' ) }}
{% endif %} {% else %} -

No historical delivery events were recorded for this source. Current Webmention statuses appear above.

+

No source lifecycle events have been recorded yet. Delivery history is available on each Webmention's detail page.

{% endif %} {% include "includes/confirmation_modal.html" %} -- cgit v1.3.1