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
+2 -1
View File
@@ -83,7 +83,8 @@
} else {
const mood = moods.find((m) => m.key === key);
const q = P.param(P.merge(userPrefs, mood?.filter ?? {}));
feed = (await getJSON(`/api/feed?limit=24${q ? '&' + q : ''}`)).items;
const ex = Array.from(dismissed).join(',');
feed = (await getJSON(`/api/feed?limit=24${q ? '&' + q : ''}${ex ? '&exclude=' + ex : ''}`)).items;
remember(feed);
}
} catch (e) {