Restore face quality check - #1786
Conversation
There was a problem hiding this comment.
Pull request overview
Restores the “bad quality” face-capture feedback path (UI strings + state enums) and reintroduces BAD_QUALITY reporting in capture events, aiming to require at least one good-quality frame while reducing friction when a good fallback is available.
Changes:
- Added BAD_QUALITY UI feedback (new strings + fragment rendering + state/status mapping).
- Re-enabled BAD_QUALITY result reporting in capture-event payloads.
- Updated/added unit tests to cover BAD_QUALITY feedback behavior and event reporting.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| infra/resources/src/main/res/values/strings.xml | Adds English title/error strings for the bad-quality case. |
| infra/resources/src/main/res/values-fr/strings.xml | Adds French title/error strings for the bad-quality case. |
| infra/resources/src/main/res/values-am/strings.xml | Adds Amharic title/error strings for the bad-quality case. |
| infra/resources/src/main/res/values-am-rET/strings.xml | Adds Amharic (Ethiopia) title/error strings for the bad-quality case. |
| infra/events/src/main/java/com/simprints/infra/events/event/domain/models/FaceCaptureEvent.kt | Removes deprecation marker around BAD_QUALITY result (restoring active usage). |
| face/capture/src/main/java/com/simprints/face/capture/models/FaceDetection.kt | Adds BAD_QUALITY to detection status model. |
| face/capture/src/main/java/com/simprints/face/capture/screens/livefeedback/LiveFeedbackState.kt | Adds BAD_QUALITY to UI feedback enum + status→feedback mapping. |
| face/capture/src/main/java/com/simprints/face/capture/screens/livefeedback/LiveFeedbackFragment.kt | Renders the new BAD_QUALITY feedback using the added strings. |
| face/capture/src/main/java/com/simprints/face/capture/screens/livefeedback/LiveFeedbackViewModel.kt | Introduces BAD_QUALITY detection based on quality threshold + fallback presence. |
| face/capture/src/main/java/com/simprints/face/capture/usecases/SimpleCaptureEventReporter.kt | Maps BAD_QUALITY detection to BAD_QUALITY event payload result. |
| face/capture/src/test/java/com/simprints/face/capture/usecases/SimpleCaptureEventReporterTest.kt | Extends invalid-detection reporting test to include BAD_QUALITY. |
| face/capture/src/test/java/com/simprints/face/capture/screens/livefeedback/LiveFeedbackViewModelTest.kt | Adds/updates tests to assert BAD_QUALITY feedback behavior and fallback interaction. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
6c61bfd to
697ab14
Compare
|
| } | ||
|
|
||
| @Test | ||
| fun `manual - bad quality faces pass after a valid fallback capture`() = runTest { |
There was a problem hiding this comment.
Shouldn't it be the opposite - bad quality passes only when there's no fallback!?



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