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 {