feat(groups): configure a shared exact or simplified settlement method #7

Merged
exler merged 1 commit from feat/group-settlement-method into main 2026-10-31 22:59:07 +01:00
Collaborator

Summary

  • Store one shared Exact debts / Simplified settlement method per group. Additive migration defaults existing and new groups to Exact debts.
  • Configure the method in Group Settings under the current permission model: any authenticated member of that group; archived groups remain read-only.
  • Render only the configured method for every member on full page loads and HTMX navigation. Remove the individual browser toggle.
  • Preserve the create form and keep saved preferences when older settings submissions omit the new field. Reject unknown choices.
  • Reuse the existing debt algorithms unchanged: exact uses original currencies; simplified uses base-currency routes with missing-rate warnings. Preserve repayment links and their prefills, and distinguish truly settled groups from cycles and excluded currencies.
  • Include Polish translations. No ledger rewrites or production changes.

Verification

  • New backend regressions cover cross-member persistence/rendering, migration defaults for existing groups, form compatibility/validation, permissions/archive, route prefills and empty/missing-rate states.
  • Real Chromium regression uses separate Alex and Maya sessions at desktop 1280px and mobile 390px; checks saved settings, HTMX navigation and reload.
  • Parent independently ran affected settings/groups/i18n/browser tests on final commit: 103 passed, 1 unrelated OCR case deselected.
  • Worker full suite before final typing-only adjustments: 345 passed; affected suite after adjustments: 169 passed. Final full-suite CI is checked separately below.
  • Django system/migration-drift checks, changed-file Ruff, git diff --check and reproducible committed Tailwind build pass.
  • Repository mypy baseline remains 82 existing errors; no new findings reported. Tests emit existing missing-staticfiles-directory warnings.
  • Behavioral RED recorded before production edits: a different member still saw both methods despite another member selecting Simplified.

Delivery

Merged and deployed to Birdie from main commit 36bab781e64928471e348adbd5e8ad2d04cb173f. Main CI passed all 345 tests and image publication before rollout. Both web and scheduler run the exact new image with zero restarts; public HTTP 200. The additive migration is applied; all pre-existing application rows were fingerprint-verified unchanged. Pre-migration data archive fully read and SQLite integrity checked. Settings and balances rendered read-only for all actual registered group memberships (12 route renders). Existing groups default to Exact debts. Old image intentionally retained because its exact registry digest is no longer available (manifest and buildx both report not found).

Visual verification

Real Django + Chromium with synthetic fixtures, at desktop 1280px and mobile 390px. Settings saved by Alex and viewed by Maya in a separate session.

settings-desktop

settings-desktop

settings-mobile

settings-mobile

balances-simplified-maya-desktop

balances-simplified-maya-desktop

balances-simplified-maya-mobile

balances-simplified-maya-mobile

## Summary - Store one shared Exact debts / Simplified settlement method per group. Additive migration defaults existing and new groups to Exact debts. - Configure the method in Group Settings under the current permission model: any authenticated member of that group; archived groups remain read-only. - Render only the configured method for every member on full page loads and HTMX navigation. Remove the individual browser toggle. - Preserve the create form and keep saved preferences when older settings submissions omit the new field. Reject unknown choices. - Reuse the existing debt algorithms unchanged: exact uses original currencies; simplified uses base-currency routes with missing-rate warnings. Preserve repayment links and their prefills, and distinguish truly settled groups from cycles and excluded currencies. - Include Polish translations. No ledger rewrites or production changes. ## Verification - New backend regressions cover cross-member persistence/rendering, migration defaults for existing groups, form compatibility/validation, permissions/archive, route prefills and empty/missing-rate states. - Real Chromium regression uses separate Alex and Maya sessions at desktop 1280px and mobile 390px; checks saved settings, HTMX navigation and reload. - Parent independently ran affected settings/groups/i18n/browser tests on final commit: **103 passed, 1 unrelated OCR case deselected**. - Worker full suite before final typing-only adjustments: 345 passed; affected suite after adjustments: 169 passed. Final full-suite CI is checked separately below. - Django system/migration-drift checks, changed-file Ruff, `git diff --check` and reproducible committed Tailwind build pass. - Repository mypy baseline remains 82 existing errors; no new findings reported. Tests emit existing missing-staticfiles-directory warnings. - Behavioral RED recorded before production edits: a different member still saw both methods despite another member selecting Simplified. ## Delivery Merged and deployed to Birdie from main commit `36bab781e64928471e348adbd5e8ad2d04cb173f`. Main CI passed all 345 tests and image publication before rollout. Both web and scheduler run the exact new image with zero restarts; public HTTP 200. The additive migration is applied; all pre-existing application rows were fingerprint-verified unchanged. Pre-migration data archive fully read and SQLite integrity checked. Settings and balances rendered read-only for all actual registered group memberships (12 route renders). Existing groups default to Exact debts. Old image intentionally retained because its exact registry digest is no longer available (manifest and buildx both report not found). ## Visual verification Real Django + Chromium with synthetic fixtures, at desktop 1280px and mobile 390px. Settings saved by Alex and viewed by Maya in a separate session. ### settings-desktop ![settings-desktop](https://git.marut.network/attachments/f489a6b6-e2f8-4ff4-98b9-a7ce00639384) ### settings-mobile ![settings-mobile](https://git.marut.network/attachments/deeebf90-3984-4829-85f8-0ece5eef06a2) ### balances-simplified-maya-desktop ![balances-simplified-maya-desktop](https://git.marut.network/attachments/81ad10a0-fcf1-4fab-9d32-52353f9fd2a8) ### balances-simplified-maya-mobile ![balances-simplified-maya-mobile](https://git.marut.network/attachments/906e650e-084a-47f9-be1a-146f6200f863)
feat(groups): choose one shared debt settlement method per group
All checks were successful
Test and push Docker image / test (pull_request) Successful in 2m54s
Test and push Docker image / push (pull_request) Has been skipped
da6423cdd2
Groups now store whether balances are settled by exact debts (the default,
also for existing groups) or a simplified repayment route. Any member can
change it in Settings, and the Balances page shows only that method to
everyone instead of a per-viewer toggle. Omitting the field never resets a
saved choice; the create form is unchanged and uses the model default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
exler merged commit 36bab781e6 into main 2026-10-31 22:59:07 +01:00
exler deleted branch feat/group-settlement-method 2026-10-31 22:59:08 +01:00
Sign in to join this conversation.
No reviewers
No milestone
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
exler/spendbee!7
No description provided.