fix: open profiles for every real receipt peer - #2673
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe change separates profile-name and profile-avatar eligibility for transaction details. It broadens profile detection across transaction types, corrects bridge-fulfilled request peer mapping, updates header navigation, and adds regression coverage. ChangesTransaction profile navigation
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Code-analysis diffPainscore total: 7158 → 7158.83 (+0.83) 🆕 New findings (19)
✅ Resolved (19)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
|
@abalinda Valid finding, thanks. The bank branch incorrectly included the logged-in sender in peer identity, and |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Receipt profile navigation trusted the peer identity signal, but then narrowed it with a presentation-type allowlist. This left valid Peanut users inert on bank-fulfilled request receipts and other real-user flows.
This PR removes that stale allowlist. The shared
hasUserProfilepredicate now allows any non-link transaction whose peer is a real Peanut user with a valid username. Raw addresses, UUID fallbacks, guests, links, merchants, and generated system labels stay inert.The bank-fulfilled request strategy now derives peer identity only from
recipientAccount. It no longer treats the logged-in sender as the peer.The receipt header separates name and avatar navigation. A real counterparty name always links to the profile. User initials or a real user avatar also link. Bank flags, rail icons, and the rest of the receipt card stay inert.
The predicate is shared by the activity row and receipt header. The fix therefore covers the history drawer and standalone
/receipt/[entryId]page without separate peer-identity logic.Task
TASK-21010
Design decision: “To” row
The “To” detail row stays unchanged. It only renders for
claim_external, where the recipient is not a Peanut user and no profile exists. Expanding that row to other receipt types would be separate product work.Risks / breaking changes
Low, frontend-only. No API, contract, dependency, or cross-repo change. The risk is an incorrect profile link if peer identity is wrong. Username, generated-label, link, crypto-address, and UUID checks remain as defense in depth.
QA
bank_request_fulfillment, real-useradd, unknown future presentation types, and non-user QR/card/external flows.pnpm prettier --check .npm run typechecknpm test -- --runInBand— 230 suites, 2,939 passed, 3 skipped.npm run buildScreenshots
N/A — no visible change. This PR changes click targets only.
Follow-up after release
Verify a real bank-fulfilled request receipt on production in both the history drawer and standalone receipt page. Then mark
product/feedback/problems/cant-tap-name-to-open-profile.mdas shipped in a separate content-only change.Summary by CodeRabbit
Bug Fixes
Tests