Private
Public Access
Mark the browser tab with a red dot when new articles arrive (#31)
The in-page "new articles" banner is invisible from a background tab. Every authenticated page now polls a small JSON endpoint (reader:new_since, every 30s) and redraws the tab's favicon with a red dot when unread, non-hidden articles from the user's feeds have appeared since the page loaded. A reload (which is what clicking the banner does) resets the baseline and the icon. The endpoint is deliberately not scoped to the stream's current filter/tag/feed, so the tab lights up for anything new whichever page is open. Scope is the dot only: no desktop notifications, per the request. Verified in a dev server enforcing the production CSP: the icon swapped to the dotted version after a new article arrived and reset on reload. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fd494a9c08
commit
0975a7634b
5 files changed
+162
-1
No files matched your search
@@ -7,6 +7,7 @@ app_name = "reader"
|
||||
urlpatterns = [
|
||||
path("", views.stream, name="stream"),
|
||||
path("check-new/", views.check_new_articles, name="check_new"),
|
||||
path("new-since/", views.new_since, name="new_since"),
|
||||
path("mark-all-read/", views.mark_all_read, name="mark_all_read"),
|
||||
path("articles/<int:article_id>/", views.article_detail, name="article_detail"),
|
||||
path(
|
||||
|
||||
Reference in new issue
Block a user