From 07966f556f1cd754b18950f987ccb6e0ef7ac9b7 Mon Sep 17 00:00:00 2001 From: Ryan Salazar Date: Fri, 29 May 2026 11:06:00 +0000 Subject: [PATCH] news/featured: own header + tighter pool, hide AI suggestions sidebar NewsPageClient now accepts kicker / heading / subtitle / hideAiSuggestions props so the curated Featured Editorial view can speak with its own voice instead of borrowing 'Industry News' copy. Featured fetch tightened from 'category ILIKE featured' (63 rows incl. PR-tagged content) to 'featured=true' (editorial pins only), so the page no longer trails into generic news cards under the lead group. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/app/news/NewsPageClient.tsx | 29 ++++++++++++++++++++++++----- src/app/news/featured/page.tsx | 8 +++++++- src/lib/articles/legacy-source.ts | 7 +++++-- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/app/news/NewsPageClient.tsx b/src/app/news/NewsPageClient.tsx index d080e3f..8ab308e 100644 --- a/src/app/news/NewsPageClient.tsx +++ b/src/app/news/NewsPageClient.tsx @@ -31,7 +31,26 @@ function parseArticleDate(dateStr: string): Date { return new Date(dateStr); } -export default function NewsPage({ articles }: { articles: Article[] }) { +interface NewsPageProps { + articles: Article[]; + /** Eyebrow label rendered above the H1. Defaults to "News". */ + kicker?: string; + /** Page H1. Defaults to "Industry News". */ + heading?: string; + /** Subhead under the H1. */ + subtitle?: string; + /** Hide the AI Suggested Articles sidebar widget (it surfaces general + recommendations and shouldn't appear on curated views like Featured). */ + hideAiSuggestions?: boolean; +} + +export default function NewsPage({ + articles, + kicker = "News", + heading = "Industry News", + subtitle = "Breaking news and industry updates from the world of broadcast engineering", + hideAiSuggestions = false, +}: NewsPageProps) { const allArticles = Array.isArray(articles) ? articles : []; const searchParams = useSearchParams(); @@ -133,11 +152,11 @@ export default function NewsPage({ articles }: { articles: Article[] }) {
- News + {kicker}
-

Industry News

-

Breaking news and industry updates from the world of broadcast engineering

+

{heading}

+

{subtitle}

@@ -304,7 +323,7 @@ export default function NewsPage({ articles }: { articles: Article[] }) { {/* AI Suggested Articles */} - + {!hideAiSuggestions && }

diff --git a/src/app/news/featured/page.tsx b/src/app/news/featured/page.tsx index b74787c..085869b 100644 --- a/src/app/news/featured/page.tsx +++ b/src/app/news/featured/page.tsx @@ -16,7 +16,13 @@ export default async function FeaturedNewsPage() { const articles = await getLegacyFeaturedArticles(200); return ( - + ); } diff --git a/src/lib/articles/legacy-source.ts b/src/lib/articles/legacy-source.ts index 7ca64d0..71e336a 100644 --- a/src/lib/articles/legacy-source.ts +++ b/src/lib/articles/legacy-source.ts @@ -340,12 +340,15 @@ 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. const { data, error } = await client() .from("wp_imported_posts") .select(SELECT_COLS + ",featured") .eq("status", "published") - .ilike("category", "featured") - .order("featured", { ascending: false }) + .eq("featured", true) .order("wp_published_at", { ascending: false, nullsFirst: false }) .limit(limit); if (error || !data) return [];