Skip to content

MS-1457 Auto-capture config#1746

Merged
luhmirin-s merged 6 commits into
mainfrom
feature/MS-1457-auto-capture-config
Jul 14, 2026
Merged

MS-1457 Auto-capture config#1746
luhmirin-s merged 6 commits into
mainfrom
feature/MS-1457-auto-capture-config

Conversation

@luhmirin-s

Copy link
Copy Markdown
Contributor

JIRA ticket
Will be released in: 2026.3.0

Notable changes

  • Changed the auto-capture toggle from custom config to a permanent FaceConfiguration field.

Testing guidance

  • Run testiny cases for regular and auto-capture flows.

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)
  • Other teams notified about the changes (if applicable)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 isAutoCapture to FaceConfiguration and plumbed it through API ↔ domain ↔ proto mappings.
  • Extended ProtoFaceConfiguration with an auto-capture flag and added a DataStore migration to populate it from legacy customJson.
  • Updated dashboard/face-capture code and tests to stop reading faceAutoCaptureEnabled from 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.

Comment thread infra/config-store/src/main/proto/project_config.proto Outdated
@luhmirin-s
luhmirin-s force-pushed the feature/MS-1457-auto-capture-config branch from ce4ba66 to 25dfdc0 Compare July 13, 2026 09:26
@cla-bot cla-bot Bot added the ... label Jul 13, 2026
@@ -21,21 +21,6 @@ data class ExperimentalProjectConfiguration(
?.booleanOrNull
.let { it == true }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is useful, please keep.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alex-vt restored

@sonarqubecloud

Copy link
Copy Markdown

@luhmirin-s
luhmirin-s merged commit 3f72bb3 into main Jul 14, 2026
14 checks passed
@luhmirin-s
luhmirin-s deleted the feature/MS-1457-auto-capture-config branch July 14, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants