feat(android): first-run onboarding wizard with backup permission step #1386

Merged
chris merged 10 commits from feat/android-onboarding-wizard into main 2026-10-25 19:03:08 +01:00
Owner

Summary\n- First-run wizard after login: welcome screen → backup permission step (spec: docs/superpowers/specs/2026-10-25-android-onboarding-backup-wizard-design.md)\n- Backup step explains background backup and requests media access, EXIF location, and notification permissions inline via real system dialogs; deny/soft-skip never blocks — the backup tab keeps its existing lazy re-request as the retry path\n- Install-level onboardingCompleted flag in SettingsStore (survives logout, survives reinstall=false → shown once per install)\n- Permission request sequence extracted from BackupScreen into shared rememberBackupPermissionState() helper so tab and wizard cannot drift; BackupScreen behavior unchanged (regression suite green)\n- Bottom nav hidden on onboarding routes; de/en/da strings in parity\n\n## Verification\n- ./gradlew :app:testDebugUnitTest :core:test :app:assembleDebug → BUILD SUCCESSFUL (app: 784 tests, core: 173 tests, 0 failures)\n- New tests: SettingsStore flag persistence (Robolectric), permission grant/deny matrix SDK 25/29/33 (21), RoutesTest (4)

## Summary\n- First-run wizard after login: welcome screen → backup permission step (spec: docs/superpowers/specs/2026-10-25-android-onboarding-backup-wizard-design.md)\n- Backup step explains background backup and requests media access, EXIF location, and notification permissions inline via real system dialogs; deny/soft-skip never blocks — the backup tab keeps its existing lazy re-request as the retry path\n- Install-level `onboardingCompleted` flag in SettingsStore (survives logout, survives reinstall=false → shown once per install)\n- Permission request sequence extracted from BackupScreen into shared `rememberBackupPermissionState()` helper so tab and wizard cannot drift; BackupScreen behavior unchanged (regression suite green)\n- Bottom nav hidden on onboarding routes; de/en/da strings in parity\n\n## Verification\n- `./gradlew :app:testDebugUnitTest :core:test :app:assembleDebug` → BUILD SUCCESSFUL (app: 784 tests, core: 173 tests, 0 failures)\n- New tests: SettingsStore flag persistence (Robolectric), permission grant/deny matrix SDK 25/29/33 (21), RoutesTest (4)
Install-level first-run onboarding flag (spec §4.1): new SettingsStore
property backed by onboarding_completed in the existing encrypted prefs
file, default false, not reset on logout. Fake defaults to false; JVM
test covers default and cross-instance persistence via an internal
SharedPreferences seam (Robolectric sandbox has no AndroidKeyStore).
First-run wizard UI (spec 2026-10-25, §3/§4.5): welcome step with
brand block + primary/secondary exits, and the backup permission
step with the three permission cards (media required; location and
notifications optional, SDK-gated by the shared permission state),
rationale dialog reuse, soft-skip Finish, and the later-hint copy.
Strings in de/en/da with the onboarding_* prefix; consumes the
parallel-lane BackupPermissionState contract from ui/backup.
BackupScreen's inline permission choreography (media reads via
RequestMultiplePermissions, separate ACCESS_MEDIA_LOCATION launch to avoid
OEM auto-denial, POST_NOTIFICATIONS behind the one-time rationale dialog,
rememberSaveable ask-once flags, ensureMediaPermissions retry) moves into
ui/backup/BackupPermissions.kt so the onboarding backup step and the backup
tab share one implementation and cannot drift (design 2026-10-25 §4.4).

The tab keeps its exact behavior: it opts into the auto-run chain
(autoRequest = true) and re-runs its initial loads when the media grant
lands (onMediaGranted). SDK branching stays in StorageCompat.
Design 2026-10-25 §4.2 + §3 final integration: MemoriesApp receives the
SettingsStore, gates the start destination and the post-login redirect on
settings.onboardingCompleted (null session → login; session + pending flag →
onboarding/welcome; else photos), adds both onboarding routes with
popUpTo(start){inclusive} completion navigation, and hides the bottom
NavigationBar on wizard routes via Routes.isOnboarding (forced-choices flow).

The flag is read directly from the store at every gate — not cached — so a
logout can never serve a stale 'wizard pending' to the next account, and
logout never resets it (install-level by design). Wizard completion is the
only writer; BackupScreen and its lazy permission asks stay as merged.

Also fixes a broken merge in OnboardingBackupScreen (missing material3 Icon
import — compile error, no behavior change).
copy(android): onboarding string polish (de hint, da location/finish wording)
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 6s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 9s
Build and Deploy / Android unit tests and debug APK (push) Successful in 6m2s
5193a647c6
chris merged commit 8dc5edafb1 into main 2026-10-25 19:03:08 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1386
No description provided.