Skip to content

fix(oceanpark): stop reporting the site's queue text as a wait time - #698

Open
cubehouse wants to merge 1 commit into
mainfrom
fix/oceanpark-status-only
Open

cubehouse wants to merge 1 commit into
mainfrom
fix/oceanpark-status-only

Conversation

@cubehouse

Copy link
Copy Markdown
Member

Upstream behaviour

The Ocean Park Hong Kong attractions page shows a queue figure per ride as text such as "0 mins" or "5 mins". The figure moves in coarse steps, mostly 0 and 5 (in a July capture of the page, 28 of 32 figures were 0 or 5 and the rest were 10 or 15), and it does not follow the length of the line. It behaves like a flag on the ride, not a measured queue.

Change

Rides no longer publish queue.STANDBY.waitTime. A ride's live data is now its id and a status, with no queue object, so nothing downstream reads the figure as a measured wait.

Status is decided exactly as before:

  • the ride's queue text holds a minute figure, 0 included: OPERATING
  • the ride has a null queue field or text with no minute figure: CLOSED

The status never depended on the value of the figure, only on whether one is present, so 0 and 5 give the same result. parseQueueMinutes is kept for that presence check, and its comment now says the number is not a wait time.

Show times, entities, schedules and everything else are unchanged.

Tests

In src/parks/oceanpark/__tests__/oceanpark.test.ts:

  • the five existing tests that asserted queue.STANDBY.waitTime now assert queue is absent and status is unchanged
  • a table of queue texts (0, 5, 10, 15, 25 minutes) must yield exactly {id, status: 'OPERATING'} with no queue key
  • 0 and 5 minutes give the same status
  • a missing queue field, missing text, null text and text with no minutes each yield exactly {id, status: 'CLOSED'}
  • a mixed listing keeps per-ride status and has no queue on any ride

The new "no queue" tests failed before the change for the right reason ({STANDBY: {waitTime: ...}} present). Full suite: 189 files, 4205 passed, 1 skipped. Typecheck clean.

🤖 Generated with Claude Code

The attractions listing carries a per-ride queue figure ("0 mins",
"5 mins"). It moves in coarse steps, mostly 0 and 5, and does not track
the line, so publishing it as a standby wait time reported a measurement
that is not one.

Rides now carry a status and no queue object. Status is decided as
before: a ride whose queue text holds a minute figure, 0 included, is
OPERATING; a ride with no figure is CLOSED. Show times and everything
else are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant