Skip to content

feat: /waits glance page + phone-widget feed + live weather#12

Merged
illinigirl merged 1 commit into
mainfrom
feat/waits-page-and-widget
Jul 3, 2026
Merged

feat: /waits glance page + phone-widget feed + live weather#12
illinigirl merged 1 commit into
mainfrom
feat/waits-page-and-widget

Conversation

@illinigirl

Copy link
Copy Markdown
Owner

Per-user cross-park waits page (plan-aware, weather header, park filter chips, 60s refresh), a capability-token JSON feed for a true iOS widget, and a Scriptable script to render it. All keyed reads.

🤖 Generated with Claude Code

The per-user "look at my phone, see my waits" surface (successor to the
Pi version's widget):

- /waits (auth-gated): favorites across all parks on ONE page, grouped by
  park, DOWN-first-then-longest-wait glance order, with today's ACTIVE
  plan pinned on top in PLAN order (remaining rides + live waits) and
  current WDW conditions (temp + clear/rain/storm) in the header. Filter
  chips (?park=) narrow to one park. 60s meta refresh (poller cadence is
  2 min). One shared read model (my-waits.ts) — all keyed reads, no scans.
- /api/widget/waits?t=<sub>.<secret>: the widget JSON feed. Widgets can't
  carry a NextAuth session, so it uses a per-user capability token — the
  secret mints on first /waits visit (if_not_exists handles the race),
  lives on the PROFILE row, revocable by deleting the attribute.
  Constant-time digest comparison, uniform 401s, no-store. Deliberate
  documented tradeoff: URL-holder can read ride names + waits (read-only,
  low sensitivity).
- tools/widget/scriptable-waits.js: iOS Scriptable widget rendering the
  feed (plan if active, else favorites; DOWN flagged; weather in header),
  taps through to /waits.
- Weather via the same Open-Meteo endpoint + WDW coords the poller uses;
  5-min fetch cache; page renders fine without it (weather is garnish).

Tests: read-model shaping (glance sort, plan order preserved, dormant/
recorded plans excluded), WMO code buckets (incl. the negative-code
fallthrough the test caught).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@illinigirl illinigirl merged commit 7d8a43a into main Jul 3, 2026
5 checks passed
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