Repository navigation
docs: make the website's Try it a replica of the whole watch app - #140
Conversation
The browser demo was only the scoreboard. It is now the full watch app inside the watch frame: Health prompt, home screen (Start/Resume, remembered setup, tracking strip), Match Setup, Settings (themes, Pulse Coach, birth year), Guide, warm-up / who serves / court side, the live match (court view, heart-rate and compass badges, ends-switch reminder, completion panel), Past Matches with detail / resume / End at Current Score, and the animated guide on the real scoring engine. Heart rate, calories, steps and the compass heading are invented; nothing is stored. Layout was matched against the running watch app in the watchOS simulator (accessibility geometry plus pixel overlays) on a 184 x 224 pt screen with the point unit scaled from the screen width. Track point outcome is off by default, as on the watch; scoring is swipe-only. No Swift changes. The compact setup-guide watch is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 224d8dc23b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| swipe = { x: e.clientX, y: e.clientY, id: e.pointerId }; | ||
| try { el.screen.setPointerCapture(e.pointerId); } catch (err) {} |
There was a problem hiding this comment.
Preserve scoreboard clicks when capturing swipe pointers
With point tracking enabled, double-clicking or double-tapping the scoreboard cannot mark a second serve: every pointer-down immediately captures the pointer on el.screen, redirecting the subsequent pointer-up and click to the screen instead of the card. The double-tap detector is attached only to el.card, so it never receives these clicks. Delay capture until a drag is detected, or handle double-taps on the capturing element while preserving the scoreboard hit test.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in the latest commit and checked in a browser: pointer capture now starts only after an 8 px drag, so a real double-click on the scoreboard toggles the 2nd-serve badge.
| var swipeScale = function () { var r = el.screen.getBoundingClientRect(); return 268 / Math.max(r.width, 1); }; | ||
| el.screen.addEventListener("pointerdown", function (e) { | ||
| if (e.pointerType === "mouse" && e.button !== 0) return; | ||
| if (scoringBlocked()) { swipe = null; return; } |
There was a problem hiding this comment.
Allow the stats swipe after match completion
After a tracked match finishes, the new completion panel tells the user to “Swipe for Stats,” but scoringBlocked() includes isMatchComplete(state), so this handler rejects every pointer-down before a right swipe can begin; the pointer-up handler repeats the same restriction. Consequently, the advertised gesture does nothing, although the external Stats button and keyboard shortcut still work. Gate score-changing actions on completion separately so users can open the final stats from inside the watch face.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in the latest commit and checked in a browser: the swipe handlers now allow the stats gesture once the match is complete (scoring stays blocked), so the right swipe opens final stats.
- Capture the pointer only once a drag starts, so double-clicking or double-tapping the scoreboard still reaches the card and marks a 2nd serve. - Let the right swipe open stats after the match ends (the completion panel advertises it); scoring stays blocked. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e window, Health on - Live/final stats overlay scrolls as one page like the watch's MatchStatsView (touch, wheel, mouse drag, arrow/PgUp/PgDn); stays hidden when closed. - Open-book Guide icon; footer 🔥/🕐 and post-point sheet/pill geometry matched to the Apple Watch SE 3 simulator. - Double-click window for the 2nd-serve gesture widened 350 -> 450 ms so a slower mouse double-click still sets it (and offers Double Fault). - Demo starts with Health authorised and skips the launch Health Access sheet. - Handoff doc: replica-vs-Core replay (6 matches, 0 diffs) and watch-vs-replica stats pages (Quick 4 / Best of 3 / Super Tiebreak) identical row for row. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
What
The website's "Try it" (
docs/website/try.html) was just the watch scoreboard. It is now a browser replica of the whole Apple Watch app, running inside the watch frame:Heart rate, calories, steps and the compass heading are invented; nothing is stored, and a reload resets the watch. Starter history is generated by playing seeded matches through the scoring engine.
Faithful quirks kept on purpose: Track point outcome is off by default, scoring is swipe-only (no tap zones), the guide is unavailable mid-match.
How it was checked
opacityworkaround in a scratch copy only; the repo is untouched) and drove it with a UI test to capture real screens.Known gaps (follow-ups)
No Swift changes. The compact setup-guide watch (
setup.html) is unchanged.docs/features/INTERACTIVE_DEMO_PARITY_PLAN.mdhas a new Phase 7 section andCLAUDE.mda short pointer.🤖 Generated with Claude Code