Repository navigation
feat(minesweeper): wire liveadmobadprovider + boardview banner + toast overlay (u15) - #263
Merged
Merged
Conversation
…t overlay (U15) Closes the MS monetization mirror loop. With #259 wiring the composition stack and this PR wiring the AdMob bridge + banner UI + toast surface, MS now has full monetization parity with Sudoku modulo the production-ID swap (gated to v1 release per Sudoku precedent). Code: - `MinesweeperAppComposition.live()`: * #if os(iOS): LiveAdMobAdProvider(bannerAdUnitID:) wired - DEBUG: Google universal test banner unit - RELEASE: fatalError("REPLACE_IN_MS_V1: ...") gate, mirrors Sudoku's REPLACE_IN_v2.5.3 safety pattern (production Release builds crash at composition root until the real banner unit id is explicitly wired per v1 release checklist) * #if os(macOS): NoopAdProvider unchanged (AdMob SDK iOS-only) - LiveRouteFactory threads adProvider + adGate through to MinesweeperBoardView (suppressed on .won / .lost terminal states) - MinesweeperBoardView mounts new MinesweeperBannerSlotView below the grid (mirror of Sudoku's BannerSlotView placement) - MinesweeperRoot.init takes toastController; body attaches .toastOverlay(controller: toastController, successTint:, failureTint:) - MinesweeperAppComposition.rootView passes toastController through - MinesweeperBannerSlotView (NEW): mirrors Sudoku's BannerSlotView using AdProvider protocol (no GoogleMobileAds direct import). Sudoku's slot couples to SudokuUI theme env so a clean shared extraction is deferred to a future MonetizationUI consolidation (impl-notes D1). Info.plist: - `GADApplicationIdentifier` = Google universal test App ID `ca-app-pub-3940256099942544~1458002511` (mirrors Sudoku convention — defer production App ID swap to v1 release per project memory `admob-production-ids` / `minesweeper-admob-ids`) - `NSUserTrackingUsageDescription` added (ATT prompt copy) AdMob SDK isolation audit: `rg '^.*import GoogleMobileAds' Packages/` returns exactly 1 hit (LiveAdMobBridge.swift). Contract preserved per skill `admob-isolation-audit`. Sudoku byte-identicality: zero changes under Sudoku/ or SudokuKit/ or AppMonetizationKit/. All 10 edits scoped to Minesweeper/ + MinesweeperKit/ + meetings/. Tests: - MinesweeperKit: 30/30 pass (incl. new liveAdProviderIsLiveOnIOSNoopOnMac) - SudokuKit: 209 root + board tests unchanged green Code Reviewer round 1 verdict NEEDS_WORK on 2 critical: - C1 Info.plist production App ID (Leader pre-fixed to test App ID before CR; CR saw stale state). Verified test ID now in plist. - C2 Live.swift hardcoded production banner unit ID (Release builds would silently serve real creatives). Applied Sudoku's fatalError gate inline; Release build now crashes until v1 release checklist wires the real id. Cosmetic stale docstrings updated inline. Remaining CR Important findings (optional adProvider/adGate/toastController in LiveRouteFactory + MinesweeperRoot) accepted as Karpathy-minimal since the #Preview path is the sole rationale. Follow-up backlog items already filed: - #260 toast overlay (this PR addresses it for MS Root) - #261 FakePersistence for MS Preview - #262 hardened MS productId test Refs: - meetings/2026-06-02_minesweeper-monetization-wire-proposal.md (full proposal) - meetings/2026-06-03_ms-admob-wire-u15.impl-notes.md (this round's notes) - project memory `minesweeper-admob-ids` (production IDs, held until ship) - closes MS monetization mirror loop modulo production-ID swap Co-Authored-By: Claude Opus 4.7 <[email protected]>
…limit Co-Authored-By: Claude Opus 4.7 <[email protected]>
wei18
added a commit
that referenced
this pull request
Jun 3, 2026
PR #263's Info.plist comment block hardcoded the MS production App ID as a string literal inside the explanatory comment. Even though the actual GADApplicationIdentifier value uses Google's universal test ID, the production ID leaked into git history via the comment. Violates project-memory convention (`minesweeper-admob-ids`) of holding production AdMob IDs OUT of the public repo until v1 ships — Sudoku Info.plist's comment makes no reference to its own production id. Scrubbed; comment now just points readers at the memory file by name. No behavior change — Info.plist value field unchanged. Co-Authored-By: Claude Opus 4.7 <[email protected]>
wei18
added a commit
that referenced
this pull request
Jun 3, 2026
…nt (#264) PR #263's Info.plist comment block hardcoded the MS production App ID as a string literal inside the explanatory comment. Even though the actual GADApplicationIdentifier value uses Google's universal test ID, the production ID leaked into git history via the comment. Violates project-memory convention (`minesweeper-admob-ids`) of holding production AdMob IDs OUT of the public repo until v1 ships — Sudoku Info.plist's comment makes no reference to its own production id. Scrubbed; comment now just points readers at the memory file by name. No behavior change — Info.plist value field unchanged. Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18
added a commit
that referenced
this pull request
Jun 3, 2026
…et injection Captures 5 PRs merged today (#256 grace inversion / #257 .minesweeper CK config / #258 multi-app IAP / #259 MS AppComposition wire / #263 U15 LiveAdMobAdProvider + banner + toast / #264 prod-ID comment scrub / #265 AdMob secret injection PR1) plus 5 issues filed for follow-up (#260 #261 #262 #266 #267). Records decisions, rejected alternatives, Architect review hand-off, and the spec inversion (7-day grace removed). Notes Iron Law violation on skill writing + remediation via post-hoc CR. Co-Authored-By: Claude Opus 4.7 <[email protected]>
wei18
added a commit
that referenced
this pull request
Jun 3, 2026
) (#270) The toastOverlay wire described by #260 already landed in PR #263 (U15): `composition.rootView` constructs `MinesweeperRoot(routeFactory:, toastController:)` and the Root attaches `.toastOverlay(...)`. Two comments still said the wire was "pending U15" / "U15 follow-up" — corrected to reflect the shipped state. Co-authored-by: Claude Opus 4.8 <[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
Closes U15 — Minesweeper monetization mirror complete modulo production-ID swap (deferred to v1 release per Sudoku precedent).
What landed
CR ACCEPT (round 2 inline)
Round 1 NEEDS_WORK on 2 critical:
Stale docstrings updated. Remaining Important findings accepted as Karpathy-minimal (preview path rationale).
AdMob SDK isolation
```
$ rg '^.*import GoogleMobileAds' Packages/
Packages/AppMonetizationKit/Sources/AdsAdMob/LiveAdMobBridge.swift:internal import GoogleMobileAds
```
Exactly 1 hit ✓
Test plan
Refs