feat: prefer Six Flags regular waits, show Fast Lane at 0, mark outages on chart
Three usability fixes after a day of using the ride detail page. 1. Six Flags is now the primary source for regular wait times. SF's /wait-times endpoint reports regular waits alongside Fast Lane, and it updates more promptly than Queue-Times around park-open. The sampler and the live /rides + ride-history routes all prefer SF's regularWaittime when its createdDateTime is non-empty; Queue-Times remains the fallback and the authoritative isOpen source. 2. The today chart's Fast Lane line now stays visible when its value is 0 (walk-on). Y-axis bottom padding ensures the line sits clearly above the X-axis frame instead of being clipped against it. The tooltip shows "walk-on" instead of "0 min" for that case. 3. Outages are now explicit on the chart instead of just being gaps. computeOutages walks today's samples to find contiguous closed runs and numbers them chronologically. Each outage renders as a translucent pink ReferenceArea with a "#N" label. The custom tooltip detects when the cursor is over an outage span and shows "Outage #N — Hh Mm" (e.g. "Outage #2 — 1h 28m") in place of the wait/Fast Lane rows. Includes a seed-test-samples.ts dev script for eyeballing the chart with synthetic outage data. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -103,7 +103,10 @@ app.get("/:parkId/rides/:slug", (c) => {
|
||||
live: liveMatch
|
||||
? {
|
||||
isOpen: liveIsOpen,
|
||||
waitMinutes: liveIsOpen ? liveMatch.waitMinutes : 0,
|
||||
// Prefer Six Flags' regular wait when fresh — QT lags around open.
|
||||
waitMinutes: liveIsOpen
|
||||
? (flMatch?.regularMinutes ?? liveMatch.waitMinutes)
|
||||
: 0,
|
||||
hasFastLane: Boolean(flMatch?.hasFastLane),
|
||||
fastLaneMinutes: liveIsOpen ? (flMatch?.fastLaneMinutes ?? null) : null,
|
||||
lastUpdated: liveMatch.lastUpdated,
|
||||
|
||||
Reference in New Issue
Block a user