Skip to content

Restore face quality check - #1786

Open
luhmirin-s wants to merge 2 commits into
mainfrom
hotfix/restore-face-quality-check
Open

Restore face quality check#1786
luhmirin-s wants to merge 2 commits into
mainfrom
hotfix/restore-face-quality-check

Conversation

@luhmirin-s

@luhmirin-s luhmirin-s commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

JIRA ticket
Will be released in: 2026.3.0

Notable changes

  • Restored the "bad quality" case UI and enums
  • Restore the quality check to get at least one good quality image. In manual capture skipping the quality checks if good fallback is available to prevent unnecessary difficulties during capture (https://simprints.atlassian.net/browse/MS-746). In auto-capture checking quality of all images.

Testing guidance

  • Set very high quality threshold and point to a bad quality image of a face.

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)

@luhmirin-s
luhmirin-s requested review from a team, BurningAXE, TristramN, alex-vt, alexandr-simprints, meladRaouf and ybourgery and a lite review from Copilot and removed request for a team August 13, 2026 11:39
@cla-bot cla-bot Bot added the ... label Aug 13, 2026

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

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.

Comment thread infra/resources/src/main/res/values/strings.xml
@luhmirin-s
luhmirin-s force-pushed the hotfix/restore-face-quality-check branch from 6c61bfd to 697ab14 Compare August 13, 2026 14:07
@sonarqubecloud

Copy link
Copy Markdown

}

@Test
fun `manual - bad quality faces pass after a valid fallback capture`() = runTest {

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.

Shouldn't it be the opposite - bad quality passes only when there's no fallback!?

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.

4 participants