Skip to content

Report email row errors only once across recomposition - #830

Merged
swolfand merged 1 commit into
mainfrom
sam/mobile-612-spike-email-row-error-callback-re-fires-on-recomposition
Jul 30, 2026
Merged

Report email row errors only once across recomposition#830
swolfand merged 1 commit into
mainfrom
sam/mobile-612-spike-email-row-error-callback-re-fires-on-recomposition

Conversation

@swolfand

@swolfand swolfand commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Move the email row error callback into a LaunchedEffect so recomposition does not re-fire the callback.
  • Add a Paparazzi Compose test covering a failure state across recomposition.

Testing

  • Added and ran a Paparazzi UI test verifying the error is reported once.

Note

Fix UserProfileEmailRow error callback firing on every recomposition

Inline onError invocation during composition in UserProfileEmailRow caused repeated callbacks (e.g. duplicate snackbars) on recomposition. A new ReportEmailRowError composable wraps the callback in a LaunchedEffect keyed by the error message, so onError fires only once per distinct error. A Compose test verifies the callback is invoked exactly once despite multiple recompositions.

🖇️ Linked Issues

Resolves MOBILE-612, which identified that UserProfileEmailRow.kt invoked onError inline during composition rather than as a side effect.

Macroscope summarized 1c20b57.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@swolfand, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b6e8a43-461d-4c37-8a6f-1625b89c1cf0

📥 Commits

Reviewing files that changed from the base of the PR and between f9f25d7 and 1c20b57.

📒 Files selected for processing (2)
  • source/ui/src/main/java/com/clerk/ui/userprofile/email/UserProfileEmailRow.kt
  • source/ui/src/test/java/com/clerk/ui/userprofile/email/UserProfileEmailRowTest.kt
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sam/mobile-612-spike-email-row-error-callback-re-fires-on-recomposition

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@swolfand
swolfand marked this pull request as ready for review July 30, 2026 01:38
@swolfand
swolfand force-pushed the sam/mobile-612-spike-email-row-error-callback-re-fires-on-recomposition branch from 89e78c9 to 1c20b57 Compare July 30, 2026 01:39
@swolfand
swolfand merged commit b3d3b96 into main Jul 30, 2026
12 checks passed
@swolfand
swolfand deleted the sam/mobile-612-spike-email-row-error-callback-re-fires-on-recomposition branch July 30, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant