Cache backend tags so offline pill filtering stays accurate
Add tags[] to CachedStory (defaulted for lightweight migration) and persist them on upsert; offline StorySummary now carries the cached tags instead of falling back to topic. Backend stays the source of truth. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -466,6 +466,7 @@ struct SignalFeedView: View {
|
||||
if let found = existing?.first {
|
||||
found.signalScore = summary.signalScore
|
||||
found.sourceCount = summary.sourceCount
|
||||
found.tags = summary.tags ?? []
|
||||
found.updatedAt = summary.updatedAt
|
||||
} else {
|
||||
modelContext.insert(CachedStory(from: summary))
|
||||
@@ -483,7 +484,7 @@ extension StorySummary {
|
||||
headline: cached.headline,
|
||||
summary: cached.summary,
|
||||
topic: cached.topic,
|
||||
tags: nil,
|
||||
tags: cached.tags,
|
||||
signalScore: cached.signalScore,
|
||||
scoreBreakdown: ScoreBreakdown(sourceAuthority: 0, freshness: 0, localRelevance: 0,
|
||||
crossSourceConfirmation: 0, topicImportance: 0),
|
||||
|
||||
Reference in New Issue
Block a user