From 00a40c9d2f3c0dab530022779cef479047a731d2 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Fri, 29 May 2026 06:04:05 +0000 Subject: [PATCH] fix(dashboard): Strategy LAST SEEN = 'Invalid Date' contract drift MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit API GET /api/meet-kevin/strategy/tickers returns the field as latest_mention_at, but the dashboard's StrategyTicker type + table read t.last_mention_at — so new Date(undefined) produced 'Invalid Date' in every row. Aligned StrategyTicker to the actual API shape and renamed the table accessor. Also dropped two columns that referenced fields the API never returned (mention_count, unrealized_pnl_pct, current_price) and replaced them with what IS in the response (Horizon column + trade_entry_price renamed 'Entry'). t.is_held -> t.has_open_trade. --- .../meetKevin/TickerScorecardTable.tsx | 31 ++++++------------- dashboard/src/types/meetKevin.ts | 10 +++--- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/dashboard/src/components/meetKevin/TickerScorecardTable.tsx b/dashboard/src/components/meetKevin/TickerScorecardTable.tsx index 1943fdd..1ea1641 100644 --- a/dashboard/src/components/meetKevin/TickerScorecardTable.tsx +++ b/dashboard/src/components/meetKevin/TickerScorecardTable.tsx @@ -50,17 +50,14 @@ export function TickerScorecardTable({ tickers, isLoading, onClose }: Props) { Conviction - Price + Horizon - P&L + Entry Status - - Mentions - Last seen @@ -70,12 +67,11 @@ export function TickerScorecardTable({ tickers, isLoading, onClose }: Props) { {tickers.map((t) => { const badge = t.bridge_status ? BRIDGE_BADGE[t.bridge_status] : null; - const pnl = t.unrealized_pnl_pct; return ( ${t.symbol} - {t.is_held && ( + {t.has_open_trade && ( HOLDING @@ -94,20 +90,12 @@ export function TickerScorecardTable({ tickers, isLoading, onClose }: Props) { + {t.latest_horizon} - {t.current_price != null - ? `$${t.current_price.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` + {t.trade_entry_price != null + ? `$${t.trade_entry_price.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '—'} - - {pnl != null ? ( - = 0 ? 'text-green-400' : 'text-red-400'}> - {pnl >= 0 ? '+' : ''}{pnl.toFixed(2)}% - - ) : ( - - )} - {badge ? ( @@ -117,12 +105,13 @@ export function TickerScorecardTable({ tickers, isLoading, onClose }: Props) { )} - {t.mention_count} - {new Date(t.last_mention_at).toLocaleDateString()} + {t.latest_mention_at + ? new Date(t.latest_mention_at).toLocaleDateString() + : '—'} - {t.is_held && ( + {t.has_open_trade && (