Stop importing balances from writing a net-worth snapshot - #39
Merged
Merged
Conversation
A snapshot says what every account was worth on a date. Writing one as a side effect of importing whichever connections happened to run produces a snapshot holding only those accounts — and since net worth is the sum of the balance rows in a snapshot, that renders as a cliff. Fetching one institution made net worth appear to collapse. Balances are no longer written by either import path unless asked for: the CLI takes --apply-balances, and the Import page still applies a balances file you pick by name, but leaves them out of "import all new". Sweeping up everything importable is not a statement about your net worth; naming a file is. The staged balances remain available either way. The snapshot editor's fill-from-connections prefill already reads them, which is the right place to build a snapshot: every account is in view, so what is missing is visible before it is saved rather than after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Importing balances no longer writes a net-worth snapshot unless you ask for it.
A snapshot says what every account was worth on a date. Net worth is the sum of the balance rows in one, so a snapshot holding only the accounts that happened to be fetched renders as a cliff. Pulling a single institution made net worth appear to collapse — which is an alarming thing for a finance app to do on its own initiative.
Type of Change
Details
Neither import path writes balances by default now.
--apply-balancesopts in.--applyalone imports transactions and previews balances without writing them, so the numbers are still visible in the run output.skipped_balanceswith a line saying where to build the snapshot instead.Staged balances remain available either way, and nothing about the fetch changes. The snapshot editor's fill-from-connections prefill already reads them, which is the right place to build a snapshot: every account is in view, so a gap is visible before it is saved rather than after.
Privacy Checklist
Testing
make test(133 passed),make api-contract-check.The existing staged-import test asserted the old behavior and now covers both sides of the rule: a sweep imports the statement, reports
skipped_balances, and leaves zero snapshots behind; naming that same balances file then applies it and creates the snapshot.Screenshots
n/a — no UI changes; the Import page reports the new status through the existing outcome list.
Related Issue
n/a