The account editor of an imported account gets a Merge into section: pick the
linked account, see what moves and what the bank already has, then merge.
Tested in the stack: older rows move, overlap counts once, edits carry over,
and the next sync leaves it alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An Edit button on every account: name, and what kind it is (bank account,
credit card, loan, investment, something else). The kind decides where it
counts: a credit card's balance is money you owe.
- The kind you pick sticks: migration 0031 adds accounts.type_override, and a
trigger puts it back whenever a sync writes the bank's type, so every page
keeps reading accounts.type.
- An imported or hand-added credit card or loan now adds its purchases to what
you owe (it subtracted them, as for a bank account).
- Delete for accounts you added or imported, with their transactions. A linked
account says to hide it or remove the bank, since sync would bring it back.
Tested on a local Supabase: rename + Credit card moved the imported account
under Credit cards; a sync-style write of type depository kept it credit;
deleting removed it and its 358 transactions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>