[BTAPP-42] Fix weekly budget remaining not updating after tag edit #46

Merged
chris merged 1 commit from bug/BTAPP-42 into main 2026-06-25 09:15:12 -06:00
Owner

Ticket

BTAPP-42 Weekly budget remaining doesn't update after a tag edit

Summary

  • Root cause: TransactionDetailsModal.onSave was mutating the transaction object in-place (transaction.tags = selectedTags) before passing it to onChange. Since this is the same object reference held in the React Query cache, React Query's structural sharing saw no change and skipped notifying observers — so the amount useMemo in TransactionsScreen never recomputed.
  • Fix: pass { ...transaction, tags: selectedTags } to onChange so a new object reference is created, giving structural sharing something to diff against.
  • Tests: two new integration tests verify the weekly budget remaining rises when an ignore tag is added and falls when one is removed.
## Ticket [BTAPP-42](http://192.168.2.100:7123/home/browse/BTAPP-42/) Weekly budget remaining doesn't update after a tag edit ## Summary - Root cause: `TransactionDetailsModal.onSave` was mutating the transaction object in-place (`transaction.tags = selectedTags`) before passing it to `onChange`. Since this is the same object reference held in the React Query cache, React Query's structural sharing saw no change and skipped notifying observers — so the `amount` useMemo in `TransactionsScreen` never recomputed. - Fix: pass `{ ...transaction, tags: selectedTags }` to `onChange` so a new object reference is created, giving structural sharing something to diff against. - Tests: two new integration tests verify the weekly budget remaining rises when an ignore tag is added and falls when one is removed.
[BTAPP-42] Fix weekly budget remaining not updating after tag edit.
All checks were successful
app / check (pull_request) Successful in 19s
plane-sync / sync (pull_request) Successful in 1s
fd678369ba
chris merged commit 43bf1d7732 into main 2026-06-25 09:15:12 -06:00
chris deleted branch bug/BTAPP-42 2026-06-25 09:15:12 -06:00
Sign in to join this conversation.
No reviewers
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
chris/budget-tracker!46
No description provided.