Add simplified device backup flow#9210
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
36585da to
1e0ae38
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 1e0ae38. Configure here.
|
|
||
| private val syncThisDeviceListener = OnCheckedChangeListener { _, isChecked -> | ||
| if (isChecked) viewModel.onSyncThisDevice(launchSource) | ||
| } |
There was a problem hiding this comment.
Unchecking toggle won't cancel flow
Medium Severity
syncThisDeviceListener only calls onSyncThisDevice when the switch is checked. Turning the toggle off during an in-progress setup does not invoke onSyncThisDeviceCanceled or onConnectionCancelled, so auth or SyncThisDeviceActivity can still run while the UI shows sync off.
Reviewed by Cursor Bugbot for commit 1e0ae38. Configure here.



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:
SyncThisDeviceActivity) with two CTAs — "Sync With Another Device" and "Sync This Device Only".SyncActivityviaSyncThisDeviceContract(ActivityResultContract), including device authentication, device-unsupported and passcode-enrollment guards.Not implemented here (follow-up PRs):
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.Steps to test this PR
Back up this device (simplified sync)
UI changes
Note
Medium Risk
Creates sync accounts and runs device authentication in user-facing flows; recovery code handling is stubbed and several other v2 sync commands remain unimplemented.
Overview
Adds the simplified “back up this device” path on Sync Settings v2: turning on Sync & Backup this device runs the existing setup checks, then device auth, then a new intro screen instead of the legacy setup intro.
Sync this device intro (
SyncThisDeviceActivity) offers Sync With Another Device (returns a dedicated result; pairing is not wired yet) and Sync This Device Only, which callsSyncAccountRepository.createAccount(), shows a syncing state on the CTA, and emits sync-setup wide events and signup pixels. Results flow back throughSyncThisDeviceContractinto v2SyncActivity, which refreshes devices on success and opens a placeholderRecoveryCodeActivity.Toggle UX: canceling auth, closing the intro, or dismissing passcode enrollment triggers
SyncThisDeviceCanceled, which unchecks the toggle on v2 (legacySyncActivityignores this command). Manifest registers the new activities; copy and artwork support the intro layout.Tests cover
SyncThisDeviceViewModelaccount/signup/error paths andonSyncThisDeviceCanceledon the shared view model.Reviewed by Cursor Bugbot for commit 1e0ae38. Bugbot is set up for automated code reviews on this repo. Configure here.