From fe55a28622393da1adbf22ac7af475d9154a4253 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Tue, 7 Jul 2026 11:37:10 +0000 Subject: [PATCH] fix(portfolio): truncate long match addresses; hide Needs attention tab when empty - MatchAddress: long OS addresses overflowed the candidate row (text column wasn't width-constrained). Give it min-w-0 flex-1 and truncate both lines (full address on hover) so the dialog layout holds. - PortfolioTabs: when nothing is unmatched, render just the properties table with no tab strip (the "Needs attention" tab only appears when count > 0). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app/portfolio/[slug]/components/MatchAddress.tsx | 9 ++++++--- src/app/portfolio/[slug]/components/PortfolioTabs.tsx | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/portfolio/[slug]/components/MatchAddress.tsx b/src/app/portfolio/[slug]/components/MatchAddress.tsx index b446bd00..549420bd 100644 --- a/src/app/portfolio/[slug]/components/MatchAddress.tsx +++ b/src/app/portfolio/[slug]/components/MatchAddress.tsx @@ -188,11 +188,14 @@ export default function MatchAddress({ isSelected ? "text-amber-600" : "text-gray-200" }`} /> - - + + {c.address} - + UPRN {c.uprn} · {label} {c.alreadyInPortfolio ? " · already in portfolio" diff --git a/src/app/portfolio/[slug]/components/PortfolioTabs.tsx b/src/app/portfolio/[slug]/components/PortfolioTabs.tsx index 59aba28d..887fee92 100644 --- a/src/app/portfolio/[slug]/components/PortfolioTabs.tsx +++ b/src/app/portfolio/[slug]/components/PortfolioTabs.tsx @@ -18,6 +18,9 @@ export default function PortfolioTabs({ }) { const [tab, setTab] = useState<"properties" | "needs-attention">("properties"); + // Nothing unmatched → no tab strip at all, just the properties table. + if (needsAttentionCount === 0) return <>{properties}; + return (