feat: keep background Updates badge current (Closes #1281)
CI / lint (pull_request) Successful in 4m52s
CI / build-release (pull_request) Successful in 15s
CI / browser-journey (pull_request) Successful in 7m5s
CI / release-candidate (pull_request) Has been skipped

This commit is contained in:
timmy committed 2026-08-22 22:11:52 +00:00
1 parent b18a50fec5
commit 05405bf2e8
11 files changed
+172 -12

No files matched your search

+3
View File
@@ -133,6 +133,7 @@ async def dispatch_unread_updates(
for item in page.get("items", [])
if isinstance(item, dict) and str(item.get("id", "")).isdigit()
}
unread_count = min(len(thread_revisions), 9999)
await asyncio.to_thread(store.reconcile_unread, thread_revisions)
deliveries = await asyncio.to_thread(store.claim_unseen, thread_revisions)
if session_statuses is not None:
@@ -201,6 +202,7 @@ async def dispatch_unread_updates(
"route": f"#/my-work/update/{thread_id}",
"tag": f"stackchain-update-{thread_id}",
"notification_id": thread_id,
"unread_count": unread_count,
},
separators=(",", ":"),
)
@@ -258,6 +260,7 @@ async def dispatch_unread_updates(
"route": "#/my-work/updates",
"tag": "stackchain-update-digest",
"update_count": len(overflow_revisions),
"unread_count": unread_count,
},
separators=(",", ":"),
)