Private
Public Access
Make the banner and sidebar counts live on every page
One 5-minute poll (/new-since/) now drives the new-articles banner, the tab dot and the sidebar counts, across all subscriptions rather than the selected feed/tag. The banner lives in the base layout with a server-rendered baseline id and reloads the current view on click; new articles are never inserted automatically. Sidebar counts are patched in place by the poll, and immediately after reading or starring (HX-Trigger: countsChanged). Ingestion, filter rules and subscription changes now drop the cached counts instead of waiting out the TTL. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fed5bcc49e
commit
2a3e9f632e
18 files changed
+399
-196
No files matched your search
@@ -1,5 +0,0 @@
|
||||
{% if new_count %}
|
||||
<button type="button" class="new-articles-banner">
|
||||
{{ new_count }} new article{{ new_count|pluralize }} — click to show
|
||||
</button>
|
||||
{% endif %}
|
||||
@@ -23,11 +23,5 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="new-articles-banner"
|
||||
hx-get="{% url 'reader:check_new' %}?since={{ latest_article_id }}&{{ new_check_qs }}"
|
||||
hx-trigger="every 30s"
|
||||
hx-target="this"
|
||||
hx-swap="innerHTML"></div>
|
||||
|
||||
{% include "reader/_article_list.html" %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user