From bf9e838ea9cf4e9f959bd3cbd9422a363c06f1e5 Mon Sep 17 00:00:00 2001 From: Ryan Salazar Date: Fri, 29 May 2026 11:07:11 +0000 Subject: [PATCH] news/featured: broaden filter back to category=featured w/ pinned-first sort featured=true alone only matches 1 row right now, which would leave the Featured Editorial page nearly empty. Broader category match keeps the page full while featured DESC still bubbles editorial pins to the top. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/lib/articles/legacy-source.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib/articles/legacy-source.ts b/src/lib/articles/legacy-source.ts index 71e336a..c9a4799 100644 --- a/src/lib/articles/legacy-source.ts +++ b/src/lib/articles/legacy-source.ts @@ -340,15 +340,16 @@ export async function getLegacyArticlesBySection( export async function getLegacyFeaturedArticles(limit = 200): Promise { try { - // Strict mode: only rows the editorial team has explicitly pinned via - // wp_imported_posts.featured=true. The broader category='featured' pool - // also contains older PR-leaning items that should not surface on the - // public Featured Editorial page. + // Show every row in the Featured category, but bubble editorial pins + // (featured=true) to the top. Strict "featured=true only" filtering was + // tried briefly and left the page near-empty (1 row); the broader pool + // gives the page real depth while pins still lead. const { data, error } = await client() .from("wp_imported_posts") .select(SELECT_COLS + ",featured") .eq("status", "published") - .eq("featured", true) + .ilike("category", "featured") + .order("featured", { ascending: false }) .order("wp_published_at", { ascending: false, nullsFirst: false }) .limit(limit); if (error || !data) return [];