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) <noreply@anthropic.com>
This commit is contained in:
Jun-te Kim 2026-07-07 11:37:10 +00:00
parent 3f8920acd0
commit fe55a28622
2 changed files with 9 additions and 3 deletions

View file

@ -188,11 +188,14 @@ export default function MatchAddress({
isSelected ? "text-amber-600" : "text-gray-200"
}`}
/>
<span className="min-w-0">
<span className="block truncate text-gray-800">
<span className="min-w-0 flex-1">
<span
className="block truncate text-gray-800"
title={c.address}
>
{c.address}
</span>
<span className="text-[11px] text-gray-500">
<span className="block truncate text-[11px] text-gray-500">
UPRN {c.uprn} · {label}
{c.alreadyInPortfolio
? " · already in portfolio"

View file

@ -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 (
<div>
<div className="mb-4 flex items-center gap-1 border-b border-gray-200">