Re-alert Web Push when unread threads receive new updates #571

Closed
opened 2026-08-11 13:43:38 +00:00 by timmy · 0 comments
Owner

Problem

Web Push delivery is permanently deduplicated by notification thread ID. Gitea reuses that ID when a later comment updates the same issue or pull-request thread, so mobile operators miss all subsequent unread activity after the first delivered push. The normalized notification payload already exposes updated_at, but the push pipeline discards it.

Scope

Track the latest delivered updated_at revision per device and thread, re-alert only when that revision advances, preserve retries by checkpointing only successful sends, migrate existing push state safely, and retain privacy-safe payloads.

Acceptance tests

  • An unchanged thread revision produces one push only.
  • A newer revision for the same thread produces one additional push.
  • A failed send does not checkpoint the newer revision and retries next poll.
  • Legacy delivery rows migrate without replaying already-delivered threads.
  • Push payloads still exclude repository, title, comment, and revision metadata.
  • Focused and full test suites pass.

Non-duplication evidence

No open issue or PR covers revision-aware push delivery. Historical Web Push issues #549–#569 cover initial delivery, leasing, session expiry, setup, bounded fan-out, actions, the production ID contract, and burst digests; current origin/main still keys push_deliveries only by (session_id, thread_id) and reduces unread records to integer IDs.

## Problem Web Push delivery is permanently deduplicated by notification thread ID. Gitea reuses that ID when a later comment updates the same issue or pull-request thread, so mobile operators miss all subsequent unread activity after the first delivered push. The normalized notification payload already exposes `updated_at`, but the push pipeline discards it. ## Scope Track the latest delivered `updated_at` revision per device and thread, re-alert only when that revision advances, preserve retries by checkpointing only successful sends, migrate existing push state safely, and retain privacy-safe payloads. ## Acceptance tests - An unchanged thread revision produces one push only. - A newer revision for the same thread produces one additional push. - A failed send does not checkpoint the newer revision and retries next poll. - Legacy delivery rows migrate without replaying already-delivered threads. - Push payloads still exclude repository, title, comment, and revision metadata. - Focused and full test suites pass. ## Non-duplication evidence No open issue or PR covers revision-aware push delivery. Historical Web Push issues #549–#569 cover initial delivery, leasing, session expiry, setup, bounded fan-out, actions, the production ID contract, and burst digests; current `origin/main` still keys `push_deliveries` only by `(session_id, thread_id)` and reduces unread records to integer IDs.
timmy self-assigned this 2026-08-11 13:43:38 +00:00
timmy closed this issue 2026-08-11 13:54:25 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#571
No description provided.