Private
Public Access
The stream had no way to learn about articles the background poll ingested while the page was open — only a manual reload or navigation ever picked them up. Adds a lightweight "N new articles — click to show" banner: the stream records the highest article id in its current scope (filter/tag/feed) when rendered, and an htmx poll every 30s checks reader:check_new for anything newer in that same scope. It never swaps the list out from under you mid-read — clicking the banner is what actually reloads it. id, not published_at, is the cursor, since a feed can backdate an entry's published date below everything currently on screen while it's still genuinely new to this stream. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
21 lines
756 B
Python
21 lines
756 B
Python
from django.urls import path
|
|
|
|
from . import views
|
|
|
|
app_name = "reader"
|
|
|
|
urlpatterns = [
|
|
path("", views.stream, name="stream"),
|
|
path("check-new/", views.check_new_articles, name="check_new"),
|
|
path("mark-all-read/", views.mark_all_read, name="mark_all_read"),
|
|
path("articles/<int:article_id>/", views.article_detail, name="article_detail"),
|
|
path(
|
|
"articles/<int:article_id>/inline/",
|
|
views.article_inline,
|
|
name="article_inline",
|
|
),
|
|
path("articles/<int:article_id>/toggle-read/", views.toggle_read, name="toggle_read"),
|
|
path("articles/<int:article_id>/toggle-star/", views.toggle_star, name="toggle_star"),
|
|
path("articles/<int:article_id>/toggle-saved/", views.toggle_saved, name="toggle_saved"),
|
|
]
|