feat(feeds): add configurable per-feed lifetime (TTL)

Replace the demo nightly KV wipe with a per-feed expiry. Feeds can be
given a lifetime at creation (and edited later); FEED_TTL_HOURS locks the
value server-side and greys out the UI field. Expired feeds stay visible
in admin (greyed, actions disabled), return 410 on rss/atom/entries, and
reject inbound emails. The scheduled handler now purges only expired
feeds (KV + R2 attachments) on an hourly global cron.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Julien Herr
2026-05-23 09:05:48 +02:00
parent 24c7d2a53e
commit f4d5edda0e
11 changed files with 461 additions and 123 deletions
+38
View File
@@ -972,3 +972,41 @@ table.table code {
padding: 0;
margin: 0;
}
/* Feed TTL — expiry badges */
.pill-expiry {
background-color: rgba(255, 159, 10, 0.15);
color: var(--color-warning);
border-color: rgba(255, 159, 10, 0.3);
}
.pill-expired {
background-color: rgba(255, 69, 58, 0.15);
color: var(--color-danger);
border-color: rgba(255, 69, 58, 0.3);
}
/* Feed TTL — expired feed row */
.feed-expired .feed-header,
.feed-expired td:not(:last-child) {
opacity: 0.5;
}
/* Feed TTL — disabled-looking action buttons on expired feeds */
.button-disabled {
opacity: 0.35;
cursor: not-allowed;
pointer-events: none;
user-select: none;
}
/* Feed TTL — card states in edit form */
.card-warning {
border-color: rgba(255, 159, 10, 0.4);
background-color: rgba(255, 159, 10, 0.06);
}
.card-disabled {
opacity: 0.6;
pointer-events: none;
}