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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user