From 94ed3207d791faf8cd025c04a22a875f333c795f Mon Sep 17 00:00:00 2001 From: Dennis Thiessen Date: Wed, 1 Jul 2026 09:55:42 +0200 Subject: [PATCH] feat: show composite = base + sentiment caption under the Standing matrix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ticker page renders the composite via the Standing matrix (ScoreCard runs with showComposite=false), so the "Base X ยท sentiment +Y" line in the ScoreCard header was never visible there. Add a compact caption beneath the matrix โ€” "Composite 83 = Base 78 + Sentiment 5.0" โ€” shown only when sentiment actually moves the score, so the composition of the number has a visible home where the number lives. Co-Authored-By: Claude Opus 4.8 --- frontend/src/pages/TickerDetailPage.tsx | 42 ++++++++++++++++++------- 1 file changed, 31 insertions(+), 11 deletions(-) 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)} + +

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