-
Notifications
You must be signed in to change notification settings - Fork 998
Update subscription flow welcome page #6260
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
Update subscription flow welcome page #6260
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5b661fe
to
5c2085c
Compare
51200d7
to
3d70b4e
Compare
5c2085c
to
e67d09d
Compare
e67d09d
to
f4f1ba0
Compare
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.
Pull Request Overview
Adds support for capturing and acting on a new “Duck AI” feature selection during the subscription welcome flow, including pixel reporting, ViewModel/Activity handling, and JS messaging extensions.
- Introduces a DUCK_AI constant and corresponding pixel event for onboarding clicks.
- Extends
SubscriptionWebViewViewModel
andSubscriptionsWebViewActivity
to emit and handle a newGoToDuckAI
command usingDuckChat
. - Adds two new JS message handlers (
getAuthAccessToken
andgetFeatureConfig
) and feature toggles (duckAiPlus
,subscriptionMessagingV2
).
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
subscriptions-impl/src/test/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionWebViewViewModelTest.kt | Tests for GoToDuckAI command emission and pixel reporting |
subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionsWebViewActivity.kt | Injects DuckChat , handles GoToDuckAI by calling openDuckChat() |
subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionWebViewViewModel.kt | Maps DUCK_AI to GoToDuckAI and dispatches onboarding Duck AI pixel |
subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/pixels/SubscriptionPixelSender.kt | Adds reportOnboardingDuckAiClick() to interface and implementation |
subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/pixels/SubscriptionPixel.kt | Defines ONBOARDING_DUCK_AI_CLICK pixel entry |
subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt | Adds GetAuthAccessTokenMessage & GetFeatureConfigMessage handlers and imports PrivacyProFeature |
subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsConstants.kt | Defines DUCK_AI constant |
subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/RealSubscriptions.kt | Introduces duckAiPlus() and subscriptionMessagingV2() toggles |
subscriptions-impl/build.gradle | Adds dependency on :duckchat-api |
Comments suppressed due to low confidence (1)
subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt:319
- No unit tests cover the new GetAuthAccessTokenMessage and GetFeatureConfigMessage handlers. Consider adding tests to verify both the success and failure JSON responses for these methods.
private inner class GetAuthAccessTokenMessage(
.../src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt
Outdated
Show resolved
Hide resolved
.../src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt
Outdated
Show resolved
Hide resolved
.../src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt
Outdated
Show resolved
Hide resolved
f4f1ba0
to
ce12760
Compare
ce12760
to
e2d9848
Compare
1a42fd5
to
9a53001
Compare
e2d9848
to
bb2959d
Compare
9a53001
to
7026706
Compare
f3f9d77
to
2c15ec1
Compare
bb2959d
to
2cf9ff5
Compare
f21a2d9
into
feature/cristian/subscriptions/show_duck_ai_pro_settings
Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1210461583262419?focus=true ### Description Updates JS messaging in subscription flows welcome pages. Touched methods: - ~Adds getAuthAccessToken~ - Adds getFeatureConfig - Adds Duck.ai support in featureSelected Feature flagging: - ~privacyProFeature.subscriptionMessaging() -> enables getFeatureConfig~ - privacyProFeature.duckAiPlus() -> signales FE Duck.ai is enabled - Token is not affected by FF ### Steps to test this PR _Feature 1_ - [x] apply patch attached in the Asana task (that will target staging and specific FE sandbox) - [x] install the branch - [x] Ensure you don't have a subscription - [x] Start purchase a subscription - [x] In the landing page, scroll to the bottom. - [x] Ensure Duck.ai appears in the comparison chart. - [x] Purchase a subscription - [x] After purchase, welcome page should list Duck.ai as a card - [x] Click on the Card - [x] Ensure pixel `m_privacy-pro_welcome_paid-ai-chat_click` emits - [x] Ensure you navigate to Duck chat (this branch doesn't have the code to signal the token so you won't see the subscriber mode) _Feature 2_ - [x] Go to feature flags and disable privacypro - duckAiPlus - [x] Cancel and delete your subscription - [x] Repeat the process again - [x] Ensure in Landing page comparison chart, Duck.ai doesn't show. - [x] Ensure when subscription is purchased, there's no Duck.ai card _Feature 3_ - [x] Remove all files changed in previous patch - [x] Apply standard patch from https://app.asana.com/1/137249556945/project/1209991789468715/task/1210448620621729?focus=true (no FE sandbox) - [x] install the branch - [x] Ensure you don't have a subscription - [x] Purchase a subscription - [x] ensure purchase succeeds - [x] ensure no duck.ai is present ### UI changes | Before | After | | ------ | ----- | !(Upload before screenshot)|(Upload after screenshot)|
Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1210461583262419?focus=true ### Description Updates JS messaging in subscription flows welcome pages. Touched methods: - ~Adds getAuthAccessToken~ - Adds getFeatureConfig - Adds Duck.ai support in featureSelected Feature flagging: - ~privacyProFeature.subscriptionMessaging() -> enables getFeatureConfig~ - privacyProFeature.duckAiPlus() -> signales FE Duck.ai is enabled - Token is not affected by FF ### Steps to test this PR _Feature 1_ - [x] apply patch attached in the Asana task (that will target staging and specific FE sandbox) - [x] install the branch - [x] Ensure you don't have a subscription - [x] Start purchase a subscription - [x] In the landing page, scroll to the bottom. - [x] Ensure Duck.ai appears in the comparison chart. - [x] Purchase a subscription - [x] After purchase, welcome page should list Duck.ai as a card - [x] Click on the Card - [x] Ensure pixel `m_privacy-pro_welcome_paid-ai-chat_click` emits - [x] Ensure you navigate to Duck chat (this branch doesn't have the code to signal the token so you won't see the subscriber mode) _Feature 2_ - [x] Go to feature flags and disable privacypro - duckAiPlus - [x] Cancel and delete your subscription - [x] Repeat the process again - [x] Ensure in Landing page comparison chart, Duck.ai doesn't show. - [x] Ensure when subscription is purchased, there's no Duck.ai card _Feature 3_ - [x] Remove all files changed in previous patch - [x] Apply standard patch from https://app.asana.com/1/137249556945/project/1209991789468715/task/1210448620621729?focus=true (no FE sandbox) - [x] install the branch - [x] Ensure you don't have a subscription - [x] Purchase a subscription - [x] ensure purchase succeeds - [x] ensure no duck.ai is present ### UI changes | Before | After | | ------ | ----- | !(Upload before screenshot)|(Upload after screenshot)|
Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1210461583262419?focus=true ### Description Updates JS messaging in subscription flows welcome pages. Touched methods: - ~Adds getAuthAccessToken~ - Adds getFeatureConfig - Adds Duck.ai support in featureSelected Feature flagging: - ~privacyProFeature.subscriptionMessaging() -> enables getFeatureConfig~ - privacyProFeature.duckAiPlus() -> signales FE Duck.ai is enabled - Token is not affected by FF ### Steps to test this PR _Feature 1_ - [x] apply patch attached in the Asana task (that will target staging and specific FE sandbox) - [x] install the branch - [x] Ensure you don't have a subscription - [x] Start purchase a subscription - [x] In the landing page, scroll to the bottom. - [x] Ensure Duck.ai appears in the comparison chart. - [x] Purchase a subscription - [x] After purchase, welcome page should list Duck.ai as a card - [x] Click on the Card - [x] Ensure pixel `m_privacy-pro_welcome_paid-ai-chat_click` emits - [x] Ensure you navigate to Duck chat (this branch doesn't have the code to signal the token so you won't see the subscriber mode) _Feature 2_ - [x] Go to feature flags and disable privacypro - duckAiPlus - [x] Cancel and delete your subscription - [x] Repeat the process again - [x] Ensure in Landing page comparison chart, Duck.ai doesn't show. - [x] Ensure when subscription is purchased, there's no Duck.ai card _Feature 3_ - [x] Remove all files changed in previous patch - [x] Apply standard patch from https://app.asana.com/1/137249556945/project/1209991789468715/task/1210448620621729?focus=true (no FE sandbox) - [x] install the branch - [x] Ensure you don't have a subscription - [x] Purchase a subscription - [x] ensure purchase succeeds - [x] ensure no duck.ai is present ### UI changes | Before | After | | ------ | ----- | !(Upload before screenshot)|(Upload after screenshot)|
Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1210461583262419?focus=true ### Description Updates JS messaging in subscription flows welcome pages. Touched methods: - ~Adds getAuthAccessToken~ - Adds getFeatureConfig - Adds Duck.ai support in featureSelected Feature flagging: - ~privacyProFeature.subscriptionMessaging() -> enables getFeatureConfig~ - privacyProFeature.duckAiPlus() -> signales FE Duck.ai is enabled - Token is not affected by FF ### Steps to test this PR _Feature 1_ - [x] apply patch attached in the Asana task (that will target staging and specific FE sandbox) - [x] install the branch - [x] Ensure you don't have a subscription - [x] Start purchase a subscription - [x] In the landing page, scroll to the bottom. - [x] Ensure Duck.ai appears in the comparison chart. - [x] Purchase a subscription - [x] After purchase, welcome page should list Duck.ai as a card - [x] Click on the Card - [x] Ensure pixel `m_privacy-pro_welcome_paid-ai-chat_click` emits - [x] Ensure you navigate to Duck chat (this branch doesn't have the code to signal the token so you won't see the subscriber mode) _Feature 2_ - [x] Go to feature flags and disable privacypro - duckAiPlus - [x] Cancel and delete your subscription - [x] Repeat the process again - [x] Ensure in Landing page comparison chart, Duck.ai doesn't show. - [x] Ensure when subscription is purchased, there's no Duck.ai card _Feature 3_ - [x] Remove all files changed in previous patch - [x] Apply standard patch from https://app.asana.com/1/137249556945/project/1209991789468715/task/1210448620621729?focus=true (no FE sandbox) - [x] install the branch - [x] Ensure you don't have a subscription - [x] Purchase a subscription - [x] ensure purchase succeeds - [x] ensure no duck.ai is present ### UI changes | Before | After | | ------ | ----- | !(Upload before screenshot)|(Upload after screenshot)|
Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1210461583262419?focus=true
Description
Updates JS messaging in subscription flows welcome pages.
Touched methods:
Adds getAuthAccessTokenFeature flagging:
privacyProFeature.subscriptionMessaging() -> enables getFeatureConfigSteps to test this PR
Feature 1
m_privacy-pro_welcome_paid-ai-chat_click
emitsFeature 2
Feature 3
UI changes