Repository navigation
[Web] iPhone browser demo replica, native-faithful live scoreboard and page layout - #143
Conversation
…d page layout Adds the iPhone companion replica to the try page (archive, detail/graph with drag-select zoom, trends, settings, manual entry, live scoreboard) and rebuilds the page as two numbered Watch / iPhone panels that fit on a phone. Why: the demo should look and behave like the native apps, and say plainly that it is a best-effort replica. - Live scoreboard mirrors LiveScoreboardView; rotation only on that screen, driven by real device orientation on touch devices. - Settings About / Watch Sync / Backup rows match the native grouped list; manual entry stays on the Matches toolbar only (as in the app). - Storage Info mirrors MatchDetailView.storageInfoRow. - Fix: stopped-early seeded matches no longer show a false Draw. - Watch demo: left/right arrow keys undo / open stats. - "About this demo" best-effort disclosure moved below the demos. - Browser QA scripts updated for the new structure. 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: 5e88ba6c71
ℹ️ 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".
| if (!matchID || !api.hooks.phoneMatchID || matchID !== api.hooks.phoneMatchID()) return; | ||
| if (command === "point" && (value === "me" || value === "opponent")) award(value, true); | ||
| else if (command === "undo") { if (pendingStat) undoPoint(); else undo(true); } | ||
| else if (command === "secondServe") toggleSecondServe(); |
There was a problem hiding this comment.
Allow remote second-serve commands outside the Watch scoreboard
When a tracked match is active but the Watch simulator is showing its home screen or stats, iPhone point and undo commands still work, but double-tapping the iPhone scoreboard silently fails to mark a second serve. This command calls toggleSecondServe(), whose canToggleSecondServe() guard rejects shellOpen() and statsOpen, unlike the remote-aware point and undo paths. Consequently, subsequent iPhone-scored points are recorded as first serves and produce incorrect serve statistics. Give the second-serve command a remote-aware guard while retaining the pending-point and match-completion checks.
Useful? React with 👍 / 👎.
| function addRecord(rec) { | ||
| tombstones.delete(rec.id); watchOnlyIDs.delete(rec.id); upsert(rec); if (connection.paired) S.upsertRecord(copy(rec)); persist(); S.render(); render(); | ||
| } | ||
| function replaceRecords(records) { archive = sortRecords(copy(records)); persist(); render(); } |
There was a problem hiding this comment.
Clear imported match IDs from deletion tombstones
If a user exports an in-progress demo match, permanently deletes it, and then imports that backup through Merge or Replace Archive, this function restores the record but leaves its ID in tombstones. The restored match appears in the archive, yet upsert() silently rejects every later Watch update for that ID; copying it back to the Watch and resuming scoring therefore leaves the iPhone copy permanently stale. Remove explicitly imported IDs from the tombstones when applying the import, as addRecord() already does for an explicitly added record.
Useful? React with 👍 / 👎.
So the two device panels read as a pair; decorative only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- iPhone second-serve command is no longer dropped while the Watch shows its home or stats screen (remote-aware guard, like scoringBlocked). - Importing (Merge/Replace) clears deletion tombstones for the restored IDs so later Watch updates are not rejected. - State QA gains a regression test for each; both fail without the fix. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Addressed both Codex findings in 2b0a495:
Added a regression test for each in |
Summary
docs/website/try.html(archive, match detail + points graph, trends, settings, manual entry, live scoreboard) alongside the Watch replica.LiveScoreboardView; rotation is only available there (the native app is portrait-locked elsewhere) and follows real device orientation on touch devices.Test plan
iphone-demo-model-qa,iphone-demo-coaching-qa,sync-iphone-demo-exports --checkiphone-demo-qa,-state-qa,-extended-qa,-export-qa,-popup-qa,-visual-qaall passHomeView.swiftbackground modifier,DeuceMateUITests,NativeDemoParity*Tests) were not built or run hereNotes
🤖 Generated with Claude Code