From bb04966bbc6cbc9245ed771ed8c06a5e81dc18f8 Mon Sep 17 00:00:00 2001 From: null Date: Sat, 6 Jun 2026 23:17:08 -0500 Subject: [PATCH] fix: historical import loading state, remove stray catalog export --- client/components/BillHistoricalImportDialog.jsx | 14 +++++++++++--- client/pages/SubscriptionsPage.jsx | 3 --- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/client/components/BillHistoricalImportDialog.jsx b/client/components/BillHistoricalImportDialog.jsx index 13fbc12..8e97db3 100644 --- a/client/components/BillHistoricalImportDialog.jsx +++ b/client/components/BillHistoricalImportDialog.jsx @@ -96,12 +96,20 @@ export default function BillHistoricalImportDialog({ billId, billName, open, onC { if (!v) onClose(); }}> - Past payments found + + {!loading && importable.length === 0 && alreadyDone.length === 0 + ? 'No past payments found' + : !loading && importable.length === 0 + ? 'Already up to date' + : 'Import past payments'} + {loading ? 'Searching your bank history…' - : importable.length === 0 - ? `No past transactions found matching ${billName}.` + : importable.length === 0 && alreadyDone.length > 0 + ? `All matching transactions for ${billName} are already linked — nothing left to import.` + : importable.length === 0 + ? `No past bank transactions found matching ${billName}.` : `Found ${importable.length} past transaction${importable.length === 1 ? '' : 's'} matching ${billName}. What would you like to do?`} diff --git a/client/pages/SubscriptionsPage.jsx b/client/pages/SubscriptionsPage.jsx index 5556415..d4ec561 100644 --- a/client/pages/SubscriptionsPage.jsx +++ b/client/pages/SubscriptionsPage.jsx @@ -981,9 +981,6 @@ export default function SubscriptionsPage() { toast.success(`Linked ${result.matched_count} transaction${result.matched_count !== 1 ? 's' : ''} to "${result.bill_name}".`); setMatchTarget(null); setRecommendations(prev => prev.filter(r => r.id !== recommendation.id)); - if (getLinkImportPref() && recommendation.merchant) { - setImportDialog({ billId, billName: result.bill_name || recommendation.name }); - } } catch (err) { toast.error(err.message || 'Could not link recommendation to bill.'); } finally {