Skip to content

[Feature] Active story badges + active-first sorting on Trending/MCap #958

@realproject7

Description

@realproject7

Overview

Make active stories (still accepting new plots) visually distinct and prioritized in relevant sort modes.

1. Active badge on book card

Add an "Active" badge on the book-shaped story card, positioned above the plot count badge at the bottom.

┌─────────────┐
│ MYSTERY     │  ← genre badge (existing)
│             │
│  Story      │
│  Title      │
│             │
│ Active      │  ← new badge, same style as genre
│ 3 plots     │  ← existing plot count
└─────────────┘

Badge design:

  • Same style as the genre/category badge (small rounded pill, point color text)
  • Text: "Active" for active stories, "Completed" or "Expired" for sunset/expired
  • Color: accent/brown for Active, muted/grey for Completed

Book outline:

  • Active stories: thicker border with accent color (e.g., border-2 border-accent)
  • Completed stories: normal thin border (existing style)

Active = sunset === false AND (has_deadline === false OR deadline not expired)

2. Active-first sorting (Trending/MCap only)

Active stories sort above completed stories, but only for these sort modes:

These sorts should NOT apply active-first:

  • Recent — pure chronological, active status irrelevant
  • TVL — value-based, expired stories with high TVL deserve their rank

Implementation: for Trending/MCap sorts, use a two-level sort:

ORDER BY 
  (CASE WHEN sunset = false AND (has_deadline = false OR deadline_not_expired) THEN 0 ELSE 1 END),
  mcap DESC  -- or trending metric

3. Completed/Expired visual dimming

Completed stories on the discover page:

  • Book card has slightly reduced opacity or greyed-out tone
  • "Completed" badge in muted color (replaces "Active" position)
  • No accent border (normal thin border)

Files

  • Story card component (book shape) — add Active/Completed badge + border styling
  • Discover page — add active-first logic for Trending/MCap sorts
  • API route for discovery — support active-first ordering

Acceptance Criteria

  • "Active" badge on book card (same style as genre badge)
  • "Completed"/"Expired" badge for sunset/expired stories
  • Active stories have thicker accent-colored border
  • Trending/MCap sorts: active stories first, then completed
  • Recent/TVL sorts: unaffected by active status
  • Completed stories visually dimmed

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agentdesignDesign and UI changesenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions