Skip to content

Add simplified device backup flow#9210

Open
MiSikora wants to merge 2 commits into
developfrom
feature/mehow/simple-sync/backup-device
Open

Add simplified device backup flow#9210
MiSikora wants to merge 2 commits into
developfrom
feature/mehow/simple-sync/backup-device

Conversation

@MiSikora

@MiSikora MiSikora commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Task/Issue URL: https://app.asana.com/1/137249556945/project/1216103556496795/task/1216422585541210?focus=true
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/project/1216103556496795/task/1216509582049467?focus=true

Description

Adds the "back up this device" flow to the simplified sync UI. When a signed-out user turns on the Sync this device toggle on the new sync settings screen, they now go through a dedicated intro screen and can create a sync account to back this device up.

Added:

  • Sync This Device intro screen (SyncThisDeviceActivity) with two CTAs — "Sync With Another Device" and "Sync This Device Only".
  • Account creation ("Sync This Device Only") — creates the sync account and reports into the sync-setup wide-event funnel.
  • Toggle → flow wiring in the v2 SyncActivity via SyncThisDeviceContract (ActivityResultContract), including device authentication, device-unsupported and passcode-enrollment guards.

Not implemented here (follow-up PRs):

  • The recovery code screen is a placeholder (RecoveryCodeActivity). A successful backup routes to it, but showing/saving the recovery code (and the PDF) will come in its own PR — I'd rather isolate it.
  • The Sync With Another Device button on the intro screen isn't wired to the pairing flow yet (it currently returns to settings).

Steps to test this PR

Back up this device (simplified sync)

  • Go to the "Sync Dev Settings".
  • Tap "Launch Sync Settings V2".
  • Toggle "Sync & Backup this device".
  • Confirm the intro screen shows both CTAs.
  • Tap the X on the intro screen.
  • Confirm that it returns to settings with the toggle unchecked.
  • Toggle "Sync & Backup this device".
  • Tap "Sync This Device Only".
  • Complete device authentication.
  • Confirm the account is created (device shows as backed up / signed in).

UI changes

Intro page Syncing state
pre post

Note

Medium Risk
Touches sync account creation, device authentication, and signup analytics on a new user-facing path; recovery and several v2 settings commands are still unimplemented.

Overview
Adds the simplified “back up this device” path on sync settings v2: turning on Sync & Backup this device runs device-auth / passcode enrollment checks, then opens a dedicated intro via SyncThisDeviceContract.

Sync This Device intro (SyncThisDeviceActivity) offers Sync With Another Device (returns to settings; pairing not wired yet) and Sync This Device Only, which creates a sync account through SyncAccountRepository, shows a syncing state, and emits sync-setup wide events and signup pixels. Cancel or dismiss resets the settings toggle via new SyncThisDeviceCanceled handling in v2 SyncActivity (legacy sync activity ignores that command).

Successful backup refreshes the device list and navigates to a placeholder RecoveryCodeActivity. Most other v2 SyncActivity commands remain TODO stubs. Manifest registers the new activities; strings and layout support the intro screen.

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

MiSikora commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e3ebb11. Configure here.

Comment thread sync/sync-impl/src/main/AndroidManifest.xml
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