Skip to content

feat: add trending feed with metric and timeframe filters#232

Merged
barrydeen merged 1 commit intomainfrom
feat/trending-feed
Mar 12, 2026
Merged

feat: add trending feed with metric and timeframe filters#232
barrydeen merged 1 commit intomainfrom
feat/trending-feed

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • Add FeedType.TRENDING connecting to wss://feeds.nostrarchives.com/notes/trending/{metric}/{timeframe} endpoints
  • Preserve relay arrival order (append instead of chronological binary insert) so trending rank is maintained
  • Icon-based filter chips for metrics (reactions, replies, reposts, zaps) and a timeframe dropdown (today/7d/30d/1y/all) in a single-line sub-menu bar

Files changed

  • FeedViewModel.ktTRENDING enum value, TrendingMetric/TrendingTimeframe enums, state exposure and delegates
  • EventRepository.ktaddTrendingFeedEvent() + trendingFeedAppend() for arrival-order insertion
  • EventRouter.kt — branch relay feed routing to trending append when trending is active
  • FeedSubscriptionManager.kt — trending subscription lifecycle, metric/timeframe switching, dedup bypass registration
  • FeedScreen.kt — "Trending" dropdown item, TrendingFilterBar composable with icon chips + timeframe dropdown

Test plan

  • Select "Trending" from feed dropdown — notes load in trending rank order
  • Switch between metric chips (heart/reply/repost/zap icons) — feed clears and reloads
  • Switch timeframe via dropdown (Today/7d/30d/1y/All) — feed clears and reloads
  • Switch away from Trending to Follows/Relay/List and back — feed clears and reloads correctly
  • Profile pictures and engagement counts load for trending notes

Connect to wss://feeds.nostrarchives.com trending endpoints with
arrival-order preservation. Filter chips for metrics (reactions,
replies, reposts, zaps) and timeframe dropdown (today/7d/30d/1y/all).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@barrydeen barrydeen merged commit e7b5bd1 into main Mar 12, 2026
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