Skip to content

Move Google passwords import pixels to the import web flow - #9674

Merged
catalinradoiu merged 3 commits into
developfrom
refactor/cradoiu/move-passwords-import-pixels
Sep 12, 2026
Merged

catalinradoiu merged 3 commits into
developfrom
refactor/cradoiu/move-passwords-import-pixels

Conversation

@catalinradoiu

@catalinradoiu catalinradoiu commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Task/Issue URL: https://app.asana.com/1/137249556945/project/1202552961248957/task/1218056082137357?focus=true
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/project/481882893211075/task/1217143698674642
API Proposals URL(s) (if applicable): None

Description

Moves the Google Password Manager import result pixels from the consumers of the import web flow into the web flow itself, so that new consumers (like the onboarding passwords import step) don't need their own import pixel logic.

  • The user-cancelled, CSV-parsing-error and WebView-crash pixels now fire from ImportGooglePasswordsWebFlowViewModel, which receives the launch source via assisted injection (activity params → fragment args → assisted factory).
  • The import success pixel now fires from a new app-scoped ImportPasswordsResultPixelObserver that observes CredentialImporter.getImportStatus() from process start, with the launch source carried in ImportResult.Finished. This keeps the pixel firing even though the import outlives the screen that started it.
  • ImportFromGooglePasswordsDialog(ViewModel) no longer fires the result pixels; the pre-import prompt pixels stay there since that prompt is the dialog's own UI.
  • Registers the existing import pixels (plus the new onboarding source value) in PixelDefinitions/pixels/definitions/autofill.json5.

Steps to test this PR

Import from password management

  • Settings → Passwords → import passwords from Google → complete the web flow; verify autofill_import_google_passwords_result_success fires once with bucketed saved_credentials/skipped_credentials and the correct source
  • Start the web flow and cancel it; verify autofill_import_google_passwords_result_user_cancelled fires once with the web flow stage and source

Import from onboarding

  • Apply the following patch
NewUserOnboardingPlanProvider.kt — force-enable password import steps
diff --git a/app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt b/app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt
--- a/app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt
+++ b/app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt
@@ -202,7 +202,7 @@
                     add(widgetPromptStep(ctx))
                     add(addWidgetStep(ctx))
                 }
-                if (showPasswordImport) {
+                if (true) {
                     add(passwordImportStep(ctx))
                     add(passwordImportLaunchStep(ctx))
                     add(passwordImportCompleteStep(ctx))
  • Fresh install with the onboarding password import step enabled → run the import from onboarding; verify the same result pixels fire with source=onboarding

UI changes

Before After
No UI changes No UI changes

Note

Medium Risk
Changes where import outcome pixels fire and extends the credential import API with launch source; risk is mainly duplicate or missed telemetry if replay/collection timing is wrong, not credential handling logic.

Overview
Centralizes Google Password Manager import telemetry so new entry points (e.g. onboarding) do not duplicate pixel logic.

Pixel definitions in autofill.json5 now document the pre-import prompt, success (bucketed counts), user-cancelled (stage + source), CSV parse failure, and WebView crash events, including an onboarding launch source.

Web flow threads AutofillImportLaunchSource from activity params → fragment args → assisted ImportGooglePasswordsWebFlowViewModel, which fires cancel, parse error, and WebView crash pixels. CredentialImporter takes source and includes it on ImportResult.Finished; a new app-scoped ImportPasswordsResultPixelObserver emits the success pixel after bulk insert completes (even if the starting screen is gone). ImportFromGooglePasswordsDialog no longer fires result pixels (pre-import prompt pixels stay). ImportPasswordsPixelSender moves to AppScope.

Onboarding only renames onContentBoundonBeforeContentBound in the config-driven content controller hook.

Reviewed by Cursor Bugbot for commit 72203d3. Bugbot is set up for automated code reviews on this repo. Configure here.

catalinradoiu commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions

Copy link
Copy Markdown
Contributor

Privacy Review task: https://app.asana.com/0/69071770703008/1218020222494663

Base automatically changed from feature/cradoiu/onboarding-password-import-flow to develop September 3, 2026 16:15
@catalinradoiu

Copy link
Copy Markdown
Contributor Author

Will update this #9624 (comment) as part of this PR.

@catalinradoiu
catalinradoiu force-pushed the refactor/cradoiu/move-passwords-import-pixels branch from 59b1c57 to e5e78d0 Compare September 7, 2026 14:29
@catalinradoiu
catalinradoiu marked this pull request as ready for review September 8, 2026 09:14
private val binding: PreOnboardingDaxDialogCtaBrandDesignUpdateBinding,
private val contentValues: ContentValueStore,
private val onContentBound: (LinearOnboardingStepId, ContentConfig) -> Unit,
private val onBeforeContentBound: (LinearOnboardingStepId, ContentConfig) -> Unit,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Follow-up after #9624 (comment)

@catalinradoiu
catalinradoiu force-pushed the refactor/cradoiu/move-passwords-import-pixels branch 2 times, most recently from 41e0e28 to a45caf8 Compare September 11, 2026 10:47
catalinradoiu and others added 3 commits September 11, 2026 13:49
Result pixels (user cancelled, CSV parsing error, WebView crash) now fire
from ImportGooglePasswordsWebFlowViewModel, which receives the launch
source via assisted injection. The import success pixel fires from an
app-scoped observer of the credential importer's status flow, so
consumers of the web flow no longer need import pixel logic of their own.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The callback fires at the top of ContentControllerImpl.bind, before the
binder renders, so the resolved content state is ready for the bind. The
name now reflects that ordering.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@catalinradoiu
catalinradoiu force-pushed the refactor/cradoiu/move-passwords-import-pixels branch from a45caf8 to 72203d3 Compare September 11, 2026 10:53
@catalinradoiu
catalinradoiu added this pull request to the merge queue Sep 12, 2026
Merged via the queue into develop with commit 8b013e5 Sep 12, 2026
21 checks passed
@catalinradoiu
catalinradoiu deleted the refactor/cradoiu/move-passwords-import-pixels branch September 12, 2026 01:47
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.

2 participants