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
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.
Badge design:
Book outline:
border-2 border-accent)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:
Implementation: for Trending/MCap sorts, use a two-level sort:
3. Completed/Expired visual dimming
Completed stories on the discover page:
Files
Acceptance Criteria