feat: /waits glance page + phone-widget feed + live weather#12
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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