Skip to content

Conversation

@hichamboushaba
Copy link
Member

@hichamboushaba hichamboushaba commented Sep 12, 2025

Closes WOOMOB-1338

Description

This PR replaces the local feature flag we used during development with a remote feature flag.

Steps to reproduce

For beta testers

Please check the testing steps here pe5sF9-4Am-p2

For PR reviewer

Assuming the PR feature flag is not merged yet 191072-ghe-Automattic/wpcom

  1. Apply the following patch to force enabling the feature (using an already enabled feature flag)
Patch
Index: WooCommerce/src/main/kotlin/com/woocommerce/android/util/IsRemoteFeatureFlagEnabled.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/util/IsRemoteFeatureFlagEnabled.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/util/IsRemoteFeatureFlagEnabled.kt
--- a/WooCommerce/src/main/kotlin/com/woocommerce/android/util/IsRemoteFeatureFlagEnabled.kt	(revision 96ecac1e677eb1d8e1f4a03797970e0886e1df21)
+++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/util/IsRemoteFeatureFlagEnabled.kt	(date 1757674313628)
@@ -18,8 +18,7 @@
             LOCAL_NOTIFICATION_1D_AFTER_FREE_TRIAL_EXPIRES,
             WOO_POS,
             APP_PASSWORDS_FOR_JETPACK_SITES ->
-                PackageUtils.isDebugBuild() ||
-                    wpComRemoteFeatureFlagRepository.isRemoteFeatureFlagEnabled(featureFlag.remoteKey)
+                    wpComRemoteFeatureFlagRepository.isRemoteFeatureFlagEnabled(WOO_POS.remoteKey)
         }
     }
 }
  1. Open the app and sign in using WordPress.com to a website that supports App Passwords.
  2. Intercept networks (using AS app inspector) and confirm the app uses App Passwords (communicates with the site directly using its URL)
  3. Open Settings -> Experimental features
  4. Confirm the "Application Passwords" toggle is shown.
  5. Reset changes of the patch applied at step 1 (which should disable the feature flag)
  6. Re-open the app.
  7. Intercept networks (using AS app inspector) and confirm the app uses Jetpack Proxy (communicates using public-api.wordpress.com
  8. Open Settings -> Experimental features
  9. Confirm the toggle is hidden.

Testing information

The above steps.

The tests that have been performed

The above.

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@hichamboushaba hichamboushaba added type: task An internally driven task. category: performance Related to performance such as slow loading. labels Sep 12, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 12, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commitdc2395b
Direct Downloadwoocommerce-wear-prototype-build-pr14610-dc2395b.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 12, 2025

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

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commitdc2395b
Direct Downloadwoocommerce-prototype-build-pr14610-dc2395b.apk

@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2025

Codecov Report

❌ Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.39%. Comparing base (230c05c) to head (dc2395b).
⚠️ Report is 7 commits behind head on trunk.

Files with missing lines Patch % Lines
...npasswords/WooApplicationPasswordsConfiguration.kt 0.00% 5 Missing ⚠️
...kotlin/com/woocommerce/android/util/FeatureFlag.kt 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #14610   +/-   ##
=========================================
  Coverage     38.39%   38.39%           
  Complexity     9724     9724           
=========================================
  Files          2059     2059           
  Lines        115273   115276    +3     
  Branches      15339    15339           
=========================================
+ Hits          44260    44262    +2     
- Misses        66913    66914    +1     
  Partials       4100     4100           

☔ 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.

@hichamboushaba hichamboushaba marked this pull request as ready for review September 12, 2025 14:47
@hichamboushaba hichamboushaba added this to the 23.3 milestone Sep 12, 2025
@AdamGrzybkowski AdamGrzybkowski self-assigned this Sep 15, 2025
Copy link
Contributor

@AdamGrzybkowski AdamGrzybkowski left a comment

Choose a reason for hiding this comment

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

:shipit:

@hichamboushaba hichamboushaba merged commit 2d6be84 into trunk Sep 15, 2025
15 of 17 checks passed
@hichamboushaba hichamboushaba deleted the issue/WOOMOB-1338-jp-performance-remote-flag branch September 15, 2025 12:24
@sentry
Copy link

sentry bot commented Sep 18, 2025

Issues attributed to commits in this pull request

This pull request was merged and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: performance Related to performance such as slow loading. type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants