Filter pills by backend tags (slug membership), drop keyword matching
Replace the keyword/source-majority Interest system with a StoryPill enum that matches stories by canonical category slugs. StorySummary gains a tolerant tags[] (optional, decode-safe); effectiveTags uses tags, falling back to topic during the backend transition. No more headline keyword-searching on the client — the backend decides classification; the client asks slug membership. Pills: All, F1, Sport, AI, Cloud, HomeLab, Tech, Uganda, South Africa, Canada, US. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,9 @@ struct StorySummary: Codable, Identifiable, Hashable {
|
||||
let headline: String
|
||||
let summary: String
|
||||
let topic: String
|
||||
/// Canonical category slugs from the backend. Optional so decoding tolerates
|
||||
/// the transition while the backend rolls out `tags[]`; falls back to `topic`.
|
||||
let tags: [String]?
|
||||
let signalScore: Int
|
||||
let scoreBreakdown: ScoreBreakdown
|
||||
let sourceCount: Int
|
||||
|
||||
Reference in New Issue
Block a user