Skip to content

fix(settings): bundle version in Sudoku settings + silence IAP cancel toast - #646

Merged
wei18 merged 1 commit into
mainfrom
fix/settings-version-iap-toast
Jun 29, 2026
Merged

wei18 merged 1 commit into
mainfrom
fix/settings-version-iap-toast

Conversation

@wei18

@wei18 wei18 commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Fixes two bugs found in the interactive simulator UX audit (2026-06-29).

#644 — Sudoku Settings showed hardcoded "1.0.0"

SudokuAppComposition/LiveRouteFactory.swift .settings case now reads CFBundleShortVersionString from Bundle.main and passes it as appVersion: to SettingsViewModel, matching Minesweeper's LiveRouteFactory exactly (same ?? "1.0.0" fallback). Verified live: Sudoku Settings now shows the real bundle version instead of the unused default.

#645 — raw "userCancelled" error string leaked as a toast

Both catch blocks in MonetizationUI/MonetizationStateController.swift (purchaseRemoveAds + restorePurchases) previously surfaced String(describing: error) directly to the user — dismissing the App Store sign-in sheet produced a "userCancelled" failure toast on Home. Now:

  • StoreKitError.userCancelled is treated as a silent no-op (mirrors the existing in-band .userCancelled return-value handling).
  • Genuine errors show a generic localized-style message — "Purchase failed" (purchase path) / "Restore failed" (restore path) — never the raw enum.

Verification

  • swift test --package-path Packages/SudokuKit — 260 tests pass
  • swift test --package-path Packages/AppMonetizationKit — 114 tests pass
  • swiftlint --strict on both changed files — 0 violations

Closes #644
Closes #645

🤖 Generated with Claude Code

…ncel toast

Bug 1 (#644): LiveRouteFactory now passes `appVersion:` from
`CFBundleShortVersionString` into `SettingsViewModel`, matching the
Minesweeper pattern exactly. The hardcoded "1.0.0" default is no
longer used at runtime.

Bug 2 (#645): both catch blocks in `MonetizationStateController`
(`purchaseRemoveAds` + `restorePurchases`) now detect
`StoreKitError.userCancelled` and treat it as a silent no-op,
mirroring the in-band `.userCancelled` return-value handling.
Genuine errors show a generic "Purchase failed" message instead of
leaking `String(describing: error)` (which surfaced raw enum names
like "userCancelled" when the App Store sign-in sheet was dismissed).
`internal import StoreKit` added to MonetizationUI — StoreKit is
already in the AppMonetizationKit seam; MonetizationUI previously
omitted it only by convention.

Closes #644
Closes #645

Co-Authored-By: Claude <[email protected]>
@wei18
wei18 merged commit d2e91ac into main Jun 29, 2026
4 checks passed
@wei18
wei18 deleted the fix/settings-version-iap-toast branch June 29, 2026 13:55
wei18 added a commit that referenced this pull request Jun 29, 2026
39-screenshot idb audit of Sudoku + Minesweeper v2.6.0 with 3 parallel design/a11y reviewers. Filed #644/#645/#647/#648/#649/#650/#652; shipped #646 (version + IAP toast) and #651 (accent-blue leaks). Records two Leader-caught false positives (completion-Close debug artifact; #648 iOS-26 cancel render) and the verified non-bugs (raw-seconds idiom, per-game theming, GC-entitlement no-op).

Co-Authored-By: Claude <[email protected]>
wei18 added a commit that referenced this pull request Jun 29, 2026
39-screenshot idb audit of Sudoku + Minesweeper v2.6.0 with 3 parallel design/a11y reviewers. Filed #644/#645/#647/#648/#649/#650/#652; shipped #646 (version + IAP toast) and #651 (accent-blue leaks). Records two Leader-caught false positives (completion-Close debug artifact; #648 iOS-26 cancel render) and the verified non-bugs (raw-seconds idiom, per-game theming, GC-entitlement no-op).

Co-authored-by: Claude <[email protected]>
wei18 added a commit that referenced this pull request Jun 30, 2026
Extends the 2026-06-29 sim-audit log with the follow-on fixes (#646/#651/#654/#655), the Play Again arc, and four Leader-caught agent defects (Daily fork, placeholder L10n, catalog-reformat bleed, compile error masked by an incremental build).

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant