Extend dismissed-exclusion to mood feeds for consistency

Mood feeds now honor the same dismissed list as the brief: /api/feed accepts an
exclude param (over-fetching to stay full), and the client passes the persisted
dismissed set. Swapping a story away now keeps it gone everywhere — brief and
browse — not just on the home view. Also simplified the feed filter path to the
shared _prefs_sql_kw helper.

Tests: feed exclude (91 total).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
jay
2026-05-31 13:29:27 +00:00
parent 0ccd5554d2
commit 3fe7c4f228
3 changed files with 25 additions and 27 deletions
+6
View File
@@ -74,3 +74,9 @@ def test_brief_filters_down_without_refill(client):
def test_category_counts_match_filtered_feed(client):
counts = client.get("/api/category-counts", params={"prefs": json.dumps({"mute_topics": ["health"]})}).json()
assert all(c["topic"] != "health" for c in counts)
def test_feed_excludes_dismissed(client):
r = client.get("/api/feed", params={"exclude": "1"})
ids = [i["id"] for i in r.json()["items"]]
assert 1 not in ids