Skip to content

[Bug] Active-first sort applies to MCap and Recent — should only be on Trending #978

@realproject7

Description

@realproject7

Problem

Active-first sorting is applied to MCap and Recent sort modes, but per the spec (#958) it should only apply to Trending.

Sort Active-first? Current Expected
Trending Yes ✅ Yes ✅ Yes
MCap No ❌ Yes No
Recent No ❌ Yes No
TVL No ? No

Why

  • MCap sort: Users want to see highest market cap stories regardless of active status. An expired story with $10K MCap should rank above an active story with $100 MCap.
  • Recent sort: Pure chronological order. Active status is irrelevant.
  • TVL sort: Same as MCap — value-based ranking.

Fix

Remove active-first logic from MCap, Recent, and TVL sort functions. Only keep it in the Trending sort.

Check lib/ranking.ts or wherever the sort logic lives:

  • getMcapStorylines() — remove active-first sort
  • Recent query — remove active-first sort
  • TVL query — remove active-first sort (if applied)
  • getTrendingStorylines() — keep active-first sort

Files

  • lib/ranking.ts or equivalent
  • src/app/page.tsx or discover page

Acceptance Criteria

  • Trending: active stories first, then completed ✅
  • MCap: sorted purely by market cap descending
  • Recent: sorted purely by block_timestamp descending
  • TVL: sorted purely by TVL descending

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agentbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions