Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
translate ▾

Modern-Apps.git / setupwizard / AGENTS.md

AGENTS.md2.7 KiBRenderedCodeRaw
1# AGENTS.md — setupwizard/ (':setupwizard')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `setupwizard/` + allowed shared modules. Do not root-scan.
4
5_Install: ./install setupwizard (dev by default)._
6- Gradle: :setupwizard / dir: setupwizard/
7- Package roots present: ui, platform
8- Entry files: MainActivity.kt, Route.kt, Navigation.kt
9- Deps: (none declared)
10- Metadata: metadata_data/setupwizard.md (present)
11- Rust: no / screenshotTest: yes (Wifi and Security routes are exempted in Route.kt: handoff steps with no UI of their own)
12
13## Overview
14**Purpose:** First-run OS setup — language, Wi-Fi, time, location, lock, restore, bootloader warning; hands steps to owner apps, disables itself when done. Shorter secondary-user flow.
15**Key features:** `platform/SetupFlow` step machine + `SetupViewModel` → welcome/gestures/location/migration/OEM-unlock/handoff/finish screens; `SystemSetup` + `SetupIntents` delegate to owner apps; `DebugFlags` for testing. The navigation back stack is persisted per user (`Settings.Secure` via `SystemSetup`, encoded by `SetupFlow`) and resumed on relaunch, so process death mid-setup continues at the current step; it is cleared when setup completes.
16**Entry points:** `Route` → `MainActivity.kt` → `Navigation.kt` → `platform/SetupFlow.kt` → `ui/WelcomeScreen.kt`.
17**Gotchas:** Runs once and disables itself — testing needs the re-enable path (`DebugFlags`); bootloader-warning copy is security-sensitive, don't soften it.
18
19## Key files
20### Root — entry + navigation
21- com/vayunmathur/setupwizard/MainActivity.kt
22- com/vayunmathur/setupwizard/Navigation.kt
23- com/vayunmathur/setupwizard/Route.kt
24### platform/ — flow machine + delegation
25- com/vayunmathur/setupwizard/platform/SetupFlow.kt
26- com/vayunmathur/setupwizard/platform/SetupViewModel.kt
27- com/vayunmathur/setupwizard/platform/SystemSetup.kt
28- com/vayunmathur/setupwizard/platform/SetupIntents.kt
29- com/vayunmathur/setupwizard/platform/DebugFlags.kt
30### ui/ — setup steps
31- com/vayunmathur/setupwizard/ui/WelcomeScreen.kt
32- com/vayunmathur/setupwizard/ui/GesturesScreen.kt
33- com/vayunmathur/setupwizard/ui/LocationScreen.kt
34- com/vayunmathur/setupwizard/ui/MigrationScreen.kt
35- com/vayunmathur/setupwizard/ui/OemUnlockScreen.kt
36- com/vayunmathur/setupwizard/ui/HandoffScreen.kt
37- com/vayunmathur/setupwizard/ui/FinishScreen.kt
38- com/vayunmathur/setupwizard/ui/components/SetupCheckboxRow.kt
39- com/vayunmathur/setupwizard/ui/dialogs/LanguagePickerDialog.kt (stateless content for the `Route.LanguagePickerDialog` route; the route is transient in the persisted stack — SetupFlow drops it on resume)
40
41## Verify (this module only)
42```
43./gradlew :setupwizard:compileDevKotlin
44./gradlew :setupwizard:lint
45./gradlew :setupwizard:checkMetadata
46```