From c25e14ed6aa1e3b0e85b10d84b4da4486222bd9c Mon Sep 17 00:00:00 2001 From: jay Date: Sat, 6 Jun 2026 15:56:48 -0400 Subject: [PATCH] Add a permanent "Latest" lane beside "Highlights" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restructure the nav around two permanent lanes, then the reader's chosen ones: "Highlights" (the curated daily brief β€” formerly "Today") and "Latest" (the freshest accepted stories, newest-first). Now that the gate is tight, a chronological "incoming" feed is safe to expose. * feed(): new sort="latest" (pure recency) alongside the default best-first rank; /api/feed exposes sort=ranked|latest (validated). Still accepted-only and boundary-respecting either way. * lanes.py: two pinned lanes (Highlights + Latest) instead of one. * Home: "Latest" view + "Load more" pagination for every feed view (offset- paged, de-duped). Mobile bottom bar gains a Latest tab. * LanePicker shows both pinned lanes; nav rail renders them first. Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/src/lib/components/BottomNav.svelte | 12 ++- frontend/src/lib/components/LanePicker.svelte | 6 +- frontend/src/routes/+page.svelte | 101 ++++++++++++++---- goodnews/api.py | 5 +- goodnews/lanes.py | 8 +- goodnews/queries.py | 14 ++- tests/test_feed_sort.py | 27 +++++ tests/test_lanes.py | 7 +- 8 files changed, 143 insertions(+), 37 deletions(-) create mode 100644 tests/test_feed_sort.py diff --git a/frontend/src/lib/components/BottomNav.svelte b/frontend/src/lib/components/BottomNav.svelte index dd65fd8..4f08d47 100644 --- a/frontend/src/lib/components/BottomNav.svelte +++ b/frontend/src/lib/components/BottomNav.svelte @@ -1,14 +1,18 @@