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 ++++++++++++++++---- frontend/next-env.d.ts | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'frontend') 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

+ )}
); } diff --git a/frontend/next-env.d.ts b/frontend/next-env.d.ts index 9edff1c..c4b7818 100644 --- a/frontend/next-env.d.ts +++ b/frontend/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/types/routes.d.ts"; +import "./.next/dev/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. -- cgit v1.3-2-g0d8e