fix(auth)!: resolve the 12 baselined Compose lint findings - #2504
Merged
russellwheatley merged 1 commit intoSep 9, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses several Compose correctness and localization warnings by resolving resource queries outside composable scopes, fixing non-observable locale usages, complying with Composable naming conventions, and snapshotting mutable collections to prevent state issues. The review feedback suggests optimizing resource lookups in AuthTextField by conditionally calling stringResource only when read-only, using a locale-aware DateFormat instead of a hardcoded pattern for internationalization, and refactoring asynchronous tasks in MfaEnrollmentScreen to use await() instead of addOnCompleteListener inside coroutines.
demolaf
force-pushed
the
fix/baselined-compose-lint-findings
branch
from
September 9, 2026 14:05
6b4bbe9 to
b655249
Compare
demolaf
marked this pull request as draft
September 9, 2026 14:31
demolaf
marked this pull request as ready for review
September 9, 2026 15:33
russellwheatley
approved these changes
Sep 9, 2026
russellwheatley
merged commit Sep 9, 2026
8a6e3b8
into
ci/run-android-lint-in-the-build
10 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android Lint's baseline shipped with 12 Compose findings suppressed so the new gate could go green. This fixes all 12 and drops those entries, leaving only CPRN-432's 168 localization ones.
MfaEnrollmentScreen.ktheld the SDK's ownMutableListin aMutableState, so a list mutated in place would have skipped recomposition; it now snapshots to an immutableList. Six of the sevenLocalContextGetResourceValueCallsites sit inLaunchedEffectorsemantics {}bodies wherestringResourcecannot be called at all, so they resolve in composition and close over the result.MfaEnrollmentDefaults.ktread the process-global locale, which disagrees with the Activity's configuration under a per-context locale override — it now readsLocalLocale.current.ReauthScopeProbe.capture()is renamedCapture()(test-only, 27 call sites). No new tests: every finding is covered by the existing suite plus the lint gate itself, which now passes with zero Compose findings.AuthMethodPicker'scustomLayoutmoves to the last parameter so it can be passed as a trailing lambda. Positional callers break at compile time, and because the JVM descriptor changed, callers using named arguments need a recompile too.EmailAuthStepisinternal, so the equivalent move there has no external effect.Maintainer note: Fixes internal CPRN-436