Skip to content

New feature flag for welcome discovery (WD)#2834

Merged
wmathurin merged 2 commits intoforcedotcom:devfrom
wmathurin:dev
Feb 6, 2026
Merged

New feature flag for welcome discovery (WD)#2834
wmathurin merged 2 commits intoforcedotcom:devfrom
wmathurin:dev

Conversation

@wmathurin
Copy link
Contributor

No description provided.

@@ -901,6 +902,20 @@ open class LoginActivity : FragmentActivity() {
*/
private fun applySalesforceWelcomeDiscoveryIntent(intent: Intent) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JohnsonEricAtSalesforce Does this look like the right place?
From my debugging, this method always gets called: for regular logins, and also for 1st or 2nd part of login with welcome discovery.

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 63.30%. Comparing base (d42772e) to head (68cfc80).
⚠️ Report is 3 commits behind head on dev.

Files with missing lines Patch % Lines
.../src/com/salesforce/androidsdk/ui/LoginActivity.kt 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #2834      +/-   ##
============================================
+ Coverage     63.24%   63.30%   +0.05%     
- Complexity     2825     2836      +11     
============================================
  Files           216      216              
  Lines         16982    16996      +14     
  Branches       2418     2420       +2     
============================================
+ Hits          10741    10760      +19     
+ Misses         5072     5068       -4     
+ Partials       1169     1168       -1     
Components Coverage Δ
Analytics 47.92% <ø> (ø)
SalesforceSDK 56.47% <93.33%> (+0.12%) ⬆️
Hybrid 59.05% <ø> (ø)
SmartStore 78.20% <ø> (ø)
MobileSync 81.68% <ø> (ø)
React 52.36% <ø> (ø)
Files with missing lines Coverage Δ
...DK/src/com/salesforce/androidsdk/app/Features.java 0.00% <ø> (ø)
.../src/com/salesforce/androidsdk/ui/LoginActivity.kt 45.21% <93.33%> (+2.10%) ⬆️

... and 1 file with indirect coverage changes

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

Comment on lines 916 to 917
// Re-apply user agent to WebView
webView.settings.userAgentString = SalesforceSDKManager.getInstance().userAgent
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR, just thinking out loud: It would be awesome to use LiveData to make this happen automatically so we don't accidentally forget to update the WebView. Just like how the login url the WebView uses gets automatically generated when the selected server changes, registering/unregistering a feature flag (and potentially other things) should regenerate and set the value in the WebView.

@brandonpage
Copy link
Contributor

@wmathurin Looks like the LoginActivityScenarioTest.testWebviewSettings test needs to be updated to reflect the change to the user agent string.

@wmathurin
Copy link
Contributor Author

@wmathurin Looks like the LoginActivityScenarioTest.testWebviewSettings test needs to be updated to reflect the change to the user agent string.

Fixed by 68cfc80

assertTrue(activity.switchDefaultOrSalesforceWelcomeDiscoveryLogin(PRODUCTION_LOGIN_URL.toUri()))
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New tests checking the feature flag on the user agent for various scenario:

  • welcome discovery login server
  • my domain login server hint (that happens in part 2 of wsc disco flow)
  • my domain login server (should not have the WD feature flag)

@wmathurin
Copy link
Contributor Author

@wmathurin wmathurin merged commit b38f198 into forcedotcom:dev Feb 6, 2026
18 of 20 checks passed
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.

2 participants