[#772] Simplify Reader holdings + portfolio boxes, add trade history#778
[#772] Simplify Reader holdings + portfolio boxes, add trade history#778realproject7 merged 3 commits intomainfrom
Conversation
Holdings cards: replace 4-box grid with 2 boxes (Value with cost-basis % change, Balance). Remove PnL and First Traded boxes. Add recent 5 transactions list below each card via HoldingRecentTrades component. Portfolio dashboard: replace 4-box grid with 2 boxes (Value in USD with portfolio-level cost-basis % change, Holdings count). Remove PLOT and Best 24h boxes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
project7-interns
left a comment
There was a problem hiding this comment.
T2b APPROVE
Clean simplification matching issue scope:
- Portfolio: 4→2 boxes. Cost-basis % calculation correctly aggregates current vs entry across all holdings.
- Holdings: 4→2 boxes. Value now shows cost-basis % instead of 24h price change — more meaningful for individual positions.
- HoldingRecentTrades: Good component isolation. Query is well-scoped (per address+storyline, limit 5, 60s stale time). Gracefully returns null when loading/empty. Buy/sell mapped from mint/burn event types.
No concerns.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The simplified Reader layout is close, but the new portfolio-level cost-basis percentage can be materially wrong for users who hold tokens without a tracked entry price.
Findings
- [medium]
portfolioCostPctadds every holding's current USD value into the numerator, but only adds holdings with a knownentryPriceinto the cost basis denominator. That means any transferred / legacy / otherwise untracked holding is treated as having zero cost and inflates the portfolio percentage, even though the per-holding cards correctly hide the percent when cost basis is unknown.- File:
src/app/profile/[address]/page.tsx:1450 - Suggestion: When
entryPriceis missing, exclude that holding from bothtotalCurrentUsdandtotalCostUsdfor the portfolio percentage calculation, or returnnullunless all included holdings have a cost basis.
- File:
Decision
Requesting changes because the current portfolio-level % can be misleadingly high and does not correctly represent total cost-basis performance.
…folio cost % Only include holdings with known entryPrice in both current value and cost basis calculations, preventing transferred/untracked holdings from inflating the portfolio percentage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The portfolio percentage calculation no longer treats unknown-cost holdings as zero-cost, but the summary card still mixes two different populations in the same metric display.
Findings
- [medium] The portfolio summary still renders
ValuefromtotalValue, which includes all holdings, whileportfolioCostPctnow includes only holdings with a knownentryPrice. That means the UI can show a total portfolio dollar value for all positions with a percentage that only describes a subset of them, which is still misleading for mixed portfolios.- File:
src/app/profile/[address]/page.tsx:1443 - File:
src/app/profile/[address]/page.tsx:1473 - Suggestion: Either compute the displayed USD value from the same subset used for
portfolioCostPct, or suppress the%unless the displayed value and cost basis are derived from the same set of holdings.
- File:
Decision
Requesting changes because the summary card still pairs a full-portfolio dollar value with a partial-portfolio percentage, which is not a coherent cost-basis metric.
…ave entry prices Portfolio cost % is now hidden unless every holding has a known entry price, ensuring the displayed percentage always describes the full Value amount shown. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The follow-up change resolves the remaining portfolio summary issue by hiding the cost-basis percentage unless all holdings have a known entry price, so the displayed % now always describes the same full portfolio value shown on the card.
Findings
- None.
Decision
Approving because the Reader holdings simplification, recent-trades list, and portfolio summary now match issue #772 without the misleading mixed-population percentage from the earlier revision.
Summary
HoldingRecentTradescomponent showing last 5 buy/sell transactions below each holdings cardFixes #772
Test plan
npm run buildpasses🤖 Generated with Claude Code