feat: amber indicator during post-close wind-down buffer
All checks were successful
Build and Deploy / Build & Push (push) Successful in 2m22s

Parks in the 1-hour buffer after scheduled close now show amber instead
of green: the dot on the desktop calendar turns yellow, and the mobile
card badge changes from "Open today" (green) to "Closing" (amber).

- getOperatingStatus() replaces isWithinOperatingWindow's inline logic,
  returning "open" | "closing" | "closed"; isWithinOperatingWindow now
  delegates to it so all callers are unchanged
- closingParkIds[] is computed server-side and threaded through
  HomePageClient → WeekCalendar/MobileCardList → ParkRow/ParkCard
- New --color-closing-* CSS variables mirror the green palette in amber

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Josh Wright
2026-04-05 09:06:45 -04:00
parent 090f4d876d
commit 53297a7cff
7 changed files with 57 additions and 14 deletions

View File

@@ -10,11 +10,12 @@ interface ParkCardProps {
today: string;
openRideCount?: number;
coastersOnly?: boolean;
isClosing?: boolean;
}
const DOW = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
export function ParkCard({ park, weekDates, parkData, today, openRideCount, coastersOnly }: ParkCardProps) {
export function ParkCard({ park, weekDates, parkData, today, openRideCount, coastersOnly, isClosing }: ParkCardProps) {
const openDays = weekDates.filter((d) => parkData[d]?.isOpen && parkData[d]?.hoursLabel);
const tzAbbr = getTimezoneAbbr(park.timezone);
const isOpenToday = openDays.includes(today);
@@ -60,17 +61,17 @@ export function ParkCard({ park, weekDates, parkData, today, openRideCount, coas
<div style={{ display: "flex", flexDirection: "column", alignItems: "flex-end", gap: 5, flexShrink: 0 }}>
{isOpenToday ? (
<div style={{
background: "var(--color-open-bg)",
border: "1px solid var(--color-open-border)",
background: isClosing ? "var(--color-closing-bg)" : "var(--color-open-bg)",
border: `1px solid ${isClosing ? "var(--color-closing-border)" : "var(--color-open-border)"}`,
borderRadius: 20,
padding: "4px 10px",
fontSize: "0.65rem",
fontWeight: 700,
color: "var(--color-open-text)",
color: isClosing ? "var(--color-closing-text)" : "var(--color-open-text)",
whiteSpace: "nowrap",
letterSpacing: "0.03em",
}}>
Open today
{isClosing ? "Closing" : "Open today"}
</div>
) : (
<div style={{
@@ -89,7 +90,7 @@ export function ParkCard({ park, weekDates, parkData, today, openRideCount, coas
{isOpenToday && openRideCount !== undefined && (
<div style={{
fontSize: "0.65rem",
color: "var(--color-open-hours)",
color: isClosing ? "var(--color-closing-hours)" : "var(--color-open-hours)",
fontWeight: 500,
textAlign: "right",
}}>