Skip to content

Remove Application Password experimental feature flag#22721

Merged
adalpari merged 8 commits intotrunkfrom
feat/enable-ap-for-everyone
Mar 20, 2026
Merged

Remove Application Password experimental feature flag#22721
adalpari merged 8 commits intotrunkfrom
feat/enable-ap-for-everyone

Conversation

@adalpari
Copy link
Copy Markdown
Contributor

@adalpari adalpari commented Mar 20, 2026

Description

Enables Application Passwords for all users by removing the EXPERIMENTAL_APPLICATION_PASSWORD_FEATURE toggle from the experimental features screen. The feature is now always on — no opt-in required.

Changes:

  • Remove EXPERIMENTAL_APPLICATION_PASSWORD_FEATURE enum entry from ExperimentalFeatures.Feature
  • Remove all isEnabled / setEnabled checks for the flag across ViewModels and UI builders
  • Remove enableApplicationPasswordIfNecessary() from ApplicationPasswordAutoAuthDialogViewModel and ApplicationPasswordDialogViewModel
  • Remove application password dialog state (Info, Disable) and related methods from ExperimentalFeaturesViewModel
  • Remove experimentalFeatures constructor dependency from ApplicationPasswordViewModelSlice, ApplicationPasswordAutoAuthDialogViewModel, and ApplicationPasswordDialogViewModel
  • Clean up ExperimentalFeaturesActivity — no longer shows AP toggle dialogs
  • Update all affected tests

Testing instructions

Feature toggle removed:

  1. Open Settings → Experimental Features
  • Verify the "Application Password" toggle is no longer listed

Application Passwords work correctly by:

  • Log into a self-hosted site
  • Open Media
  • Open Application Password menu
  • Open categories and tags
  • ...

Enable Application Passwords for all users by removing the
EXPERIMENTAL_APPLICATION_PASSWORD_FEATURE toggle from the
experimental features screen.

- Remove feature enum entry and all isEnabled/setEnabled checks
- Remove enableApplicationPasswordIfNecessary() from dialog ViewModels
- Remove application password dialog state from ExperimentalFeaturesViewModel
- Remove experimentalFeatures dependency where no longer needed
- Update tests to reflect always-on behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dangermattic
Copy link
Copy Markdown
Collaborator

dangermattic commented Mar 20, 2026

2 Warnings
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

adalpari and others added 2 commits March 20, 2026 12:02
…lice

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…endency

- Remove ApplicationPasswordOffConfirmationDialog and
  ApplicationPasswordInfoDialog from ExperimentalFeaturesScreen
- Remove experimentalFeatures from SiteListItemBuilder constructor
- Clean up unused imports in source and test files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@adalpari
Copy link
Copy Markdown
Contributor Author

@claude

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 20, 2026

OUTDATED

adalpari and others added 2 commits March 20, 2026 12:40
Add missing imports (verticalScroll, rememberScrollState, TextAlign)
in ExperimentalFeaturesScreen after trunk merge, and remove orphaned
string resources from the AP feature flag removal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Clean up translated strings for experimental_application_password_feature
and application_password_disable_feature that were left behind after
removing the feature flag from the default strings.xml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Mar 20, 2026

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr22721-1542fed
Build Number1488
Application IDcom.jetpack.android.prealpha
Commit1542fed
Installation URL2holmp1bd0o60
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Mar 20, 2026

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr22721-1542fed
Build Number1488
Application IDorg.wordpress.android.prealpha
Commit1542fed
Installation URL7ujt35acrc798
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.35%. Comparing base (f05dc6b) to head (1542fed).
⚠️ Report is 4 commits behind head on trunk.

Files with missing lines Patch % Lines
...sword/ApplicationPasswordRequiredDialogActivity.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #22721      +/-   ##
==========================================
+ Coverage   37.34%   37.35%   +0.01%     
==========================================
  Files        2316     2316              
  Lines      123422   123273     -149     
  Branches    16723    16713      -10     
==========================================
- Hits        46093    46053      -40     
+ Misses      73627    73521     -106     
+ Partials     3702     3699       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@adalpari
Copy link
Copy Markdown
Contributor Author

@claude

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Mar 20, 2026

Claude finished @adalpari's task in 1m 45s —— View job


Code Review

  • Gather context and understand the PR
  • Review core Kotlin source files
  • Review test files
  • Review string resource removals
  • Post final review

Overall: This is a clean, well-scoped removal of a feature flag. The changes are consistent — the experimental toggle is fully excised from the feature enum, ViewModels, UI, and tests. The main Kotlin files look good. Two issues are worth addressing, one of which is a stale user-facing string.


Issues

1. Stale "Experimental Feature" messaging still shown to users

ApplicationPasswordRequiredDialogActivity.kt (lines 121 and 124) still appends application_password_experimental_feature_note to the dialog description in both branches:

stringResource(R.string.application_password_experimental_feature_note)

And in strings.xml:4597, that string reads:

\n\nNote: Application Password authentication on Android devices is an Experimental Feature.

Now that Application Passwords are always-on and no longer experimental, this note is stale and potentially misleading to users. This string (or at least its content) should be updated or removed from both the Kotlin file and strings.xml.

Fix this →

2. fastlane/resources/values/strings.xml not updated

Lines 976–977 of fastlane/resources/values/strings.xml still define:

  • experimental_application_password_feature
  • experimental_application_password_feature_description

If this file is used for screenshot automation that exercises the Experimental Features screen, this will be dead configuration after the toggle is removed. It's worth cleaning up for consistency (or verifying that this file is not exercising that screen).


Observations (no action needed)

  • The ExperimentalFeaturesViewModel shouldShowFeature() logic is cleanly preserved — the AP-specific branch was the only thing removed, and the block editor / post types logic is untouched.
  • Test cleanup is proportional: the deleted test lines correspond directly to removed production code, and the remaining tests cover the retained behaviour correctly.
  • No orphaned imports or unused constructor parameters left behind — the experimentalFeatures dependency was properly removed from ApplicationPasswordViewModelSlice, ApplicationPasswordAutoAuthDialogViewModel, and ApplicationPasswordDialogViewModel.

Application Passwords are now always-on, so the note telling users
it is an experimental feature is misleading. Removed the string
and its 24 translations, and stopped appending it in
ApplicationPasswordRequiredDialogActivity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@adalpari adalpari marked this pull request as ready for review March 20, 2026 12:52
@adalpari adalpari requested a review from nbradbury March 20, 2026 13:30
@adalpari adalpari enabled auto-merge (squash) March 20, 2026 13:32
@nbradbury
Copy link
Copy Markdown
Contributor

nbradbury commented Mar 20, 2026

@adalpari It looks like this string resource is still used but needs updating:

<string name="application_password_info_description_2">
New self-hosted sites added to the app are already using application passwords. 
Enabling this feature will also apply it to your existing sites.
</string>

Also, for future references, I don't think it's necessary to remove strings from the non-default language files. The localization process will take care of this for us.

The experimental feature context is no longer relevant now that
application passwords are enabled for everyone.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@adalpari
Copy link
Copy Markdown
Contributor Author

@adalpari It looks like this string resource is still used but needs updating:

<string name="application_password_info_description_2">
New self-hosted sites added to the app are already using application passwords. 
Enabling this feature will also apply it to your existing sites.
</string>

Changed! I've reverted the string to the previous version (before enabling AP just for newly added sites)

Also, for future references, I don't think it's necessary to remove strings from the non-default language files. The localization process will take care of this for us.

I was thinking that, but I got a warning from lint, so I went ahead with it just in case

Copy link
Copy Markdown
Contributor

@nbradbury nbradbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@sonarqubecloud
Copy link
Copy Markdown

@adalpari adalpari merged commit 0c9a9a3 into trunk Mar 20, 2026
19 of 22 checks passed
@adalpari adalpari deleted the feat/enable-ap-for-everyone branch March 20, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants