Repository navigation
fix(gamecenter): revert to native Game Center dashboard, drop dead Daily Rank stub - #1009
Merged
Merged
Conversation
…of the native-GC revert) Checkpoint commit — production code, routes and tests only. The screenshot pipeline and review-note updates land in the follow-up commit on this branch. Home's Leaderboard card goes back to presenting Apple's native Game Center dashboard as a side-effect, reverting the UI direction of #989. Root cause this removes: `LiveGameCenterClient.friendsAuthorizationStatus()` was hardcoded to `.notDetermined` and `requestFriendsAuthorization()` hardcoded to `throw .friendsAccessDenied` — never implemented against GameKit. The ViewModel called the latter behind `try?`, swallowing the throw and re-rendering the identical screen, so the "Allow Friends Access" button did nothing for every user, always. Every test injected a fake client, so the logic tested green while the only production conformer was inert. The old path was dormant, not deleted: `presentLeaderboard: { GameCenterDashboard.present() }` was still wired in both apps and unreachable only because every mode carried a `route`. Dropping `route: .dailyRank` restores it, so this is a revert rather than a rewrite. Removed: GameAppKit's DailyRank view/view-model/models/state-views, Minesweeper's `LiveRouteFactory+DailyRank`, the `dailyRank` route case in both apps, and the 28 committed DailyRankViewTests snapshot baselines. `HomeMode.trailingSymbolName` returns to the pre-#989 shape (`arrow.up.forward` for Leaderboard, chevron for the rest, as at 439ee8d). Home view-model tests were rewritten rather than deleted: the authenticated/unauthenticated/unknown/restricted matrix is preserved, with the expected outcome flipped from "pushes .dailyRank" back to "fires the presentLeaderboard side-effect". The subtitle stays "Global / friends" — it predates #983 and accurately describes Apple's dashboard, which carries a global/friends toggle. Deliberately NOT in scope: `fetchLeaderboardSlice`, `friendsAuthorizationStatus`, `requestFriendsAuthorization`, `LeaderboardSliceService` and `LeaderboardScope.friendsAllTime` remain. Removing them is a protocol-shape change across 7+ conformers and lands separately. part of #983 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…e copy (part 2 of the native-GC revert) Follow-up to c297d11 (part 1, production code): the app-owned Daily Rank screen it removed also fed a store-screenshot slot and two ASC review-note sections that no longer describe anything the app does. Screenshot pipeline (scripts/build-ascspec-screenshots.py): - Delete the six 02b-rank Slot() rows (iphone-6.9/ipad-13/mac × sudoku/ minesweeper), the two per-app COPY caption dicts, the IOS_GAP_TRIM/ MAC_GAP_TRIM entries and their now-orphaned rationale comments, and 02b-rank's membership in the crop_all_sides set. - Delete all 42 committed docs/app-store/screenshots-ascspec/**/02b-rank.png baselines. - Re-record the 8 Sudoku HomeViewTests + 6 Minesweeper MinesweeperHomeSnapshotTests baselines: c297d11's HomeMode.trailingSymbolName revert (arrow.up.forward for Leaderboard, chevron for everything else) changes every Home render, so all 14 baselines that include the Leaderboard row were stale against `swift test` until re-recorded here. - Regenerate all 168 ASC screenshot slots from the refreshed baselines; 42 of the 168 `01-home.png` outputs changed pixels (the Leaderboard row's trailing glyph). `mise-tasks/scan/store_frame_drift` passes clean. Docs: - screenshot-strategy.md: remove the "Daily Rank slot — 02b-rank" section. - Both v2.6 review-information.md files: rewrite "WHAT MAKES THIS APP DIFFERENT" and "GAME CENTER" to describe what the app actually does now — the Home Leaderboard card opens Apple's native Game Center dashboard (GKAccessPoint / GKGameCenterViewController) — instead of the removed app-owned Daily Rank screen (World/Friends toggle, "Your Rank" row, "Allow Friends Access" state). Both stay well under the 4000-char ASC cap (Sudoku 3068, Minesweeper 3528). Deliberately NOT in scope (per c297d11): fetchLeaderboardSlice, friendsAuthorizationStatus, requestFriendsAuthorization, LeaderboardSliceService, LeaderboardScope.friendsAllTime. part of #983 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Review finding on this branch. `GameAppKitTests` depended on the `GameCenterTesting` product solely for `DailyRankViewModelTests` and `GatedLeaderboardGameCenter`, both deleted by the Daily Rank removal. Zero files in the target reference `FakeGameCenterClient` or `GameCenterTesting` any more. The comment was the sharper problem: it still read "FakeGameCenterClient — the same fake seam SudokuUITests / MinesweeperUITests use", which describes those other targets accurately but is false for this one, so it read as a justified dependency. It had already misled one reader into reporting the dependency as still needed. `GameCenterClient` (the protocol) stays — GameRootViewModelTests, GameRootViewModelLeaveTests, TerminalPersistJoinTests and UITestSignedOutGameCenterClientTests all declare inline test doubles against it. The replacement comment says which files need it and why the Testing product went away, so the next reader does not have to re-derive it. Verified: swift test --package-path Packages/GameAppKit -> 58/58 passed. part of #983 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…record Review finding on this branch. The `## Daily Rank slot — 02b-rank` section was removed cleanly, but the following section — the record of the #997 portrait panel-fill pass — still named `02b-rank` twice as a live `crop_all_sides` member, which it no longer is (membership is now `{"04-completion"}`). Rewriting those two lines to omit the slot would have falsified the record: `02b-rank` genuinely was in that set when the pass ran, and the measurements quoted are the measurements that were taken. So they are annotated rather than edited — the history stays true and the reader learns the slot is gone, which is how the generator's own `IOS_GAP_TRIM` comment handles the same situation. part of #983 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
wei18
added a commit
that referenced
this pull request
Aug 13, 2026
(#1011) * chore(gamecenter): remove the dead leaderboard-slice chain left by #1009 #1009 removed the app-owned Daily Rank screen but deferred removing the protocol members it orphaned. `fetchLeaderboardSlice`, `friendsAuthorizationStatus`, and `requestFriendsAuthorization` had zero production callers, and the always-throwing `requestFriendsAuthorization` live stub was exactly the failure shape behind the shipped dead-button bug. Removes the whole chain: 6 whole-file deletions (Leaderboard/Slice.swift, GKLeaderboardLoader.swift, FakeLeaderboardLoader.swift, and their three test files) plus partial edits across the protocol, LiveGameCenterClient, FakeGameCenterClient, UITestFakeSeams, both Sudoku NearWin modifiers, three GameAppKit inline test fakes, and ProtocolShapeTests. Annotates the four docs mentions as removed without rewriting their historical narrative. `LeaderboardKind`, `LeaderboardIDs`, `PlayerSummary`, `GameCenterSink`, and `SudokuLeaderboardRouting` (the submitScore path) are untouched. MinesweeperKit needed no symmetric change (it shares `FakeGameCenterClient` and had zero direct references to the removed chain). part of #983 closes #1010 Co-Authored-By: Claude <[email protected]> * docs(designs): align 06-completion purpose/states with the removed slice chain Review finding (MINOR) on #1011: the Triggers line was annotated as removed but the adjacent Purpose line and slice-driven States entries in the same section still read as live. Annotate them in the same strikethrough style. Part of #1010. Co-Authored-By: Claude <[email protected]> * docs(designs): close the #468 open-question wording in 06-completion AS-BUILT NOTE Acceptance-pass observation on #1011: the 2026-07-05 AS-BUILT NOTE still implied the slice logic exists but is hidden. Annotate it as resolved by the full chain removal. Part of #1010. Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
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.
Summary
Reverts the app-owned Daily Rank screen (#989) back to Apple's native Game
Center dashboard, in two commits.
Root cause.
LiveGameCenterClient.friendsAuthorizationStatus()washardcoded to
.notDeterminedandrequestFriendsAuthorization()hardcodedto
throw .friendsAccessDenied— never implemented against GameKit. TheViewModel called the latter behind
try?, swallowing the throw andre-rendering the identical screen, so the "Allow Friends Access" button did
nothing for every user, always. Every test injected a fake client, so the
logic tested green while the only production conformer was inert.
c297d11 — production code, routes, tests. Home's Leaderboard card goes
back to presenting Apple's native Game Center dashboard as a side-effect
(
presentLeaderboard: { GameCenterDashboard.present() }was dormant, notdeleted — dropping
route: .dailyRankrestores it, so this is a revert, nota rewrite). Removes GameAppKit's DailyRank view/view-model/models/state-views,
Minesweeper's
LiveRouteFactory+DailyRank, thedailyRankroute case inboth apps, and the 28 committed DailyRankViewTests snapshot baselines.
HomeMode.trailingSymbolNamereturns to the pre-#989 shape (arrow.up.forwardfor Leaderboard, chevron for everything else, as at 439ee8d).
9cbd78e — screenshot pipeline + docs (this follow-up).
scripts/build-ascspec-screenshots.py: delete the six 02b-rankSlot()rows, the two per-app COPY caption dicts, the
IOS_GAP_TRIM/MAC_GAP_TRIMentries + orphaned rationale, and 02b-rank's membership in
crop_all_sides.docs/app-store/screenshots-ascspec/**/02b-rank.pngbaselines.
HomeViewTests+ 6 MinesweeperMinesweeperHomeSnapshotTestsbaselines — thetrailingSymbolNamerevertchanges every Home render that includes the Leaderboard row.
01-home.pngoutputs changed(the Leaderboard row's glyph).
mise-tasks/scan/store_frame_driftpasses.screenshot-strategy.md: remove the "Daily Rank slot — 02b-rank" section.*-v2.6-review-information.mdfiles: rewrite "WHAT MAKES THIS APPDIFFERENT" and "GAME CENTER" to describe the native-dashboard behavior
instead of the removed app-owned screen. Both stay under the 4000-char ASC
cap (Sudoku 3068 chars, Minesweeper 3528 chars).
Deliberately not in scope (separate follow-up — protocol-shape change
across 7+ conformers):
fetchLeaderboardSlice,friendsAuthorizationStatus,requestFriendsAuthorization,LeaderboardSliceService,LeaderboardScope.friendsAllTime.part of #983
Test plan
swift test --package-path Packages/GameAppKit— 58/58 passedswift test --package-path Packages/GameShellKit— 32/32 passedswift test --package-path Packages/SudokuKit --filter "HomeViewTests|HomeViewModelInteractionTests|RouteFactoryTests"— 30/30 passedswift test --package-path Packages/MinesweeperKit --filter "MinesweeperHomeSnapshotTests|MinesweeperHomeViewModelTests|LiveRouteFactoryTests" --no-parallel— 30/30 passedmise-tasks/scan/store_frame_drift— PASS, no drift01-home.pngfor Sudoku iPhone-6.9enandMinesweeper Mac
ja— Leaderboard row shows the outward-jump arrow,every other row keeps the chevron
🤖 Generated with Claude Code