Bring the mobile client to parity with the web app - #77
Merged
Conversation
🧪 Coverage
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mobuild4u
marked this pull request as ready for review
August 16, 2026 21:42
aichannode
approved these changes
Aug 16, 2026
aichannode
left a comment
Collaborator
There was a problem hiding this comment.
Good job! Thank you 👍
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.
What this does
On
main,mobile/is a wallet shell: connect a wallet, switch an EVM network, see a list ofpets, mint one. Thirteen of the game's screens have no mobile equivalent, and the package has
one test file.
This branch brings it to parity with the web client. Every action a player can take in
frontend/is now available on device, on both chains, against the same backend.Screens added
Gallery,LevelUp,Train,Rename,Equip,InventoryBattle,Breed,Defense,LeaderboardMarriage,ChatLandingSupporting parts:
ActionScreenLayout,ScreenActionBar,BattleScene,BattleStage,BattleSplash,SpeechBubble,MarriageCard.How it is put together
Controller hooks where there is a state machine, direct composition where there is not.
This follows the rule in
CLAUDE.md, applied with the same test the frontend panels use: doesthe player sit and watch intermediate states?
useBattlePanel,useBreedPanel,useMarriagePanel,useLeaderboardPanel,useChatPanelandusePetGalleryare headless andtheir screens hold no state of their own.
LevelUp,Train,RenameandDefensecomposethe shared hooks directly, because one action over one selection has nothing worth modelling.
Core
Animatedonly.react-native-reanimatedandreact-native-gesture-handleraredeliberately absent, and the reason is recorded in the source rather than left implicit: they
are native modules on a bare RN 0.82 app, one needs a Babel plugin ordered last, and the
target emulator image has 16 KB pages where an unaligned native library will not load at all.
The edge-swipe drawer, the battle animations and the splash are all built on
AnimatedandPanResponderbecause of this.react-native-svgwas removed for the same reason after itturned out to be 16 MB of native dependency imported nowhere.
Chain-blind through the shared adapter. Screens talk to
@shared/corehooks, which talk toChainAdapter. Nothing undermobile/src/screenstests for a chain except where the flowgenuinely differs (the EVM entropy settle lifecycle).
Changes outside
mobile/Five commits touch
shared/, andshared/is consumed byfrontend/as well, so thesechange web behaviour too. They are bugs mobile surfaced, not mobile features:
22decfd0d120e826allowFailuremisalignment)c9439999c3ff4ac96a657213signInErroronAuthContext, so a failed sign-in is reportableThe last one is additive: a new context field plus a mobile consumer
(
SignInErrorReporter). Nothing existing reads it, so the frontend is unaffected by that one.The other four change behaviour the web app shares, and each landed with tests in
shared/tests/(useEvmEntropySettleFlow,useIncomingProposals,useMarriage,usePetsContractare new files).No changes at all to
frontend/,backend/,contracts/,services/,proto/,protocol/or
verifier/. No golden vector was touched and no combat port was edited, so the parityrules in
AGENTS.mdare not in play.Testing
mobileApp.test.tsx)@shared/corepnpm lintpasses with--max-warnings 0.Two conventions the suites follow, both of which caught real regressions during the work:
rewritten after they passed against a deliberate defect. One example: a stat tile reading
attackwhere it should readdefensepassed 75 tests, because the fixture happened to giveboth stats the same value.
testID, never by index.grep -rE 'findAllByType\(TouchableOpacity\)\[[0-9]' mobile/__tests__returns nothing. The worst casefound was
networkGate.test.tsx, where which button[1]meant depended on whether thetarget chain was already approved, so two tests pressing
[1]were pressing differentcontrols and both passed.