diff --git a/frontend/src/pages/Trends.tsx b/frontend/src/pages/Trends.tsx index 2fead84..433f622 100644 --- a/frontend/src/pages/Trends.tsx +++ b/frontend/src/pages/Trends.tsx @@ -103,10 +103,10 @@ function TrendCard({ trend, onClick }: { trend: TrendSummary; onClick: () => voi )} {expanded && (
- {trend.top_supporting_evidence?.map((e, i) => ( + {[...new Set(trend.top_supporting_evidence ?? [])].map((e, i) => ( ))} - {trend.top_opposing_evidence?.map((e, i) => ( + {[...new Set(trend.top_opposing_evidence ?? [])].map((e, i) => ( ))}
diff --git a/services/aggregation/worker.py b/services/aggregation/worker.py index 4e3f66d..39cab62 100644 --- a/services/aggregation/worker.py +++ b/services/aggregation/worker.py @@ -687,8 +687,8 @@ def assemble_trend_with_evidence( config = EvidenceRankConfig(max_refs=max_evidence) supporting_ranked, opposing_ranked = rank_evidence_detailed(signals, config) - supporting = [r.document_id for r in supporting_ranked] - opposing = [r.document_id for r in opposing_ranked] + supporting = list(dict.fromkeys(r.document_id for r in supporting_ranked)) + opposing = list(dict.fromkeys(r.document_id for r in opposing_ranked)) catalysts, risks = extract_catalysts_and_risks(impacts, signals)