From 41e474653f3d6116e129cb658734ab93741a7103 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 22 Jul 2026 01:01:08 +0000 Subject: [PATCH] Fix Local category page never showing Local-tagged sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /category/local secretly filtered by geo:'philadelphia' instead of the Local category, a leftover from an old "Local: " colon-syntax convention that has no admin UI behind it anymore — the Sources tab assigns plain category names via checkboxes, so a source tagged "Local" never got a matching geo value and could never show up here, even though it correctly appeared on Top Stories (which only checks pushToTopStories + the category array, not geo). Local now filters by category like every other category page. Verified: reproduced the exact bug (geo: null despite category: ['Local']), confirmed /api/feed?geo=philadelphia returns nothing while the new /api/feed?category=local correctly returns the article. --- frontend/src/routes/category/[name]/+page.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/category/[name]/+page.ts b/frontend/src/routes/category/[name]/+page.ts index a33ee99..c83a4df 100644 --- a/frontend/src/routes/category/[name]/+page.ts +++ b/frontend/src/routes/category/[name]/+page.ts @@ -3,10 +3,12 @@ import { getFeed } from '$lib/api'; const PAGE_SIZE = 15; +// Every category page (including "Local") filters by its category name — sources are +// assigned categories directly via checkboxes in the admin Sources tab, so a source +// tagged "Local" shows up here the same way one tagged "Tech" shows up on /category/tech. export const load: PageLoad = async ({ params, fetch }) => { const name = params.name; - const isLocal = name.toLowerCase() === 'local'; - const filters = isLocal ? { geo: 'philadelphia' } : { category: name }; + const filters = { category: name }; const initial = await getFeed({ ...filters, limit: PAGE_SIZE }, fetch); return { initial, filters, name, pageSize: PAGE_SIZE }; };