mobile: Dev Tool TestFlight build + in-app backend URL override#8755
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Preview buildsMobile Dev Tool previewScan the QR with your phone camera, or tap Open in Dev Tool on the device, to open this branch in the installed Dev Tool dev client. ios — Open in Dev Tool Deep linkandroid — Open in Dev Tool Deep linkcommit |
Adds a developer settings screen (opened via a floating button in non-prod builds) to point the app at a different API/web backend without rebuilding. Overrides persist in AsyncStorage and apply on a JS reload; the gRPC client and webviews now resolve their URLs through a single config module. Includes preset/recents quick-fill and deep-link (QR) prefill, plus a small QR generator page. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ipt, ASC app id Replaces the dev-settings "Share via QR" block with a collapsible "Share via link" row that copies the deep link to the clipboard (adds expo-clipboard). Adds a start:devtool script that runs expo start with the couchers-devtool scheme so the QR opens the Dev Tool app, and fills in the devtool iOS ascAppId for auto-submit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Records the decision to serve per-branch RN-shell OTA bundles for the Dev Tool statically from the existing S3 + CloudFront dev-assets infra (no OTA server, no code signing), and the dev-launcher source findings that justify loading branches via the launcher deep link rather than the programmatic Updates API (which dev clients hard-disable). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bundle the devtool variant, stage an Expo Updates v1 multipart manifest, and publish it to the dev-assets bucket under an immutable per-SHA prefix so the installed Dev Tool dev client can load any branch via a deep link. Drops code signing from the devtool updates config (unsigned manifests over HTTPS are sufficient for the internal dev tool). See docs/mobile-dev-tool-ota.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Visible RN banner to confirm on-device that the CI-published OTA bundle is the one running. JS-only, so the fingerprint is unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add a preview:pr-comment job that runs after the OTA S3 upload (needs: preview:mobile-ota) so every link it posts is already live, resolves the GitHub PR from the commit SHA, generates a QR (Python) it hosts on our own dev-assets/CloudFront, and upserts a sticky preview comment. Replaces the GitHub Action approach, which couldn't order itself after the upload. Structured so non-OTA preview sections can be added later. No-ops without GITHUB_PREVIEW_TOKEN or an open PR so it never reds the pipeline. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Generate the dev-launcher QR PNG in build:mobile-ota (npx qrcode, so it stays out of the fingerprint sources) and upload it with the existing aws s3 cp in preview:mobile-ota, next to the bundle. The PR-comment job no longer touches S3 (no boto3) - it only assembles markdown referencing the hosted qr.png and upserts the GitHub comment. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ota-stage.mjs now emits an open.html per platform (https redirect to the dev-launcher deep link) since GitHub strips custom-scheme links from comments; the PR comment links to it. Enables android in the OTA jobs and removes the temporary OTA test banner from the login screen. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
It's provided only as an EAS file env secret, so it's present on EAS builds but absent locally and in CI; hashing it by contents made the fingerprint runtime version diverge between the EAS-built Dev Tool client and per-branch OTA bundles. Excluding it keeps the fingerprint reproducible everywhere. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Development-client builds default to APK; the Dev Tool needs an AAB for Play Store internal distribution. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
buildType only applies to release builds; a development client builds an APK regardless, so the setting was dead config that only churned the fingerprint. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Reflects the implemented GitLab CI jobs, the deployed origin-response header injection, the QR + open.html PR comment, Android support, and the google-services.json fingerprint exclusion. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The project was missing it, so Metro fell back to its bare defaults instead of extending expo/metro-config; this also resolves the failing expo-doctor check. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2136802 to
d3ebef6
Compare
📝 Release NotesThis PR does not need to be included in release notes. Reason: This PR is primarily developer tooling for the mobile app: a Dev Tool build, backend URL override for non-production builds, and per-branch OTA previews for testing PRs on phones. These changes are not intended for end users and do not noticeably change the production user experience. 🤖 Bot Debug InformationModel: |


Builds out the Dev Tool mobile variant, lets developers point it at any backend without rebuilding, and adds a per-branch OTA preview so any mobile branch can be opened on a phone straight from its PR.
Dev Tool TestFlight build (
wipcommit)devtoolapp variant (separate bundle ID / scheme / icon) and an EASdevtoolbuild+submit profile (developmentClient, store distribution).release:*:devtoolscripts and README instructions for the install-once / load-JS-over-the-air workflow.In-app backend URL override (this is the main new code)
AsyncStorageand are applied on a JS reload; the gRPC client and webviews now resolve their URLs through a singleconfig/urls.tsmodule instead of readingprocess.envdirectly. Production builds ignore overrides entirely.couchers-devtool://dev-settings?api=…&web=…with the phone camera opens the app with the fields filled. A smalldev-url-qr.htmlgenerator page is included.Per-branch Dev Tool OTA preview
couchers-dev-assets) + CloudFront + Lambda@Edge.expo exportis staged into an Expo Updates v1multipart/mixedmanifest (app/mobile/scripts/ota-stage.mjs) and uploaded under an immutableota/<sha>/<platform>/prefix; the origin-response Lambda injects the requiredexpo-protocol-versionheader (S3 can't).build:mobile-ota→preview:mobile-ota→preview:pr-comment— build/stage, upload, and post a sticky PR comment with a scannable QR plus a clickable Open in Dev Tool link per platform (app/scripts/pr_preview_comment.py; the link targets a hostedopen.htmlredirect because GitHub strips custom-scheme hrefs). iOS and Android..fingerprintignoreexcludesgoogle-services.json(provided only as an EAS file secret, so absent locally and in CI) so the fingerprint runtime version is reproducible across the EAS build and CI.docs/mobile-dev-tool-ota.md.Testing
npx tsc --noEmit,expo lint, andnpm testpass; the GitLab CI OTA chain (build/preview:mobile-ota,preview:pr-comment) is green.@react-native-async-storage/async-storagenative module, so a fresh dev-client build is required first. After rebuilding, worth a manual check of: the floating button on every screen, save → reload re-points the backend, presets/recents fill the fields, and the deep-link/QR round-trip.Web frontend checklist
For maintainers
This PR was created with the Couchers PR skill.