Skip to content

feat(mobile): add React Native (Expo) companion app - #217

Closed
dchasepdx wants to merge 6 commits into
open-flight:mainfrom
dchasepdx:feat/mobile-app-scaffold
Closed

feat(mobile): add React Native (Expo) companion app#217
dchasepdx wants to merge 6 commits into
open-flight:mainfrom
dchasepdx:feat/mobile-app-scaffold

Conversation

@dchasepdx

Copy link
Copy Markdown

Summary

Adds a React Native (Expo, SDK 54) mobile companion app under mobile/. It connects to the existing Flask/Socket.IO server over the LAN and renders live shots.

Why was this required?

The README lists a phone app as a wanted contribution. A native app is the foundation for future device-only capabilities (BLE/watch, GPS-based features) a browser can't reach. This PR is the scaffold plus a first useful screen; it does not touch the Python server or the web UI.

Automated tests

None in this PR. mobile/ has no test harness yet, and the repo's "tests included" PR gate only checks src/openflight/** and ui/src/**, so mobile/ changes don't trigger it. Standing up jest-expo + React Native Testing Library is planned as a separate follow-up.

Manual (human) testing

  • npx tsc --noEmit clean; npx expo export --platform web bundles clean.
  • Connected to a local --mock server, used Simulate Shot, and verified the current-shot tiles render — including the conditional Club Path / Spin Axis tiles and the confidence dots.

Starting point for a phone companion app that consumes the existing
Socket.IO shot stream from server.py, reusing the React/TypeScript
stack already used by ui/src/.
Connects to the existing Socket.IO server, renders incoming shots
(club / ball speed / carry) with a header row, and exposes a
Simulate Shot control for testing against --mock backends.
The server URL field opened the keyboard with no way to close it except
the return key. Wrap the screen in TouchableWithoutFeedback ->
Keyboard.dismiss, make the shot ScrollView dismiss on drag and persist
taps (so buttons still register), and set the URL field's return key to
"done" with an explicit dismiss on submit.
@dchasepdx
dchasepdx marked this pull request as ready for review August 19, 2026 02:18
@dchasepdx
dchasepdx requested a review from jewbetcha as a code owner August 19, 2026 02:18
@jewbetcha

Copy link
Copy Markdown
Member

Thanks for this! Would love for the community to test this out and provide some feedback before merging

@dchasepdx

Copy link
Copy Markdown
Author

Thanks for this! Would love for the community to test this out and provide some feedback before merging

Yeah no problem! Let me add some instructions for running the dev build connected to the mock server

Comment thread mobile/App.tsx
setConnectionState('disconnected');
}, []);

const connect = useCallback(() => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When a connection attempt has failed you are not able to connect again. App has to be reloaded to allow a new connection after an error state

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

That's a good call. I have another branch with more features that this bug is fixed on. I wanted to get a quick PR up to discuss whether or not React native was the right path. Here's the phase 0 code if you're curious: dchasepdx#2

@dchasepdx

Copy link
Copy Markdown
Author

Closing this — superseded by the repo split.

The mobile app now lives in its own repo, open-flight/openflight-mobile, so this no longer targets the right place.

The work here isn't lost: I moved it with git subtree split --prefix=mobile and rebased onto the mobile repo's initial commit, so the original commits and authorship are preserved rather than squashed. It's now open as open-flight/openflight-mobile#1, together with the Phase 0 foundation work from #224 (navigation shell, socket service, session store, and a jest-expo harness with 20 passing tests).

The Makefile mobile-dev target from this PR is intentionally not carried over — it has no meaning outside the monorepo, and nothing mobile-related ever landed on main here, so no cleanup is needed on this side.

@dchasepdx dchasepdx closed this Aug 30, 2026
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.

3 participants