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/tasks/scanner.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'webmentions_ssg/tasks/scanner.py') diff --git a/webmentions_ssg/tasks/scanner.py b/webmentions_ssg/tasks/scanner.py index 9058b9b..6d4045e 100644 --- a/webmentions_ssg/tasks/scanner.py +++ b/webmentions_ssg/tasks/scanner.py @@ -49,6 +49,8 @@ def build_source(scanned: ScannedSource, scan_time: datetime) -> SourceDocument: deleted_at=None, ) + source.record_event("Discovered", at=scan_time) + for target in scanned.targets: source.sent_webmentions.append( SentWebmention(target=target, linked=True, desired_revision=1) @@ -83,10 +85,12 @@ def apply_scan_to_source( if source.deleted_at is None and source.content_hash == scanned.content_hash: return source + restored = source.deleted_at is not None source.revision += 1 source.content_hash = scanned.content_hash source.revised_at = scan_time source.deleted_at = None + source.record_event("Restored" if restored else "Revised", at=scan_time) existing = {webmention.target: webmention for webmention in source.sent_webmentions} @@ -219,6 +223,7 @@ def mark_missing_sources_deleted( source.revision += 1 source.revised_at = scan_time source.deleted_at = scan_time + source.record_event("Deleted", at=scan_time) marked += 1 for webmention in source.sent_webmentions: -- cgit v1.3.1