Money import: same-name Accounts/Categories in preview and YNAB CSV (follow-ups from #462 review) #967

Open
opened 2026-10-03 04:17:52 +00:00 by kayg · 0 comments
Owner

From the round-4 break-the-numbers review of #462 (GO)

Non-blocking follow-ups (review: ~/Developer/calternal-wt/rev2-money-ident/review-money-ident-r4.md on the build VM):

  1. Import preview: inferred opening balances are sent and keyed by Account name (crates/plugins/money/src/routes.rs ~786, MoneyImport.svelte:228); two same-name Accounts give duplicate keys and rows the User cannot tell apart while confirming amounts. Key and label by block ID (show the Account group or a short disambiguator).
  2. Add a test where two same-name Categories have nonzero, different Assigned/Activity/Available with hand-written expected values per block ID.
  3. DESIGN §48 says nothing is ever merged, but the YNAB CSV import (no IDs) matches by name: same-name Accounts merge silently; same-name Categories merge silently when the Plan file lacks activity/available. Document it and report it in the preview.
  4. P3: transaction form shows identical "Hobbies" options; Card payment Category follows Actual sort order (moves if Cards are reordered); two same-name payment Categories with one Card fail with a generic error; YNAB card matching uses prefix before exact; CSV register fallback name lookup is unordered.

Money rule: property tests and a break-the-numbers review before merge.

## From the round-4 break-the-numbers review of #462 (GO) Non-blocking follow-ups (review: `~/Developer/calternal-wt/rev2-money-ident/review-money-ident-r4.md` on the build VM): 1. Import preview: inferred opening balances are sent and keyed by Account name (`crates/plugins/money/src/routes.rs` ~786, `MoneyImport.svelte:228`); two same-name Accounts give duplicate keys and rows the User cannot tell apart while confirming amounts. Key and label by block ID (show the Account group or a short disambiguator). 2. Add a test where two same-name Categories have nonzero, different Assigned/Activity/Available with hand-written expected values per block ID. 3. DESIGN §48 says nothing is ever merged, but the YNAB CSV import (no IDs) matches by name: same-name Accounts merge silently; same-name Categories merge silently when the Plan file lacks activity/available. Document it and report it in the preview. 4. P3: transaction form shows identical "Hobbies" options; Card payment Category follows Actual sort order (moves if Cards are reordered); two same-name payment Categories with one Card fail with a generic error; YNAB card matching uses prefix before exact; CSV register fallback name lookup is unordered. Money rule: property tests and a break-the-numbers review before merge.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#967
No description provided.