Money client must scope transaction identity to the source Month #1537

Open
opened 2026-10-10 13:18:40 +00:00 by kayg · 0 comments
Owner

Static finding during #688 B3/B4 repair at 8b6c24d4cb. DESIGN §48 permits transaction IDs to repeat across Money files. The retained register now carries source_month and scopes SQL identity, cursors, payload joins and mutation maps to the source Month.

The client still omits that scope:

  • apps/web/src/routes/money/[budget]/accounts/account/+page.svelte:557 keys visible rows with ${row.id}:${row.account_id}. Two legal source Months with the same ID and Account give the same key.
  • Lines 100, 145 and 375 compare ID and Account for editor state, page selection and optimistic marks.
  • Lines 362 and 378 send writes through transaction-ID URLs; cleared writes include Account but no source Month.
  • Lines 444 and 568 use transaction ID alone for Copy link and DOM anchors.

This is static evidence, not a reproduced browser crash or a claim that an incorrect write occurred. The #688 backend regressions exercise startup recovery and retained SQL paging, not client actions. No client code changed in this repair round.

Expected: carry file-local scope through client row identity, focus/selection/edit state, month-qualified action lookup and stable links. Keep old links compatible where unambiguous. Add two valid files with a repeated ID and Account as a test fixture; verify both rows render, marks/edit/Undo affect only the selected source row, and Copy link restores that row. Cover pointer, keyboard and touch using real production captures. Reuse existing components and do not restyle the register. No real financial contents belong in this issue.

Static finding during #688 B3/B4 repair at 8b6c24d4cb01de7c65939d029c9b518591cc613d. DESIGN §48 permits transaction IDs to repeat across Money files. The retained register now carries source_month and scopes SQL identity, cursors, payload joins and mutation maps to the source Month. The client still omits that scope: - apps/web/src/routes/money/[budget]/accounts/[[account]]/+page.svelte:557 keys visible rows with `${row.id}:${row.account_id}`. Two legal source Months with the same ID and Account give the same key. - Lines 100, 145 and 375 compare ID and Account for editor state, page selection and optimistic marks. - Lines 362 and 378 send writes through transaction-ID URLs; cleared writes include Account but no source Month. - Lines 444 and 568 use transaction ID alone for Copy link and DOM anchors. This is static evidence, not a reproduced browser crash or a claim that an incorrect write occurred. The #688 backend regressions exercise startup recovery and retained SQL paging, not client actions. No client code changed in this repair round. Expected: carry file-local scope through client row identity, focus/selection/edit state, month-qualified action lookup and stable links. Keep old links compatible where unambiguous. Add two valid files with a repeated ID and Account as a test fixture; verify both rows render, marks/edit/Undo affect only the selected source row, and Copy link restores that row. Cover pointer, keyboard and touch using real production captures. Reuse existing components and do not restyle the register. No real financial contents belong in this issue.
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
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-v0#1537
No description provided.