Skip to content

Add Android Shipaton shell with RevenueCat cosmetic entitlement - #4

Merged
erinepshovel-code merged 11 commits into
mainfrom
shipaton-android
Sep 7, 2026
Merged

Add Android Shipaton shell with RevenueCat cosmetic entitlement#4
erinepshovel-code merged 11 commits into
mainfrom
shipaton-android

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Collaborator

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

  • Chaquopy packages the existing engine/ and render/ directories directly
  • mobile_bridge.py starts the current table server on 127.0.0.1
  • native Android WebView renders the same playable table
  • RevenueCat owns only a permanent sacred_table cosmetic entitlement
  • all gameplay remains free; Witness Accounts remain giver-owned/table-bound/unsellable

Compatibility

  • AGP 9.2.1 / Gradle 9.4.1
  • Chaquopy 17.0.0 / Python 3.12
  • compile + target API 36
  • RevenueCat Android SDK 10.15.1
  • arm64-v8a + x86_64

Configuration boundary

REVENUECAT_API_KEY is 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T19:18:46.893634Z b0bd156 PR opened
ℹ️ 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" or "@codex security review".

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +149 to +150
sacredTablePackage = (packages == null || packages.isEmpty())
? null : packages.get(0);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +232 to +233
+ "document.querySelectorAll('.card,.st').forEach(e=>{"
+ "e.style.borderColor='#b99b63';e.style.background='#201522';});"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +16 to +18
global _SERVER, _THREAD
if _SERVER is not None:
return int(port)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@erinepshovel-code
erinepshovel-code merged commit 53ad9f4 into main Sep 7, 2026
5 checks passed
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.

2 participants