Skip to content

chore(gamecenter): harden the presentGameCenter seam left by #685 #714

Closed

Description

@wei18

Two non-blocking residuals from #685's dual review (2026-07-07):

  1. Latent regression seam (review MAJOR, latent): LiveRouteFactory/SettingsView's presentGameCenter parameter defaults to nil and falls back to the unguarded { GameCenterDashboard.present() } — the exact pre-fix(sudoku): Game Center entry points are dead no-ops when signed out (no dashboard, no sign-in alert) #685 bug shape. Both current call sites inject correctly, but a future third call site (or a Live.swift refactor) could silently regress fix(sudoku): Game Center entry points are dead no-ops when signed out (no dashboard, no sign-in alert) #685 with nothing catching it. Fix: mirror presentLeaderboard's debug assert(... != nil) guard, or remove the default entirely.
  2. Weak test (review MINOR): settingsViewUsesInjectedPresentGameCenterOverDefault (both apps) only asserts construction doesn't invoke the closure — it would stay green even if the parameter were never threaded to SettingsScreen. Rename to match what it tests, or strengthen to actually drive the Button action.

Size S. Shared-code change → test both apps per the binding rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlog

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions