From 8a6a55d6dc9d0da59c626e532ce18161b40707a0 Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Sun, 17 May 2026 14:13:56 -0700 Subject: Filter null rows from ShortInterestCard, hide card when all null Mirrors the adaptive Reference card approach: only visible items are rendered, with a note when some are suppressed. Card returns null when nothing is available. Also updates next-env.d.ts path and ignores .superpowers/. Co-Authored-By: Claude Sonnet 4.6 --- frontend/app/page.tsx | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'frontend/app') diff --git a/frontend/app/page.tsx b/frontend/app/page.tsx index 013b93d..44428aa 100644 --- a/frontend/app/page.tsx +++ b/frontend/app/page.tsx @@ -472,6 +472,16 @@ function ProfileCard({ overview }: { overview: TickerOverview }) { function ShortInterestCard({ overview }: { overview: TickerOverview }) { const short = overview.short_interest; + const items = [ + { label: "Short Float", value: fmtPct(short.short_percent_of_float), missing: short.short_percent_of_float == null }, + { label: "Days Cover", value: fmtNumber(short.short_ratio), missing: short.short_ratio == null }, + { label: "Shares Short", value: fmtNumber(short.shares_short, 0), missing: short.shares_short == null }, + { label: "Prior Delta", value: fmtPct(short.shares_short_delta_pct, 1, true), missing: short.shares_short_delta_pct == null } + ]; + const visibleItems = items.filter((i) => !i.missing); + if (!visibleItems.length) return null; + const suppressed = items.length - visibleItems.length; + return (
@@ -481,11 +491,13 @@ function ShortInterestCard({ overview }: { overview: TickerOverview }) {
- - - - + {visibleItems.map((item) => ( + + ))}
+ {suppressed > 0 && ( +

ยท Short interest data incomplete

+ )}
); } -- cgit v1.3-2-g0d8e