Add Android Shipaton shell with RevenueCat cosmetic entitlement - #4
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.12' | ||
| - uses: gradle/actions/setup-gradle@v6 |
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.12' | ||
| - uses: android-actions/setup-android@v4 |
| - uses: android-actions/setup-android@v4 | ||
| with: | ||
| packages: 'platform-tools platforms;android-36 build-tools;36.0.0' | ||
| - uses: gradle/actions/setup-gradle@v6 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0bd1564cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| sacredTablePackage = (packages == null || packages.isEmpty()) | ||
| ? null : packages.get(0); |
There was a problem hiding this comment.
Bind the purchase to the Sacred Table package
When the current offering contains multiple packages, selecting packages.get(0) can charge the user for an unrelated product that does not grant sacred_table; the subsequent entitlement check then leaves the cosmetic locked despite the successful payment. Select a configured package/product identifier (or the intended lifetime package) instead of relying on offering order.
Useful? React with 👍 / 👎.
| + "document.querySelectorAll('.card,.st').forEach(e=>{" | ||
| + "e.style.borderColor='#b99b63';e.style.background='#201522';});" |
There was a problem hiding this comment.
Make the purchased card styling persist across renders
For an entitled user, these inline styles are applied only to the .card and .st elements that exist at this instant, but render/serve.py replaces both hand.innerHTML and board.innerHTML on every 900 ms polling tick. The replacement nodes therefore immediately lose most of the paid skin—and if the first render has not completed yet, they never receive it—so this should use persistent CSS rules or be reapplied after each render.
Useful? React with 👍 / 👎.
| global _SERVER, _THREAD | ||
| if _SERVER is not None: | ||
| return int(port) |
There was a problem hiding this comment.
Allow a completed game to start a new session
After a match reaches its terminal state, exiting and relaunching the Activity while Android keeps the process alive calls this path and reuses the existing _SERVER and completed Table. Since the shell never calls stop_server and exposes no new-game action, the user is returned to the old verdict and must force-stop the app or wait for process death before playing again; provide an explicit reset path while retaining ordinary WebView refresh persistence.
Useful? React with 👍 / 👎.
Purpose
Ship the existing tested POLITICS / Fifty-Three Days engine as an Android app without rewriting game logic, while adding a real RevenueCat purchase surface that does not sell power, rules, or Witness Accounts.
Architecture
engine/andrender/directories directlymobile_bridge.pystarts the current table server on127.0.0.1sacred_tablecosmetic entitlementCompatibility
Configuration boundary
REVENUECAT_API_KEYis injected at build time and is not committed. With no key, the game still builds/runs and the purchase UI states that RevenueCat is unconfigured.RevenueCat dashboard/store work remains external: create the Google Play one-time product as non-consumable, attach it to entitlement
sacred_table, and place it in the current offering.CI
Adds one lean Android assemble job; no emulator matrix and no APK artifact upload yet. Also upgrades repository checkout to
actions/checkout@v6.hmmm — purchase surrounds the table; it does not sit between a witness and the room.