Advertisement

← poker-tutor

docs/FOR-ANDROID-SESSION.md

6.0 KB Download file
# For the Android (Skip) session — what is changing on main, 2026-09-11

Written by the iPhone/Mac session. Both apps (`~/poker-tutor`, `~/plo-tutor`) share this note.
The Android app is built with Skip from the SAME Swift in `Sources/PokerUI` and below, so none
of the changes below need porting by hand: they arrive in `Android/` the next time you rebuild
from main. What you DO need to do is (1) pull main before building, (2) rebuild, and (3) check
that each new piece of UI renders under Skip — Skip supports a subset of SwiftUI, and the items
marked ⚠️ use things that have not been through Skip before.

## Landing on main today (both repos; each is one commit, look for these messages)

1. **The player's cards are their own row under the felt** (already on main: PLO `193e711`,
   hold'em `526fb20`). `HeroRow` in `TableView.swift`; the player is no longer on the seat ring;
   `SeatView` split into `SeatBox` + `SeatAction`. ⚠️ Check the row lays out and that nothing draws
   the hero twice. All sizes are in `Metrics` (`heroCard`, `heroRowWidth`, `heroCardFrames`).
2. **Rating fixes** (in flight, commit message starts "The rating can no longer be dragged to
   zero…" or similar):
   - `LeakProfile.leakPenalty` is capped in total; `SkillRating` anchors re-derived with the
     penalty included; ladder rungs may move. Pure logic, no UI risk.
   - Home "Your rating" card gains a line "Your mistakes cost about N big blinds for every 100
     hands"; a 0 reads "Beginner — the bottom of the scale".
   - Home assessment card copy: "Your starting rating from those 40 hands: 54 — Solid amateur…
     This card does not change; the rating card follows every hand since."
   - Home "N hands saved" panel: "271 hands saved — 199 played, 72 practice"; rating card:
     "199 hands watched (practice hands are left out)".
   - The report sheet that opens automatically at the end of an assessment is titled "Your 40
     hands are done — here is where your game is now".
   - ⚠️ `PillButton` secondary style (`tint: Theme.panelRaised`) becomes legible: readable text +
     a visible border. Check `.overlay`/`.stroke` render under Skip.
3. **Dealer button + blind markers on the felt** (queued right after 2): a white disc marked "D"
   in front of the button seat, small "SB"/"BB" markers in front of the blinds, positioned off the
   `FeltRing` geometry in `TableView.swift`, sizes in `Metrics`. ⚠️ New `Circle` overlays with
   text; check z-order over the felt and that they move when the button moves each hand.

## What has NOT changed and must stay identical on Android
- The store identity: display name, bundle/application id, StoreKit product id (Android has its
  own billing; keep the same 300-free-hands rule from `PokerSession/Subscription.swift`).
- History file format (`hands.jsonl`, strings and numbers only) — Android must write the same
  format if it persists hands, so a file is readable by every version.
- Every user-visible string lives in `PokerUI/Copy.swift`, `Glossary.swift`, `Basics.swift`,
  `Tutorial.swift` or the coach; do not add Kotlin-side strings — the tests sweep the Swift
  corpus for jargon and banned phrasing and cannot see Kotlin.

## Coordination
- The iPhone session's helpers commit to main in both repos and stage only the files they
  touch. Please do the same: `git add <paths>`, never `git add -A`, never reset/stash the tree.
- Run the suite (`./.build/release/pokerlab test`) before committing anything that touches
  `Sources/`; Skip-only work under `Android/` needs no suite run.
- Tell the iPhone session (through Ken) if Skip cannot render something listed above; the fix
  goes into the Swift, not into a Kotlin patch.

## Added 2026-09-11 evening: two products per repo

Each repo now builds TWO apps from one codebase via `PokerSession.AppVariant` (docs/SPLIT-PLAN.md):
the tournament app (unchanged identity) and a CASH app — `PokerTutorCash` /
`com.thedigitaladlab.pokertutor.cash` here, `PLOTutorCash` / `com.thedigitaladlab.plotutor.cash`
in plo-tutor. The iOS shells are `App/<Name>CashPhone/PhoneApp.swift` (they just pass
`AppVariant.…Cash` to `AppState(variant:)`); the Mac ones are `Sources/<Name>CashApp`. Android
needs a second Skip product per repo that does the same: different application id, launcher
icon (`App/app-icon-cash-1024.png`), display name, and its own data folder — the variant
already picks the history folder and preference prefix, so only the shell differs. ⚠️ New UI to
check under Skip: the cash setup panel on Home (`CashViews.swift`), the fixed-limit action bar
(no chip tray; "Bet 100"/"Raise to 200"/"Capped" — hold'em only), the "Limit:" header readout.

## Added 2026-09-12: cash coaching (phases 2–4) in this repo

Pure logic, nothing new to render: `CoachFormat` (`tournament` / `cash` / `limit`) chosen by the
session from the product and the cash setup's structure; `LeakCatalogue.all(for:)`,
`SkillRating.line(for:)`, `AssessmentPlanner.setups(for:)`, `LadderTier.all(for:)` (the cash
ladder is a ladder of STAKES), `Basics.lessons(for:)`, `Copy.tutorial(for:)`. UI that changed
and is worth a look under Skip: the ladder card and Ladder screen at a cash table show a win-rate
line ("You play 50/100. Win rate there: +8 for every 100 hands…"); the cash setup panel shows the
rung line; the review sheet's copy for the cash and limit verdicts is text only.
Screenshots: `Scripts/make-screenshots.sh tournament|cash` cuts all eight per product unattended
(`POKERTUTOR_DEMO=table|review` stages the two played scenes from a fixed seed on an in-memory
history — `Sources/PokerUI/Demo.swift`). The Android store shots will need the same two scenes
staged on the emulator; the env var and the scene code are shared, only the launch differs.
Listings: `App/AppStore/listing.md` (tournament) and `listing-cash.md` (cash) hold every store
field; the Google Play text should say the same things.