Add Sport/Canada/US/AI/Cloud/HomeLab pills; drop Finance
Some checks failed
CI / Build · macos-14 · Debug (push) Has been cancelled
CI / Build · macos-15 · Debug (push) Has been cancelled
CI / Build · macos-14 · Release (push) Has been cancelled
CI / Build · macos-15 · Release (push) Has been cancelled

- New Sport pill: detect sports by clear headline terms or majority
  sports-outlet sources, and exclude sports (and F1) from All/Tech/regions so
  World Cup/soccer no longer pollutes Finance/Tech.
- New client keyword pills: Canada, US, AI, Cloud, HomeLab (headline-matched).
- Remove the Finance pill; keep Tech (backend topic).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Robin Kutesa
2026-06-19 17:39:45 +03:00
parent 3d40065ec7
commit 5c0f4afd80
2 changed files with 58 additions and 7 deletions

View File

@@ -51,13 +51,17 @@ struct SignalFeedView: View {
} else {
base = []
}
// Sports (incl. F1) live only under their own pills the backend mis-tags
// them into finance/tech/politics, so exclude them everywhere else.
let isSport: (StorySummary) -> Bool = { Interest.isFormula1($0) || Interest.isSports($0) }
if let interest = selectedInterest {
if interest.id == "f1" { return base.filter(interest.matches) }
// Other pills (incl. Tech/Finance) exclude F1 (backend mis-tags it).
return base.filter { interest.matches($0) && !Interest.f1.matches($0) }
if interest.id == "f1" || interest.id == "sport" {
return base.filter(interest.matches)
}
return base.filter { interest.matches($0) && !isSport($0) }
}
// "All" is news-only: F1 lives solely under its own pill.
return base.filter { !Interest.f1.matches($0) }
// "All" is news-only: no sports.
return base.filter { !isSport($0) }
}
/// The main feed: unread stories, with already-seen ones sunk below fresh ones.