feat(testing): debug-only skip_onboarding intent extra for AI/CI tooling (#6044)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
James Rich
2026-07-01 11:05:42 -05:00
committed by GitHub
parent 7616c5ba62
commit 4ab971df75
2 changed files with 25 additions and 0 deletions

View File

@@ -77,6 +77,20 @@ Compose Preview Screenshot Testing (AGP/layoutlib) is split into two modules —
Rendering is **host-deterministic** (layoutlib): a local `update` produces references byte-identical to CI, so locally-recorded goldens pass `validate`. `copyDocsScreenshots` overwrites a stale committed `nodes_detail_local.png` each run — `git checkout` it. Public previews consumed cross-module by a wrapper need a `detekt-baseline.xml` entry (PreviewPublic). New screenshot? Pick the module by purpose; see `docs/assets/screenshots/README.md`.
## 3c) Fresh-install manual/agent testing: skip onboarding
Debug builds accept an intent extra to skip the intro flow (`MainActivity.kt`, `BuildConfig.DEBUG`-gated — never reaches release/Play builds). Pair with `pm grant` (native Android, no app code) to pre-accept runtime permissions:
```bash
adb shell pm grant <pkg> android.permission.BLUETOOTH_SCAN
adb shell pm grant <pkg> android.permission.BLUETOOTH_CONNECT
adb shell pm grant <pkg> android.permission.ACCESS_FINE_LOCATION
adb shell pm grant <pkg> android.permission.POST_NOTIFICATIONS # API 33+
adb shell am start -n <pkg>/org.meshtastic.app.MainActivity --ez skip_onboarding true
```
Use this whenever driving the app from a fresh install/uninstall (screenshot tests, UI automation, agent-driven exploration) instead of clicking through the intro screens.
## 4) CI Pipeline Architecture
CI is defined in `.github/workflows/reusable-check.yml` and structured as parallel job groups:

View File

@@ -105,6 +105,13 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
// ponytail: debug-only test affordance so CI/agent tooling can skip onboarding on a fresh
// install: `adb shell am start -n <pkg>/.MainActivity --ez skip_onboarding true`. Pair with
// `adb shell pm grant <pkg> <permission>` to pre-grant runtime permissions (native, no app code).
if (BuildConfig.DEBUG && intent.getBooleanExtra(EXTRA_SKIP_ONBOARDING, false)) {
model.onAppIntroCompleted()
}
enableEdgeToEdge()
// Explicitly set the cutout mode to ALWAYS for Android 15+ to satisfy Play Console recommendations.
@@ -328,4 +335,8 @@ class MainActivity : AppCompatActivity() {
handleMeshtasticUri("$DEEP_LINK_BASE_URI/connections".toUri())
}
private companion object {
const val EXTRA_SKIP_ONBOARDING = "skip_onboarding"
}
}