Skip to content

Use fewest transfers for who-owes-whom - #9

Merged
Dr-Usman merged 3 commits into
mainfrom
feature/simplify-settle-debts
Aug 17, 2026
Merged

Use fewest transfers for who-owes-whom#9
Dr-Usman merged 3 commits into
mainfrom
feature/simplify-settle-debts

Conversation

@Dr-Usman

@Dr-Usman Dr-Usman commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Restore BalanceService.simplifyDebts so who-owes-whom lists the fewest payments that settle each scene (min-cash-flow from net balances), instead of bill-linked pairwise debts that produced extra transfers.
  • Rename PairwiseDebtOpenDebt, PairwiseDebtTileOpenDebtTile, and OpenPairwiseBalanceOpenSceneDebt for clearer settle-up naming.
  • Wire scene detail, Balances tab, person detail, share card, and settlement prefill to simplified debts.

Test plan

  • flutter test test/balance_service_test.dart — includes HNSU trip (3 payments to Usman)
  • flutter test — full suite passes
  • Open HNSU scene → Who owes whom shows 3 rows (Hamza/Nadeem/Shoaib → Usman)
  • Tap a debt row → Record settlement prefills correctly
  • Balances tab and person detail show same simplified debts
  • Share balances image reflects 3 transfers, not 6

Centralize event names in AnalyticsEvents and wire tracking for tabs, filters, person detail, share/review, and backup flows.
Update file paths, class names, and Profile navigation imports together.
Restore simplifyDebts from net balances instead of bill-linked pairwise
debts, and rename PairwiseDebt to OpenDebt for clearer settle-up UI.
@Dr-Usman
Dr-Usman marked this pull request as ready for review August 17, 2026 11:15
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Dr-Usman
Dr-Usman merged commit cf31b86 into main Aug 17, 2026
1 check passed
@Dr-Usman
Dr-Usman deleted the feature/simplify-settle-debts branch August 17, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant