Handle sync logic on the displayed QR code page - #9328
Merged
Conversation
This was referenced Jul 29, 2026
Contributor
Author
17 tasks
Contributor
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 ad1ab62. Configure here.
MiSikora
force-pushed
the
feature/msikora/simple-sync/scan-code
branch
from
July 29, 2026 10:05
810a3e4 to
db63bde
Compare
MiSikora
force-pushed
the
feature/mehow/simple-sync/show-code-logic
branch
from
July 29, 2026 10:05
d88f3c2 to
1ab2e28
Compare
This was referenced Jul 29, 2026
CDRussell
approved these changes
Jul 30, 2026
Contributor
Author
Merge activity
|
MiSikora
changed the base branch from
feature/msikora/simple-sync/scan-code
to
graphite-base/9328
July 30, 2026 10:55
MiSikora
force-pushed
the
feature/mehow/simple-sync/show-code-logic
branch
from
July 30, 2026 11:12
b074d48 to
b271b3c
Compare
MiSikora
force-pushed
the
feature/mehow/simple-sync/show-code-logic
branch
from
July 30, 2026 12:10
b271b3c to
fb05324
Compare
This was referenced Jul 31, 2026
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Task/Issue URL: https://app.asana.com/1/137249556945/project/1215321458176118/task/1216422585541214?focus=true
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/project/1215321458176118/task/1216509582049467?focus=true
API Proposals URL(s) (if applicable): N/A
Description
Wires up the connection logic behind the QR code screen in the simplified Sync With Another Device flow.
Completing the connection:
canUseV2ConnectFlow,canShowV2ConnectCode), the legacy flow is used instead. After showing the code, the screen polls for the connection every 5 seconds and closes the flow in the same way once the other device connects. If polling fails with a connect or login error, an error dialog is shown.Copying and sharing the code:
Failure handling:
The screens now communicate through activity result contracts (
QrCodeContractandCodeExchangeContract) instead of plain intents, so the sync result can propagate back to Sync Settings.Steps to test this PR
Connect two devices via the QR code
Cancel the connection
Copy the code
Share the code
Legacy connect flow
canUseV2ConnectFlowandcanShowV2ConnectCodefeature flags.Note
Medium Risk
Changes device pairing confirmation, legacy polling, and multi-activity result propagation in the sync connect path—important user data flow but built on existing dispatcher/repository APIs.
Overview
Completes the Sync With Another Device QR screen by driving real connect/pairing behavior in
SyncExchangeViewModelandQrCodeActivity, instead of TODO stubs.V2 pairing: When another device uses the code, the QR screen shows host/joiner “Sync your data?” dialogs and forwards confirm/deny to
SyncCodeDispatcher. Successful login fires pixels, sets a success activity result, and closes the screen.Legacy (V1) path: If v2 connect flags are off, the screen still shows the QR code but polls
pollConnectionKeysevery 5 seconds until sync completes or connect/login errors surface.Copy & share: Copy uses sensitive clipboard handling with optional snackbar; share uses new
ShareAction.shareTextfor the plain-text linking URL. Both are no-ops until the code is loaded.Navigation:
QrCodeContractandCodeExchangeContractreplace raw intents soCodeExchangeActivityandSyncActivitycan close the stack on success/failure from the QR screen. Launch source is passed through assisted-injection on the exchange ViewModel for analytics.Reviewed by Cursor Bugbot for commit fb05324. Bugbot is set up for automated code reviews on this repo. Configure here.