Skip to content

feat: add Hacker News "New" feed - #177

Merged
therealsama merged 1 commit into
mainfrom
feat/newest-feed
Jul 5, 2026
Merged

therealsama merged 1 commit into
mainfrom
feat/newest-feed

Conversation

@therealsama

Copy link
Copy Markdown
Collaborator

Add the /newest feed as the last header nav tab (button label "New"; internal key/route/caches/title = newest), backed by Firebase v0/newstories (<=500 reverse-chronological ids) with offset-based pagination mirroring the Best feed.

  • Register newest in FeedType, FEED_TABS, and FEED_TYPE_TITLES
  • Header: decouple label from key via FEED_LABELS, add Rss icon and PILL_WIDTH; clear newest session state on logo click
  • Route /newest + a 4th "New Stories" PWA manifest shortcut
  • fetchNewStories() filters jobs and the monthly whoishiring threads (rename ASK_EXCLUDE_TITLES -> HIRING_EXCLUDE_TITLES, now shared)
  • Wire newest into useInfiniteStories and prefetch parity
  • Tests: hn.test (ordering/pagination/job+hiring filters), Header.test (label/key split), navigation e2e, and distinct e2e mock items

@therealsama
therealsama requested a review from kplachkov as a code owner July 5, 2026 08:52
@therealsama
therealsama force-pushed the feat/newest-feed branch 5 times, most recently from dc93d87 to 236f290 Compare July 5, 2026 15:33
Add the /newest feed as the last header nav tab (button label "New";
internal key/route/caches/title = `newest`), backed by Firebase
`v0/newstories` (<=500 reverse-chronological ids) with offset-based
pagination mirroring the Best feed.

- Register `newest` in FeedType, FEED_TABS, and FEED_TYPE_TITLES
- Header: decouple label from key via FEED_LABELS, add Rss icon and
  PILL_WIDTH; clear newest session state on logo click
- Route `/newest` + a 4th "New Stories" PWA manifest shortcut
- fetchNewStories() filters jobs and the monthly whoishiring threads
  (rename ASK_EXCLUDE_TITLES -> HIRING_EXCLUDE_TITLES, now shared)
- Wire newest into useInfiniteStories and prefetch parity
- Tests: hn.test (ordering/pagination/job+hiring filters), Header.test
  (label/key split), navigation e2e, and distinct e2e mock items
@therealsama
therealsama enabled auto-merge July 5, 2026 19:42
@therealsama
therealsama merged commit ade90a8 into main Jul 5, 2026
4 checks passed
@therealsama
therealsama deleted the feat/newest-feed branch July 5, 2026 20:00
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.

2 participants