Skip to content

feat(pwa): add debt transfer between parties#151

Draft
HorusGoul wants to merge 19 commits into
mainfrom
feature/debt-transfer-between-parties
Draft

feat(pwa): add debt transfer between parties#151
HorusGoul wants to merge 19 commits into
mainfrom
feature/debt-transfer-between-parties

Conversation

@HorusGoul
Copy link
Copy Markdown
Owner

@HorusGoul HorusGoul commented Apr 18, 2026

Description

Adds a debt-transfer flow from balances so users can move their own debt into another active group.

Key points:

  • Pay remains the primary balance action; debt transfer is a quieter secondary tap row.
  • Destination party cards match the homepage style and show participant previews.
  • Member selection is skipped when there is only one possible recipient, and recommended recipients are shown first otherwise.
  • The review step is simplified, with inline member avatars and clearer spacing.
  • Spanish strings and debt-transfer E2E coverage are included.

Related Issues

None linked.

Type of Change

  • Bug fix
  • New feature
  • Refactor (no functional changes)
  • Documentation
  • Translation
  • Other (describe below)

Checklist

  • I've read the Contributing Guide
  • I've run pnpm lint and pnpm typecheck
  • I've run pnpm test and all tests pass
  • I've added tests for new functionality (if applicable)
  • I've run pnpm lingui:extract (if I added new strings)
  • I've added a changeset (if this is a user-facing change)

Screenshots

Not included.

Additional Notes

Latest targeted validation: pnpm -C packages/pwa lingui:extract, typecheck, lint, and test:e2e --grep "Debt transfer".

Summary:
- add a dedicated debt transfer flow from balance actions to move a
  user's debt into another joined party with same-currency filtering
- create transfer helper logic, destination-party eligibility lookup,
  and name matching with exact auto-selection plus recommendations
- add unit coverage, a Playwright journey, locale updates, and a
  changeset for the new user-facing workflow

Rationale:
- users already recreate these transfers manually, so the feature turns
  a repetitive multi-step workaround into a guided flow
- keeping the implementation as paired expense creation matches the
  existing mental model and avoids extra transfer metadata complexity

Tests:
- pnpm test
- pnpm lint
- pnpm typecheck
- pnpm -C packages/pwa exec playwright test e2e/debt-transfer.spec.ts
- pnpm -C packages/pwa lingui:extract

Co-authored-by: Codex <codex@openai.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 18, 2026

🦋 Changeset detected

Latest commit: ada1650

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@trizum/pwa Minor
@trizum/mobile Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Signed-off-by: GitHub Actions <actions@github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 18, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
trizum ada1650 Commit Preview URL

Branch Preview URL
Jun 05 2026, 12:43 AM

- Add review and confirmation steps for transferring debt
- Update E2E page object for the new transfer flow
- Refresh English and Spanish copy for the new UI
- Split transfer into party, participant, and confirm steps
- Update E2E coverage and localized copy for the new flow
- Add changelog entry
HorusGoul and others added 14 commits June 4, 2026 13:11
Signed-off-by: GitHub Actions <actions@github.com>
Signed-off-by: GitHub Actions <actions@github.com>
Summary:
- Match destination party cards to the homepage party-card treatment.
- Compact creditor rows, keep recommendations first, and auto-skip when only
  one destination creditor is available.
- Reshape the review step with member avatars and tighter spacing.
- Extend E2E coverage for recommended-first selection and single-creditor skip.

Rationale:
- The transfer flow should avoid redundant screens and oversized controls while
  still making the final debt movement explicit.
- The single-creditor case has no meaningful choice, so the review step can be
  shown directly without a visible intermediate transition.

Tests:
- pnpm -C packages/pwa lingui:extract
- pnpm -C packages/pwa typecheck
- pnpm -C packages/pwa lint
- pnpm -C packages/pwa test:e2e --grep "Debt transfer"

Co-authored-by: Codex <codex@openai.com>
Summary:
- Remove bordered card surfaces from the transfer review step.
- Add homepage-style participant previews to destination party cards.
- Regenerate Lingui catalogs for the updated route references.

Rationale:
- The review screen should read as a compact summary instead of nested cards.
- Party selection should preserve the homepage context by showing who is in each
  destination party.

Tests:
- pnpm -C packages/pwa lingui:extract
- pnpm -C packages/pwa typecheck
- pnpm -C packages/pwa lint
- pnpm -C packages/pwa test:e2e --grep "Debt transfer"

Co-authored-by: Codex <codex@openai.com>
Summary:
- Increase spacing between the transfer review amount and party sections.
- Render participant avatars inline with the review sentence text.
- Regenerate Lingui catalogs for the rich-text review messages.

Rationale:
- Inline avatar/name tokens make the review copy easier to scan without adding
  card-like surfaces back to the page.

Tests:
- pnpm -C packages/pwa lingui:extract
- pnpm -C packages/pwa typecheck
- pnpm -C packages/pwa lint
- pnpm -C packages/pwa test:e2e --grep "Debt transfer"

Co-authored-by: Codex <codex@openai.com>
Summary:
- Reduce inline review avatar size to match the surrounding text scale.
- Tighten review sentence line-height and token spacing for cleaner alignment.

Rationale:
- The inline avatars should support the review sentence without overpowering or
  misaligning the copy.

Tests:
- pnpm -C packages/pwa lingui:extract
- pnpm -C packages/pwa typecheck
- pnpm -C packages/pwa lint
- pnpm -C packages/pwa test:e2e --grep "Debt transfer"

Co-authored-by: Codex <codex@openai.com>
Summary:
- Render review sentence content as centered flex-wrapped items.
- Keep participant tokens and middle text on the same vertical alignment.

Rationale:
- The review sentence should read as one aligned line instead of mixing inline
  text baselines with avatar/name tokens.

Tests:
- pnpm -C packages/pwa lingui:extract
- pnpm -C packages/pwa typecheck
- pnpm -C packages/pwa lint
- pnpm -C packages/pwa test:e2e --grep "Debt transfer"

Co-authored-by: Codex <codex@openai.com>
Summary:
- Make Pay the only prominent settlement action button.
- Move debt transfer into a quiet 44px transparent action row.
- Rename the balances action to "Transfer to another party" and update E2E.

Rationale:
- Debt transfer is a secondary path, so it should remain tappable without
  competing visually with normal settlement.

Tests:
- pnpm -C packages/pwa lingui:extract
- pnpm -C packages/pwa typecheck
- pnpm -C packages/pwa lint
- pnpm -C packages/pwa test:e2e --grep "Debt transfer"

Co-authored-by: Codex <codex@openai.com>
Summary:
- Translate the Spanish catalog entries for the debt transfer flow.
- Preserve Lingui placeholders and rich-text component markers.

Rationale:
- The new debt transfer UI should not ship with missing Spanish messages.

Tests:
- pnpm -C packages/pwa lingui:extract

Co-authored-by: Codex <codex@openai.com>
Summary:
- Remove the unused participantMatch field from destination party options.
- Remove the unused chooseDestinationParty E2E page-object helper.

Rationale:
- These were left over from earlier iterations of the transfer flow and are no
  longer needed after automatic step skipping and direct option selection.

Tests:
- pnpm -C packages/pwa typecheck
- pnpm -C packages/pwa lint
- pnpm -C packages/pwa test:e2e --grep "Debt transfer"

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: GitHub Actions <actions@github.com>
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