Skip to content

Feat/edit inheritance plan 794#876

Merged
ONEONUORA merged 6 commits into
Fracverse:masterfrom
tech-adrian:feat/edit-inheritance-plan-794
Jun 27, 2026
Merged

Feat/edit inheritance plan 794#876
ONEONUORA merged 6 commits into
Fracverse:masterfrom
tech-adrian:feat/edit-inheritance-plan-794

Conversation

@tech-adrian

Copy link
Copy Markdown
Contributor

Summary

  • Adds EditInheritancePlanPanel — a modal panel for editing an existing inheritance plan
  • Pre-populates all fields (title, description, beneficiaries, inactivity timer, yield harvesting) from current plan state
  • Beneficiary management: add/remove rows, set wallet address, name, and allocation %; live badge enforces 100% total
  • Inactivity timer field and yield harvesting toggle
  • Save flow: requests a Stellar wallet signature (kit.signTransaction) then calls PUT /api/plans/:id; shows idle → signing → saving → success/error states
  • New route at /asset-owner/plans/[planId]/edit renders the panel with a loading skeleton and error state
  • updatePlan() method added to PlansAPI; MSW handler added for PUT /api/plans/:id
  • 14 component tests + 3 API tests; all 154 tests pass, TS compiles clean

Test plan

  • Connect a Stellar wallet and navigate to a plan
  • Open edit panel — verify fields are pre-populated
  • Add a second beneficiary, adjust allocations to 100%; Save becomes enabled
  • Remove a beneficiary; verify the last one cannot be deleted
  • Toggle yield harvesting; verify label updates
  • Click Save — wallet signature prompt appears, then plan is updated
  • Trigger an API error (network offline) — error message renders
  • Run npm test — 154 tests pass
  • Run tsc --noEmit — no errors

Closes #794

🤖 Generated with Claude Code

tech-adrian and others added 5 commits June 27, 2026 15:44
Adds Beneficiary and UpdatePlanRequest interfaces to the Plans API,
and a new updatePlan() method that calls PUT /api/plans/:id.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Supports the edit plan flow in unit and integration tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Builds the edit panel for inheritance plan owners with:
- Pre-populated fields from current plan state
- Add/remove beneficiary rows with wallet address and name
- Per-beneficiary percentage allocation with live 100% validation
- Inactivity timer configuration (days)
- Yield harvesting enable/disable toggle
- Save button that requests a Stellar wallet signature (signTransaction)
  before calling PUT /api/plans/:id, with idle/signing/saving/success/error states

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Server-side page that loads plan data and renders the
EditInheritancePlanPanel. Handles loading skeleton and error states.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 component tests covering render, pre-population, beneficiary CRUD,
allocation validation, yield toggle, save/error flows, and wallet signing.
3 API tests covering successful update, 404 and 500 error handling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@tech-adrian Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

The `text=InheritX` locator matched 6 elements, causing Playwright strict mode to fail. Replaced with `getByRole("banner")` which uniquely targets the header element.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@ONEONUORA ONEONUORA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @tech-adrian
Thank you for your contribution

@ONEONUORA ONEONUORA merged commit 8ccb65f into Fracverse:master Jun 27, 2026
4 checks passed
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.

[Frontend] Build 'Edit Inheritance Plan' Interface

2 participants