-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CMM-1125 be sure to auto generate application password when asked from the editor #22470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMM-1125 be sure to auto generate application password when asked from the editor #22470
Conversation
Generated by 🚫 Danger |
|
| App Name | WordPress | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr22470-be1c4de | |
| Commit | be1c4de | |
| Direct Download | wordpress-prototype-build-pr22470-be1c4de.apk |
|
| App Name | Jetpack | |
| Flavor | Jalapeno | |
| Build Type | Debug | |
| Version | pr22470-be1c4de | |
| Commit | be1c4de | |
| Direct Download | jetpack-prototype-build-pr22470-be1c4de.apk |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #22470 +/- ##
==========================================
- Coverage 39.13% 39.12% -0.01%
==========================================
Files 2204 2205 +1
Lines 106640 106684 +44
Branches 15134 15139 +5
==========================================
+ Hits 41734 41743 +9
- Misses 61407 61442 +35
Partials 3499 3499 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
EDIT: Outdated |
.../android/ui/accounts/login/applicationpassword/ApplicationPasswordAutoAuthDialogViewModel.kt
Show resolved
Hide resolved
.../android/ui/accounts/login/applicationpassword/ApplicationPasswordAutoAuthDialogViewModel.kt
Show resolved
Hide resolved
...s/android/ui/accounts/login/applicationpassword/ApplicationPasswordRequiredDialogActivity.kt
Show resolved
Hide resolved
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
|
EDIT: Outdated |
|
Claude finished @adalpari's task in 2m 37s —— View job Comprehensive Code Review Complete ✅I've completed a thorough review of this PR. Here's my analysis across the five focus areas: 1. Code Quality ⭐Positive Changes:
Issues Found: 🔴 Critical: Missing Error Toast on Dialog Dismissal
2. Security 🔒✅ No Major Security Issues Found Minor Observations:
3. Performance ⚡✅ No Performance Concerns
4. Testing 🧪Excellent Test Coverage Additions! The test file
Codecov Report Shows 20.40% Patch Coverage The main gap is in Recommendation: 5. Documentation 📚✅ Adequate Documentation
Minor Enhancement Suggestion: Summary of ReviewStrengths:
Action Items:
Overall Assessment: This is a solid implementation that successfully introduces auto-generation with proper fallback handling. The architecture is clean, tests are comprehensive, and the user flow is well thought out. The main improvements needed are around error messaging clarity and code style compliance. Previous Review Comments Status:
|
| ) { | ||
| val description = if (featureName != null) { | ||
| stringResource(R.string.application_password_required_description, featureName) + | ||
| stringResource(R.string.application_password_experimental_feature_note) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Style: Line Length Violation
This line exceeds the 120 character limit specified in CLAUDE.md. Consider breaking it into multiple lines:
val description = if (featureName != null) {
stringResource(R.string.application_password_required_description, featureName) +
" " + stringResource(R.string.application_password_experimental_feature_note)
} else {
stringResource(R.string.application_password_info_description_1) +
" " + stringResource(R.string.application_password_experimental_feature_note)
}Or use a more readable format:
val baseDescription = if (featureName != null) {
stringResource(R.string.application_password_required_description, featureName)
} else {
stringResource(R.string.application_password_info_description_1)
}
val description = "$baseDescription ${
stringResource(R.string.application_password_experimental_feature_note)
}"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
False positive.
| is ApplicationPasswordAutoAuthDialogViewModel.NavigationEvent.Error -> { | ||
| ToastUtils.showToast( | ||
| this@ApplicationPasswordRequiredDialogActivity, | ||
| R.string.error_generic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User Experience: Improve Error Message Specificity
The generic error message doesn't help users understand what went wrong or what to do next. Consider using a more specific message:
ToastUtils.showToast(
this@ApplicationPasswordRequiredDialogActivity,
R.string.application_password_creation_failed, // Create a new, specific string resource
ToastUtils.Duration.LONG
)The message should explain that automatic Application Password creation failed and that they may need to try the manual process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is expected as the user tried to generate an Application Password but something was unexpected with no extra information.
| } | ||
| } | ||
| } catch (e: Exception) { | ||
| appLogWrapper.e(AppLog.T.API, "Exception creating application password: ${e.message}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security: Potential Sensitive Data in Logs
Exception messages could contain sensitive information (usernames, partial credentials, site-specific data). Consider sanitizing or logging just the exception type:
appLogWrapper.e(AppLog.T.API, "Exception creating application password", e)This logs the stack trace for debugging without potentially exposing sensitive data in the message.
(Note: This was addressed in line 118 but not here - consider applying the same pattern for consistency)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a false positive as it's already addressed. See the error is e.message
|
|
|
@adalpari When I followed the steps above, the "Authenticate using application password" banner appeared after the password was created. Screen_recording_20260109_085051.mp4Also, after the password is created, shouldn't it navigate to the edit post screen? |
This seems to be a race condition (not always happening), but not related with the PR. I've noted it down to solve it in a different PR.
Same, this is not in the scope of this PR. I can have a look when fixing the banner bug though. |
nbradbury
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ![]()





Description
Updates the "Application Password Required" dialog to use automatic Application Password generation instead of redirecting to the browser for manual creation. When auto-generation fails, it falls back to the existing manual browser-based flow.
Key changes:
ApplicationPasswordRequiredDialogActivitynow usesApplicationPasswordAutoAuthDialogViewModelfor auto-generationTesting instructions
Auto-generation success flow:
Screen.Recording.2026-01-09.at.13.01.50.mov
Auto-generation fallback flow:
ApplicationPasswordAutoAuthDialogViewModel:createApplicationPassword()Screen.Recording.2026-01-09.at.13.00.30.mov