Private
Public Access
Notify the open stream when new articles arrive
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>
This commit is contained in:
1 parent
17e7f63e61
commit
03dd37e69d
6 files changed
+139
-4
No files matched your search
@@ -113,6 +113,19 @@ form p {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.new-articles-banner {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin: 0 0 0.75rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border: none;
|
||||
border-radius: 0.375rem;
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
opacity: 0.6;
|
||||
padding: 2rem 0;
|
||||
|
||||
Reference in new issue
Block a user