feat(calendar): hide server-wide Popular preset in web UI for now

Popular reflects server-wide watch counts, which are sparse on a
low-traffic server. Hidden from the selector, URL allowlist, and
empty-state nudge; backend filter and the CalendarFilter type are
left intact so re-enabling is a one-line change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Quick
2026-05-29 14:24:18 -04:00
co-authored by Claude Opus 4.8
parent 93b835e1fd
commit dc194c4e54
+3 -10
View File
@@ -19,9 +19,11 @@ import { addWeeks, formatDayHeading, getWeekDays, getWeekStart } from "@/lib/cal
type CalendarFilter = "following" | "popular" | "trending" | "everything";
// "popular" (server-wide most-watched) is hidden for now — it's sparse until the
// server has enough watch history. Re-add the entry here and in KNOWN_FILTERS to
// surface it; the backend filter remains supported.
const PRESET_OPTIONS: { value: CalendarFilter; label: string }[] = [
{ value: "following", label: "Following" },
{ value: "popular", label: "Popular" },
{ value: "trending", label: "Trending" },
{ value: "everything", label: "All" },
];
@@ -32,7 +34,6 @@ const PRESET_STORAGE_KEY = "calendar:preset";
// Accept the four presets plus legacy server values so old shared links keep working.
const KNOWN_FILTERS = new Set<string>([
"following",
"popular",
"trending",
"everything",
"all",
@@ -276,14 +277,6 @@ function CalendarEmpty({
</p>
{!isEverything && (
<div className="flex flex-wrap items-center justify-center gap-2">
<Button
variant="link"
size="sm"
className="text-primary text-sm"
onClick={() => onSelectPreset("popular")}
>
Popular
</Button>
<Button
variant="link"
size="sm"