diff --git a/frontend/src/pages/Trends.tsx b/frontend/src/pages/Trends.tsx
index 178ae76..b6a46f7 100644
--- a/frontend/src/pages/Trends.tsx
+++ b/frontend/src/pages/Trends.tsx
@@ -1,5 +1,5 @@
import { useState } from 'react';
-import { useNavigate } from '@tanstack/react-router';
+import { useNavigate, Link } from '@tanstack/react-router';
import { useTrends } from '../api/hooks';
import { TrendArrow, ConfidenceBar, LoadingSpinner, TickerFilter, Card } from '../components/ui';
import type { TrendSummary } from '../api/hooks';
@@ -104,13 +104,53 @@ function TrendCard({ trend, onClick }: { trend: TrendSummary; onClick: () => voi
{expanded && (
{trend.top_supporting_evidence?.map((e, i) => (
-
+ {e}
+
))}
{trend.top_opposing_evidence?.map((e, i) => (
-
− {e}
+
))}
)}
);
}
+
+const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
+
+function EvidenceRef({ id, direction }: { id: string; direction: 'supporting' | 'opposing' }) {
+ const sign = direction === 'supporting' ? '+' : '−';
+ const color = direction === 'supporting' ? 'text-green-400' : 'text-red-400';
+
+ // Pattern IDs like "pattern:META:other:1d" are already readable
+ if (id.startsWith('pattern:')) {
+ const parts = id.split(':');
+ const label = parts.length >= 4
+ ? `${parts[1]} ${parts[2]} (${parts[3]})`
+ : id.replace('pattern:', '');
+ return (
+
+ {sign} pattern {label}
+
+ );
+ }
+
+ // UUIDs — show as short clickable links to the document
+ if (UUID_RE.test(id)) {
+ return (
+
+ {sign}{' '}
+ e.stopPropagation()}
+ >
+ doc:{id.slice(0, 8)}…
+
+
+ );
+ }
+
+ // Fallback — show as-is but truncated
+ return {sign} {id}
;
+}