Add syncing with another device logic and navigation - #9343
Conversation
2ba2053 to
fa3dbe7
Compare
d6e490a to
0a7b4a6
Compare
fa3dbe7 to
8cd8843
Compare
0afa699 to
cb00a58
Compare
8cd8843 to
41e8be0
Compare
cb00a58 to
192192b
Compare
41e8be0 to
159ad98
Compare
192192b to
9c715f5
Compare
159ad98 to
94137bc
Compare
@MiSikora in this case you don't get to choose |
I don't really have a strong opinion about that. Both scenarios makes sense to me. If you have a preference either way I'm ok going with it. Perhaps it should be shown only if the device that shows QR code wasn't synced before? |
|
@MiSikora we'll pair on this as discussed soon, for posterity i think this can probably be auto-progressed instead of leaving it showing and requiring the user to tap it
|
94137bc to
4dccacb
Compare
9c715f5 to
2a09e23
Compare
4dccacb to
75ff030
Compare
84e4ea6 to
f555290
Compare
75ff030 to
015cca9
Compare
|
@CDRussell I added the recovery code final confirmation logic to #9356; it's in cbe610b. It was easier to resolve the git conflicts this way. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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 015cca9. Configure here.
f555290 to
6ee74a7
Compare
015cca9 to
4344ead
Compare
Merge activity
|
4344ead to
155c1eb
Compare



Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1216422585541215?focus=true
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/project/72649045549333/task/1216509582049467?focus=true
API Proposals URL(s) (if applicable): N/A
Description
Implements the pairing logic behind the connecting screen in the simplified sync flow. It also introduces a shared pairing result that travels back through the navigation tree to Sync Settings, which decides what to show when the flow finishes.
Connecting screen:
Pairing result and navigation:
SyncPairingResultcarries the outcome (the connected device, the elected role, and whether the code was scanned or displayed) from the leaf screens,ExchangeSyncCodeActivityandDisplayQrCodeActivity, up through the scan screen andSyncThisDeviceActivityback toSyncActivity.Steps to test this PR
Pair two devices by scanning a code
Add another device while sync is already enabled
Start from Sync This Device
Already paired error
UI changes
N/A
Note
Medium Risk
Changes sync account pairing, login outcomes, and multi-activity result handling in security-sensitive sync setup; scope is large but mostly UI/navigation with existing dispatcher/repository APIs.
Overview
Introduces
SyncPairingResultso scan/display pairing screens return a structured outcome (device, host/joiner role, scanned vs displayed code) instead of coarse success/failure result codes.ExchangeSyncCodeActivityis wired to a newExchangeSyncCodeViewModelthat routes V1/V2 codes, shows simplified pairing dialogs, runs the lock animation after confirmation, and finishes with that result.Activity result contracts (
DisplayQrCode,ExchangeSyncCode,ReadSyncCode,SyncThisDevice) now parseSyncCompleted/Dismissedand bubbleSyncPairingResultup the stack.SyncActivityhandles pairing completion: refresh devices, show recovery code only when the user scanned a code, reset setup on failure, and launch authenticated add another device via scan.SyncThisDeviceActivityopens the read-code flow instead of finishing with a redirect result.Reviewed by Cursor Bugbot for commit 155c1eb. Bugbot is set up for automated code reviews on this repo. Configure here.