Skip to content

feat(hot): use sort=watching for 24h view-based ranking#282

Open
rabble wants to merge 1 commit into
mainfrom
feat/hot-tab-sort-watching
Open

feat(hot): use sort=watching for 24h view-based ranking#282
rabble wants to merge 1 commit into
mainfrom
feat/hot-tab-sort-watching

Conversation

@rabble
Copy link
Copy Markdown
Member

@rabble rabble commented Apr 28, 2026

Summary

Two-line change: Hot tab now requests `sort=watching` from Funnelcake instead of `sort=trending`.

Why

Today's mapping (`SortMode='hot'` → funnelcake `'trending'`) hits the 7-day age-decay formula that buries classic Vines at score ≈ 0 after a few weeks. Classics are a primary draw on Divine — the Hot tab should rank by current attention, not upload date.

Funnelcake `sort=watching` (PR divine-funnelcake#305 + #307) ranks by 24-hour CDN view count with NO age decay.

Verification

```
curl -s 'https://api.divine.video/api/v2/videos?sort=watching&limit=5' | jq '.data[].created_at'
```
Top result is a 2016 Naruto vine with 33M loops — exactly the surface we want.

Diff

  • `src/hooks/useInfiniteVideosFunnelcake.ts`: add `'watching'` to `FunnelcakeSortMode` union
  • `src/hooks/useVideoProvider.ts`: flip `case 'hot': return 'watching';`

Test plan

  • `tsc --noEmit` clean
  • Manual: open Discovery → Hot tab, confirm classic Vines appear among top results

Launching in 2 days.

🤖 Generated with Claude Code

Hot tab today maps SortMode='hot' → FunnelcakeSortMode='trending',
which uses the 7-day age decay formula that buries classic Vines
(score → 0 after a few weeks regardless of current attention).

Funnelcake just shipped sort=watching (PR #305 + #307): 24-hour
CDN view count, no age decay. Surfaces classics by what people
are looking at right now — including 10-year-old Vines.

Verified live: https://api.divine.video/api/v2/videos?sort=watching
returns classic Vines (e.g. Naruto vine from 2016 with 33M loops)
above recent uploads.

Two-line change: add 'watching' to FunnelcakeSortMode union, flip
the 'hot' → 'watching' map in useVideoProvider.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🚀 Preview Deployment

Property Value
Preview URL https://a3909e2a.divine-web-fm8.pages.dev
Commit ab9b5a6
Branch feat/hot-tab-sort-watching

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying divine-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: ab9b5a6
Status: ✅  Deploy successful!
Preview URL: https://89bd5e2e.divine-web.pages.dev
Branch Preview URL: https://feat-hot-tab-sort-watching.divine-web.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant