MS-1457 Auto-capture config#1746
Conversation
There was a problem hiding this comment.
Pull request overview
Moves the Face auto-capture enablement flag out of ad-hoc “experimental/custom config” and into the core Face configuration model, so it can be persisted in protobuf config, migrated from existing installs, and consumed consistently by feature code.
Changes:
- Added
isAutoCapturetoFaceConfigurationand plumbed it through API ↔ domain ↔ proto mappings. - Extended
ProtoFaceConfigurationwith an auto-capture flag and added a DataStore migration to populate it from legacycustomJson. - Updated dashboard/face-capture code and tests to stop reading
faceAutoCaptureEnabledfrom experimental custom config.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| infra/config-store/src/test/java/com/simprints/infra/config/store/testtools/Models.kt | Updates test model builders for new face auto-capture config field. |
| infra/config-store/src/test/java/com/simprints/infra/config/store/models/FaceConfigurationTest.kt | Adjusts unit test setup for updated FaceConfiguration constructor. |
| infra/config-store/src/test/java/com/simprints/infra/config/store/models/ExperimentalProjectConfigurationTest.kt | Removes tests for experimental/custom face auto-capture flags that no longer exist. |
| infra/config-store/src/test/java/com/simprints/infra/config/store/local/migrations/ProjectConfigSharedPrefsMigrationTest.kt | Updates migration tests to include the new proto face auto-capture field. |
| infra/config-store/src/main/proto/project_config.proto | Adds proto field for face auto-capture enablement. |
| infra/config-store/src/main/java/com/simprints/infra/config/store/remote/models/ApiFaceConfiguration.kt | Adds isAutoCapture to API model and maps it to domain. |
| infra/config-store/src/main/java/com/simprints/infra/config/store/models/FaceConfiguration.kt | Adds isAutoCapture to the domain face config model. |
| infra/config-store/src/main/java/com/simprints/infra/config/store/models/ExperimentalProjectConfiguration.kt | Removes legacy experimental/custom face auto-capture fields and constants. |
| infra/config-store/src/main/java/com/simprints/infra/config/store/local/models/FaceConfiguration.kt | Persists/reads face auto-capture flag in proto mappings. |
| infra/config-store/src/main/java/com/simprints/infra/config/store/local/migrations/ProjectConfigFaceAutoCaptureConfigMigration.kt | New DataStore migration to move legacy custom flag into the proto face config field. |
| infra/config-store/src/main/java/com/simprints/infra/config/store/local/migrations/models/OldProjectConfig.kt | Ensures legacy config conversion supplies isAutoCapture in the new domain model. |
| infra/config-store/src/main/java/com/simprints/infra/config/store/ConfigStoreModule.kt | Wires the new migration into the DataStore migrations list. |
| feature/dashboard/src/test/java/com/simprints/feature/dashboard/settings/SettingsViewModelTest.kt | Removes tests tied to experimental configuration exposure in settings. |
| feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/SettingsViewModel.kt | Removes experimental configuration LiveData wiring. |
| feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/SettingsFragment.kt | Changes when the auto-capture settings toggle is shown. |
| face/capture/src/test/java/com/simprints/face/capture/usecases/IsUsingAutoCaptureUseCaseTest.kt | Updates use-case tests to read the flag from face config instead of custom config. |
| face/capture/src/test/java/com/simprints/face/capture/screens/livefeedback/LiveFeedbackAutoCaptureFragmentViewModelTest.kt | Removes legacy custom-config stubbing no longer needed for auto-capture flow. |
| face/capture/src/main/java/com/simprints/face/capture/usecases/IsUsingAutoCaptureUseCase.kt | Switches feature flag source to projectConfiguration.face?.isAutoCapture. |
| face/capture/src/main/java/com/simprints/face/capture/screens/livefeedback/LiveFeedbackFragmentViewModel.kt | Removes experimental imaging-duration flag usage; uses a fixed imaging duration constant. |
ce4ba66 to
25dfdc0
Compare
| @@ -21,21 +21,6 @@ data class ExperimentalProjectConfiguration( | |||
| ?.booleanOrNull | |||
| .let { it == true } | |||
|
|
|||
There was a problem hiding this comment.
@luhmirin-s Just to note that if a user updates to 2026.3.0 and auto-capture was enabled through the custom configuration, the feature will be temporarily disabled until the app syncs the new configuration.
There was a problem hiding this comment.
There is a migration that checks for the stored custom config json and updates the flag in face config so there should not be an interruption.
|
|
||
| val faceAutoCaptureImagingDurationMillis: Long | ||
| get() = customConfig | ||
| ?.get(FACE_AUTO_CAPTURE_IMAGING_DURATION_MILLIS) |
There was a problem hiding this comment.
This one is useful, please keep.
|



JIRA ticket
Will be released in: 2026.3.0
Notable changes
FaceConfigurationfield.Testing guidance
Additional work checklist