diff --git a/.skills/testing-ci/SKILL.md b/.skills/testing-ci/SKILL.md index 465ea6422..3ea9e51be 100644 --- a/.skills/testing-ci/SKILL.md +++ b/.skills/testing-ci/SKILL.md @@ -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 android.permission.BLUETOOTH_SCAN +adb shell pm grant android.permission.BLUETOOTH_CONNECT +adb shell pm grant android.permission.ACCESS_FINE_LOCATION +adb shell pm grant android.permission.POST_NOTIFICATIONS # API 33+ +adb shell am start -n /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: diff --git a/androidApp/src/main/kotlin/org/meshtastic/app/MainActivity.kt b/androidApp/src/main/kotlin/org/meshtastic/app/MainActivity.kt index 1b113267f..628336ca5 100644 --- a/androidApp/src/main/kotlin/org/meshtastic/app/MainActivity.kt +++ b/androidApp/src/main/kotlin/org/meshtastic/app/MainActivity.kt @@ -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 /.MainActivity --ez skip_onboarding true`. Pair with + // `adb shell pm grant ` 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" + } }