From 658c4d322107f1b69b82e404817a8a6c8aa01b11 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Wed, 27 May 2026 18:11:54 +0000 Subject: [PATCH] =?UTF-8?q?fix(dashboard):=20another=20Home=20crash=20?= =?UTF-8?q?=E2=80=94=20top=5Fconviction=5Fweek=20vs=20=5F7d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Round-2 of the Home/Strategy contract drift. The dashboard endpoint returns top_conviction_7d, but the frontend type+code referenced top_conviction_week — so the section render crashed on undefined.length. Renamed type field + code references to top_conviction_7d to match the actual API, and kept the ?? [] guard so future drift can't crash. --- dashboard/src/pages/meetKevin/Home.tsx | 4 ++-- dashboard/src/types/meetKevin.ts | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dashboard/src/pages/meetKevin/Home.tsx b/dashboard/src/pages/meetKevin/Home.tsx index 4710ef0..30928b5 100644 --- a/dashboard/src/pages/meetKevin/Home.tsx +++ b/dashboard/src/pages/meetKevin/Home.tsx @@ -141,13 +141,13 @@ export default function MeetKevinHome() { {/* Top conviction this week */} - {dashboard && dashboard.top_conviction_week.length > 0 && ( + {dashboard && (dashboard.top_conviction_7d ?? []).length > 0 && (

Top Conviction — Last 7 Days

- {dashboard.top_conviction_week.map( + {(dashboard.top_conviction_7d ?? []).map( (row: { symbol: string; max_conviction: number; diff --git a/dashboard/src/types/meetKevin.ts b/dashboard/src/types/meetKevin.ts index 0982e15..dc67d4a 100644 --- a/dashboard/src/types/meetKevin.ts +++ b/dashboard/src/types/meetKevin.ts @@ -107,11 +107,13 @@ export interface PipelineHealth { export interface DashboardData { latest_video: VideoSummary | null; latest_analysis: VideoAnalysis | null; - top_conviction_week: { - symbol: string; - max_conviction: number; - mention_count: number; - }[]; + top_conviction_7d: + | { + symbol: string; + max_conviction: number; + mention_count: number; + }[] + | null; outlook_trend_14d: { day: string; direction: MarketOutlook;