diff --git a/frontend/src/pages/TickerDetailPage.tsx b/frontend/src/pages/TickerDetailPage.tsx index 5a2262a..dbc8919 100644 --- a/frontend/src/pages/TickerDetailPage.tsx +++ b/frontend/src/pages/TickerDetailPage.tsx @@ -405,17 +405,37 @@ export default function TickerDetailPage() { scores.refetch()} /> )} {scores.data && ( - }> - - + <> + }> + + + {(() => { + const cb = scores.data?.composite_breakdown; + const adj = cb?.sentiment_adjustment; + const base = cb?.base_score; + if (adj == null || base == null || Math.abs(adj) < 0.05) return null; + const composite = scores.data?.composite_score ?? base + adj; + return ( +

+ Composite{' '} + {Math.round(composite)} + {' '}= Base {Math.round(base)}{' '} + {adj >= 0 ? '+' : '−'} Sentiment{' '} + = 0 ? 'text-emerald-400/80' : 'text-red-400/80'}> + {Math.abs(adj).toFixed(1)} + +

+ ); + })()} + )}