[#957] Add Market Cap sort option#969
Conversation
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.
Verdict: REQUEST CHANGES
Summary
The new Market Cap tab wiring is straightforward, but the ranking source is not actually global market-cap order. getMcapStorylines() reuses the recency-biased candidate pool from fetchCandidatesAndRatings(), so older high-cap stories can be omitted entirely from the sorted results.
Findings
- [high] Market Cap sorting is computed over a limited recency/activity subset instead of the full discover set.
getMcapStorylines()callsfetchCandidatesAndRatings(), and that helper only pulls up to 50 newest stories plus 50 recently-updated stories before sorting. As a result, a story with a top market cap can be missing from the Market Cap view if it is older and not recently active, which violates the requirement that stories be sorted by MCap descending.- File:
lib/ranking.ts:293 - Suggestion: Source the MCap ranking from the full filtered discover set (or a dedicated MCap candidate query), not the trending candidate pool optimized for recency/activity.
- File:
Decision
Requesting changes because the new sort order is incomplete and can return the wrong top stories for Market Cap.
…ubset 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 re-review update fixes the blocking Market Cap ranking issue by sourcing candidates from the full filtered story set instead of the recency/activity subset used for trending. The new sort option, page wiring, and active-first ordering now line up with the reviewed requirements.
Findings
- No blocking findings.
Decision
Approving because the previous correctness issue in lib/ranking.ts is resolved and the Market Cap view now ranks the full eligible set by MCap descending with the intended active-first ordering. Checks visible to me were Vercel-only at review time.
Summary
getMcapStorylines()inlib/ranking.tscomputes MCap astotalSupply × pricePerToken × PLOT/USDusing batch multicall + cached USD pricefetchCandidatesAndRatingsfor candidate pool andgetBatchTokenDatafor on-chain dataFixes #957
Test plan
🤖 Generated with Claude Code