From 6e970f1423ad4fb819b68dfd113bc00ca1eecf9b Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 16 Jul 2026 15:30:19 -0700 Subject: [PATCH 1/2] fix: render course pages dynamically to avoid DYNAMIC_SERVER_USAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The course page reads searchParams (?year=) but declared the static- generation config (generateStaticParams + revalidate=false) copied from /race/[slug]. Touching searchParams in a statically-generated route throws DYNAMIC_SERVER_USAGE at request time, 500ing every /courses/[course] page in production (dev masked it — dev always renders dynamically). Opt into dynamic rendering instead. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01LFeozH85YsXjHHbE79Jqs3 --- app/src/app/courses/[course]/page.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/app/courses/[course]/page.tsx b/app/src/app/courses/[course]/page.tsx index 34a5acf..4ea2392 100644 --- a/app/src/app/courses/[course]/page.tsx +++ b/app/src/app/courses/[course]/page.tsx @@ -18,12 +18,11 @@ import ResultCard from "@/components/ResultCard"; import RaceDistributions from "@/components/RaceDistributions"; import { DISCIPLINE_COLORS } from "@/lib/colors"; -// Generate on demand — 178 courses, but keep parity with /race/[slug]. -export async function generateStaticParams() { - return []; -} - -export const revalidate = false; +// This page reads searchParams (?year=), which requires request-time rendering. +// A statically-generated route (generateStaticParams + revalidate=false, as +// /race/[slug] uses) throws DYNAMIC_SERVER_USAGE when it touches searchParams, +// so this route opts into dynamic rendering instead. +export const dynamic = "force-dynamic"; interface PageProps { params: Promise<{ course: string }>; From 0b46ec1d90752ae1b024a1e142e3a2864e116293 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Thu, 16 Jul 2026 15:45:37 -0700 Subject: [PATCH 2/2] chore: re-trigger Vercel deployment The PR-open push did not create a Vercel deployment (likely a dropped webhook during a GitHub 503 window), so the required Vercel status never posted and the PR stayed blocked. Empty commit to re-fire the deployment. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01LFeozH85YsXjHHbE79Jqs3