Skip to content

MS-1492 Add a configuration to show parental consent by default - #1778

Merged
meladRaouf merged 1 commit into
mainfrom
feature/MS-1492-default-consent-config
Aug 12, 2026
Merged

MS-1492 Add a configuration to show parental consent by default#1778
meladRaouf merged 1 commit into
mainfrom
feature/MS-1492-default-consent-config

Conversation

@luhmirin-s

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

Copy link
Copy Markdown
Contributor

JIRA ticket
Will be released in: 2026.3.0

Notable changes

  • Added a custom configuration flag to select parental consent as the default.
  • Checking the custom config when building the initial consent page state.

Testing guidance

  • Set flag to "true", run some requests with consent enabled.

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 11, 2026 12:46
@cla-bot cla-bot Bot added the ... label Aug 11, 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

Adds an experimental custom-config flag to default the Consent UI to the Parental consent tab when parental consent is allowed, wiring the flag through the config-store model and into the consent screen’s initial state.

Changes:

  • Added useParentalConsentAsDefault parsing to ExperimentalProjectConfiguration plus unit tests.
  • Updated ConsentViewModel to select the initial consent tab based on the experimental flag (only when parental consent is enabled).
  • Updated consent feature tests and moved tab index constants into the ViewModel for shared use.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
infra/config-store/src/main/java/com/simprints/infra/config/store/models/ExperimentalProjectConfiguration.kt Adds a new experimental boolean flag accessor and the backing config key constant.
infra/config-store/src/test/java/com/simprints/infra/config/store/models/ExperimentalProjectConfigurationTest.kt Adds unit test coverage for the new config flag parsing.
feature/consent/src/main/java/com/simprints/feature/consent/screens/consent/ConsentViewModel.kt Applies the new flag when computing initial consent tab selection; refactors tab constants.
feature/consent/src/main/java/com/simprints/feature/consent/screens/consent/ConsentFragment.kt Reuses tab constants from ConsentViewModel instead of local duplicates.
feature/consent/src/test/java/com/simprints/feature/consent/screens/consent/ConsentViewModelTest.kt Extends tests to assert initial tab selection behavior and exercises the experimental flag path.
Suppressed comments (1)

feature/consent/src/test/java/com/simprints/feature/consent/screens/consent/ConsentViewModelTest.kt:101

  • Avoid duplicating the custom-config key string in tests; using the shared constant reduces the chance of mismatches if the key ever changes.
        every { projectConfig.custom } returns mapOf("useParentalConsentAsDefault" to JsonPrimitive(true))

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@luhmirin-s
luhmirin-s force-pushed the feature/MS-1492-default-consent-config branch from 3c90d40 to 5942c6d Compare August 11, 2026 13:24
@sonarqubecloud

Copy link
Copy Markdown

@meladRaouf
meladRaouf merged commit c6bde0a into main Aug 12, 2026
14 checks passed
@luhmirin-s
luhmirin-s deleted the feature/MS-1492-default-consent-config branch August 12, 2026 12:47
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.

3 participants