Use same popup for add email as signup#7701
Conversation
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe 3PID email registration flow now presents a resend-capable ChangesSettings 3PID registration
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/routes/settings/settings_security/settings_3pid/settings_3pid.dart`:
- Around line 53-60: Update the onResendEmail callback to wrap
requestTokenToRegisterEmail with the existing showFutureLoadingDialog pattern
used by the initial request, preserving the send-attempt increment and request
arguments while providing loading feedback and graceful error handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 84adde95-fa08-42db-8641-40afce86c39c
📒 Files selected for processing (1)
lib/routes/settings/settings_security/settings_3pid/settings_3pid.dart
| onResendEmail: () async { | ||
| Settings3Pid.sendAttempt++; | ||
| await Matrix.of(context).client.requestTokenToRegisterEmail( | ||
| clientSecret, | ||
| input, | ||
| Settings3Pid.sendAttempt, | ||
| ); | ||
| }, |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Add error handling and loading feedback for the resend action.
Currently, the onResendEmail callback fires a network request without any visual loading state or error handling. If the request fails, the exception will be unhandled and the user will not receive any feedback.
Consider wrapping the request with showFutureLoadingDialog (as done for the initial request) to provide a loading indicator and to handle potential errors gracefully.
💻 Proposed fix
- onResendEmail: () async {
- Settings3Pid.sendAttempt++;
- await Matrix.of(context).client.requestTokenToRegisterEmail(
- clientSecret,
- input,
- Settings3Pid.sendAttempt,
- );
- },
+ onResendEmail: () async {
+ Settings3Pid.sendAttempt++;
+ await showFutureLoadingDialog(
+ context: context,
+ future: () => Matrix.of(context).client.requestTokenToRegisterEmail(
+ clientSecret,
+ input,
+ Settings3Pid.sendAttempt,
+ ),
+ );
+ },📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| onResendEmail: () async { | |
| Settings3Pid.sendAttempt++; | |
| await Matrix.of(context).client.requestTokenToRegisterEmail( | |
| clientSecret, | |
| input, | |
| Settings3Pid.sendAttempt, | |
| ); | |
| }, | |
| onResendEmail: () async { | |
| Settings3Pid.sendAttempt++; | |
| await showFutureLoadingDialog( | |
| context: context, | |
| future: () => Matrix.of(context).client.requestTokenToRegisterEmail( | |
| clientSecret, | |
| input, | |
| Settings3Pid.sendAttempt, | |
| ), | |
| ); | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@lib/routes/settings/settings_security/settings_3pid/settings_3pid.dart`
around lines 53 - 60, Update the onResendEmail callback to wrap
requestTokenToRegisterEmail with the existing showFutureLoadingDialog pattern
used by the initial request, preserving the send-attempt increment and request
arguments while providing loading feedback and graceful error handling.
Thank you so much for your contribution to FluffyChat ❤️❤️❤️
Pull Request has been tested on:
Accessibility
tooltip:/semanticLabel:), and decorative images useexcludeFromSemantics: true. See accessibility.instructions.md. (The source-level gate enforces this; manual a11y review is owned by whoever changes the UI.)Summary by CodeRabbit
New Features
Bug Fixes