From 8a6a55d6dc9d0da59c626e532ce18161b40707a0 Mon Sep 17 00:00:00 2001
From: Tyler Hoang <tyler@tylerhoang.xyz>
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 <noreply@anthropic.com>
---
 frontend/app/page.tsx | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

(limited to 'frontend/app/page.tsx')

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 (
     <section className="psm-card">
       <div className="psm-card-head">
@@ -481,11 +491,13 @@ function ShortInterestCard({ overview }: { overview: TickerOverview }) {
         </div>
       </div>
       <div className="psm-detail-grid">
-        <DetailItem label="Short Float" value={fmtPct(short.short_percent_of_float)} missing={short.short_percent_of_float == null} />
-        <DetailItem label="Days Cover" value={fmtNumber(short.short_ratio)} missing={short.short_ratio == null} />
-        <DetailItem label="Shares Short" value={fmtNumber(short.shares_short, 0)} missing={short.shares_short == null} />
-        <DetailItem label="Prior Delta" value={fmtPct(short.shares_short_delta_pct, 1, true)} missing={short.shares_short_delta_pct == null} />
+        {visibleItems.map((item) => (
+          <DetailItem key={item.label} label={item.label} value={item.value} missing={false} />
+        ))}
       </div>
+      {suppressed > 0 && (
+        <p className="psm-muted-copy" style={{ marginTop: "var(--sp-3)" }}>· Short interest data incomplete</p>
+      )}
     </section>
   );
 }
-- 
cgit v1.3-2-g0d8e

