Skip to content

fix: show milestone receivers on milestone cards#68

Open
ccai40359-wq wants to merge 1 commit into
Trustless-Work:mainfrom
ccai40359-wq:fix/milestone-receiver-display
Open

fix: show milestone receivers on milestone cards#68
ccai40359-wq wants to merge 1 commit into
Trustless-Work:mainfrom
ccai40359-wq:fix/milestone-receiver-display

Conversation

@ccai40359-wq
Copy link
Copy Markdown

@ccai40359-wq ccai40359-wq commented Jun 6, 2026

Summary

  • Add optional receiver to normalized multi-release milestones.
  • Extract milestone-level receiver addresses from receiver (with compatible fallbacks for receiver_address, recipient, and recipient_address).
  • Pass receiver data through desktop and mobile milestone views and display it safely on each milestone card without changing signer/approver rendering.

Contract storage note

The issue identifies receiver as the current milestone-level receiver field; this implementation reads that field first and keeps fallback names only for schema compatibility.

Verification

  • npx tsc --noEmit
  • npm run build (passes; existing Next/Stellar dependency warnings about dynamic require remain)
  • git diff --check
  • Added-line security scan: 0 findings
  • Independent reviewer: passed

Closes #65

Summary by CodeRabbit

  • New Features
    • Milestone cards now display receiver information in a truncated, readable format with full address visible on hover

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 6, 2026

Someone is attempting to deploy a commit to the Trustless Work Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 6, 2026

Worried about impact? Review this PR in Change Stack to explore blast radius before you approve or request changes.

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e631b3d2-4519-4c8f-ad91-9e4e55a2b036

📥 Commits

Reviewing files that changed from the base of the PR and between c9146b0 and b631990.

📒 Files selected for processing (4)
  • src/components/escrow/desktop-view.tsx
  • src/components/escrow/tab-view.tsx
  • src/components/shared/milestone-card.tsx
  • src/mappers/escrow-mapper.ts

📝 Walkthrough

Walkthrough

This PR adds per-milestone receiver display to the Escrow Viewer. The receiver data model is extended in the mapper, extracted from multi-release escrow contracts, threaded through milestone card props, rendered with address truncation, and wired into both desktop and mobile view paths.

Changes

Milestone Receiver Data Threading

Layer / File(s) Summary
Milestone data contract and extraction
src/mappers/escrow-mapper.ts
ParsedMilestone interface gains optional receiver?: string. Multi-release milestone extraction populates receiver by reading receiver field with fallback to receiver_address, recipient, and recipient_address from contract storage.
Milestone card receiver display
src/components/shared/milestone-card.tsx
MilestoneProps adds receiver?: string. A new formatAddressForCard helper truncates long addresses. MilestoneCard destructures receiver and conditionally renders a "Receiver" row with truncated address and full address exposed via title attribute.
View integration
src/components/escrow/desktop-view.tsx, src/components/escrow/tab-view.tsx
Desktop and tab view components pass receiver={milestone.receiver} prop to each MilestoneCard in the milestones list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • #65: This PR directly implements the feature described in issue #65 — adding milestone-level receiver display for multi-release escrows. All acceptance criteria are addressed: receiver is added to the normalized milestone type, extracted from multi-release storage with fallback key support, displayed on both desktop and mobile cards, and long addresses are truncated for layout safety.

Poem

🐰 A receiver finds their place,
On each milestone card with grace.
From data down to UI row,
Now the funds' true path will glow.
Multi-release secrets shared—
Transparency, fully prepared! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main change: adding receiver display to milestone cards.
Linked Issues check ✅ Passed The PR fully implements all coding requirements from issue #65: receiver field added to ParsedMilestone, extraction with fallback support, passed through both views, and displayed on cards with address truncation.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the linked issue; no out-of-scope modifications detected beyond the five files explicitly targeted for receiver display.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Show per-milestone receiver on multi-release milestone cards

1 participant