Skip to content

docs(design): backlog +1 — Android app via Swift SDK for Android - #11

Merged
wei18 merged 1 commit into
mainfrom
docs/backlog-android-swift-sdk
May 20, 2026
Merged

wei18 merged 1 commit into
mainfrom
docs/backlog-android-swift-sdk

Conversation

@wei18

@wei18 wei18 commented May 20, 2026

Copy link
Copy Markdown
Owner

User ask 2026-05-20. Add to design.md §不在 v1 範圍 §平台與輸入.

Idea: use swift.org Swift SDK for Android to cross-compile pure-Swift modules into an Android shared library, with Kotlin/Compose UI calling Swift via JNI.

Notes captured:

  • GameCenter / CloudKit don't exist on Android → need Play Games Services + Firestore or own backend.
  • §How.4 deterministic generator is already platform-neutral (FNV-1a + SplitMix64, no Apple framework deps) — same puzzleId reproducible cross-platform.
  • Daily leaderboard needs a neutral backend to merge iOS + Android players.
  • Validation order: (1) confirm swift-android-sdk compiles SudokuEngine, (2) measure JNI boundary cost, (3) decide if SudokuUI is shared (likely no — UI stays idiomatic per platform).

🤖 Generated with Claude Code

Captured user ask 2026-05-20: explore swift.org Swift SDK for Android to
cross-compile pure-Swift modules (SudokuEngine / GameState / PuzzleStore)
into Android shared library, with Kotlin/Compose UI calling via JNI.

GameCenter / CloudKit don't exist on Android — need Play Games Services +
Firestore or own backend. §How.4 deterministic generator already
platform-neutral (FNV-1a + SplitMix64, no Apple framework deps) so same
puzzleId can be reproduced on Android. Daily leaderboard needs neutral
backend to be cross-platform.

Validation steps: confirm swift-android-sdk compiles SudokuEngine, measure
JNI boundary cost, then decide if SudokuUI shares (likely no — UI stays
idiomatic per platform).
@wei18
wei18 merged commit 00e6342 into main May 20, 2026
@wei18
wei18 deleted the docs/backlog-android-swift-sdk branch May 20, 2026 03:51
wei18 added a commit that referenced this pull request May 26, 2026
…tem) (#152)

* docs(skills): fill 4 repo-derived skills + foundations.md update (closes #11 5-of-5)

Closes the "補齊 repo skills/context 缺口" backlog entry from 2026-05-24
reflection. All 5 sub-items now landed:

(a) ✅ subagent-conflict-detection — pre-dispatch grep target file set
    vs in-flight subagent worktrees; prevents parallel-dispatch race
(b) ✅ pr-diff-verification — pre-push `git show --stat HEAD` cross-check
    vs commit message claims; encodes PR #126 incident + worktree-wipe
    lost-commits + push-wrong-ref footguns
(c) ✅ asc-ops-handoff — User-owned vs Leader-orderable vs hybrid
    taxonomy for App Store Connect / TestFlight / Apple Developer ops;
    references canonical docs (v2.5-readiness.md, ASCRegister, etc.)
(d) ✅ monetization-sdk-integration — foundations §9 break-glass
    exception process + isolation contract (single-file protocol seam,
    canImport gating, audit grep regex); encodes AdMob v13 upgrade +
    Production ID swap safety + macOS conditional gating incidents
(e) ✅ memory subdir reorg — already in place since 2026-05-25
    (user/feedback/project/reference dirs)

All 4 new skills live at `.claude/skills/<name>/SKILL.md` per
[[feedback-project-derived-skills-location]] (project-derived skills
are repo-level, not $HOME).

foundations.md §Backlog entry updated with ✅ marks + linked file refs.

Co-Authored-By: Claude Opus 4.7 <[email protected]>

* docs(skills): apply CR #152 nits — fix factual citations + tighten descriptions

Inline-applied from CR review of PR #152:

- pr-diff-verification: drop fabricated PR #126 narrative; replace
  with generic pattern description covering 3 recurring failure modes
- monetization-sdk-integration:
  - fix FakeAdMobBridge path (Tests/AdsAdMobTests/, not MonetizationTesting/)
  - drop wrong PR #149 attribution (it's swiftformat, not the fatalError)
  - clarify Sources/MonetizationTesting/ scaffolding vs test-target fakes
  - tighten description for clearer auto-discovery trigger (CR B+ → A)
- subagent-conflict-detection: §派發契約 §9 → "item 9"
  (methodology uses narrative numbering, not formal §N sub-headings)

No content removed — only factual corrections + 1 description tighten.

Co-Authored-By: Claude Opus 4.7 <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request Jun 4, 2026
…efs #298 #11)

Migrate MinesweeperBoardView's outer .padding() to theme.spacing.medium
(value-identical 16, no snapshot churn) and the new Mac layout to the
spacing scale. The compact VStack(spacing: 12) literal is deferred — it's
the only remaining spacing-scale literal and migrating it churns the
covered-board snapshot baseline (sandbox can't re-record). Grid geometry
constants (minCellSide, cellSpacing, cornerRadius) are tap-target/shape
values, left as literals. Also seals the #298 impl-notes.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
wei18 added a commit that referenced this pull request Jun 4, 2026
* feat(minesweeper): Mac side-rail 2-column board layout (refs #298 #6)

Add a horizontalSizeClass == .regular branch to MinesweeperBoardView so
the Mac/iPad detail pane no longer renders the iPhone vertical stack.
Mirrors Sudoku's BoardView.macLayout: centered + size-capped board (600pt
square) on the left, a 260pt control rail on the right carrying the status
bar + Reveal/Flag toggle (MS has no digit pad). Outer width capped at
900pt and centered.

Compact (iPhone) layout extracted unchanged; spacing literal 12 preserved
verbatim so the recorded covered-board snapshots don't churn. New Mac
layout uses theme.spacing tokens.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* feat(minesweeper): reveal all mines on loss + clearer mine glyph (refs #298 #7 #8)

#7: on a loss, surface every mine, not just the detonated cell. No engine
accessor needed — the actor snapshot already carries the full cells array
with isMine populated once mines are placed, so the renderer paints still-
hidden mines from cell.isMine when status == .lost. Detonated cell keeps
the bold mineHit red; surfaced mines use the soft mine fill. Correctly-
flagged mines keep their flag glyph. The Completion overlay (#292) sits on
top via the outer overlay, so the revealed board shows behind it.

#8 (partial): swap the mine glyph burst.fill -> xmark.octagon.fill for a
clearer hazard read. The covered-vs-revealed contrast raise + raised-tile
bevel are deferred — they churn the covered-board snapshot baseline, which
the sandbox can't re-record (see impl-notes).

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* feat(minesweeper): VoiceOver labels + flag action on board cells (refs #298 #10)

Mirror Sudoku's BoardCellView AX. Each cell collapses into one element with
a "Row R, Column C, <state>" label (1-based, state covers hidden/flagged/
N/empty/mine incl. the lost-mine surfacing), the .isButton trait, and a
named Flag/Unflag accessibilityAction so VoiceOver users can flag without
the long-press / right-click accelerators (which VO can't reach). Flag
action is inert on revealed cells and once the board is terminal.

Threads zero-based row/column into MinesweeperCellButton from the grid.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* refactor(minesweeper): replace TimelineView ticker with .task(id:) loop (refs #298 #9)

The status bar drove its 1 Hz elapsed refresh via a TimelineView whose
nested .task re-fired on every timeline tick (a .task re-fire footgun).
Replace with Sudoku BoardView's pattern: a single .task(id:) on the body
owning a `while !Task.isCancelled { if playing { refresh }; sleep(1) }`
loop, cancelled automatically on disappear, keyed on the VM identity so
Retry restarts it. Status bar is now a plain HStack reading the @observable
snapshot. Non-visible; correctness/perf only.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* refactor(minesweeper): board outer padding via theme spacing token (refs #298 #11)

Migrate MinesweeperBoardView's outer .padding() to theme.spacing.medium
(value-identical 16, no snapshot churn) and the new Mac layout to the
spacing scale. The compact VStack(spacing: 12) literal is deferred — it's
the only remaining spacing-scale literal and migrating it churns the
covered-board snapshot baseline (sandbox can't re-record). Grid geometry
constants (minCellSide, cellSpacing, cornerRadius) are tap-target/shape
values, left as literals. Also seals the #298 impl-notes.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
wei18 added a commit that referenced this pull request Aug 31, 2026
…top dropping payload (#1047)

Add a zero-dependency BoardPreview { columns, rows, cells: [CellMark] }
value type to GameShellKit (per design.md §3.6 ⚠️ 型別約束 — NOT GameAppKit,
see §12 error #11) and give GameAppKit's ResumeCandidate<Route> an optional
boardPreview field referencing it, so the CloudKit payload both apps already
fetch (Sudoku boardState, Minesweeper stateBlob) stops being discarded by the
resume mappers.

- GameShellKit: BoardPreview + game-agnostic CellMark (empty/given/filled/
  marked); failable init degrades malformed shapes to nil, never traps.
- PersistenceKit: SavedGameSummary surfaces boardState (tolerant decode).
- SudokuKit: pure SudokuBoardPreviewMapper (boardState + givenMask from the
  deterministic local puzzle regen — no new CK fetch); wired in Live.swift
  fetchResume; any failure degrades to a text-only pill.
- MinesweeperKit: MinesweeperSavedGameSummary surfaces stateBlob; pure
  MinesweeperBoardPreviewMapper decodes the session snapshot; wired in
  Live.swift fetchResume with the same degrade contract.
- Tests in all four packages incl. malformed/truncated-payload → nil paths;
  doc sync in docs/superpowers/specs/2026-06-10-resume-seam-design.md.

Data availability only — rendering is #1021's job.

Closes #1017
Part of #1014

Co-authored-by: Claude Fable 5 <[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

Development

Successfully merging this pull request may close these issues.

1 participant