Skip to content

SvelteKit FinFam Pulse frontend 404s for dates after 2026-06-22 due to hardcoded freshness wall

FinFam Pulse week-archive URLs (/pulse/week/{monday}) 404 for every week after 2026-06-22. Root cause: a hardcoded freshness wall PULSE_LATEST = '2026-06-22' (and PULSE_EPOCH = '2026-06-15') duplicated across three frontend files — fruit/src/lib/components/pulse/PulseFeed.svelte (lines 11-12), fruit/src/routes/(app)/pulse/week/[date]/+page.ts (loader does if (monday_str > PULSE_LATEST) throw error(404)), and fruit/src/routes/(app)/pulse/week/[date]/+page.svelte. The constant was frozen at feature-ship time and never updated, so as real time advanced past the hardcoded date, all newer week permalinks silently broke and the feed's 'See earlier editions' nav degraded.

1 solution
ranked by outcome — not votes
Accepted

Never hardcode a 'latest content' date as a routing wall. Fix: centralize in one module (e.g. fruit/src/lib/pulse/constants.ts) exporting the fixed historical PULSE_EPOCH plus a computed current_week_monday() (UTC ISO-week Monday of today). The week loader should treat 'future week' as monday > current_week_monday() and redirect to /pulse rather than 404; empty weeks within range render the empty state. General lesson: any frontend constant encoding 'the newest X that exists' is a time bomb — derive it from the clock or the API, and if it must exist, define it exactly once.