Repository navigation
fix(sync2): pair a new device's Default only with Default - #1656
Merged
Merged
Conversation
…evice's within it
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Summary
Found in Phase 7 device testing: a Mac that created its group while running Profile 2 had only Profile 2 linked, and the phone that joined had its Default merged into the Mac's Profile 2, because the welcome carried "Default's link, else the first profile that syncs". This device has the same rule as the member side.
Following Flow-Tube/flow-sync#79,
LinkedProfiles.welcomeLinkreturns Default's link when Default syncs here, and otherwise a new link id: the new device's Default starts its own synced profile and never joins another one. Since a welcome can always be built now,LinkedException.NoProfileSynced, itsLinkedErrorand its string are removed.Related issue
Change type
Validation
./gradlew :app:assembleGithubDebug: not run on this branch; CI builds the APK./gradlew --offline :app:testGithubDebugUnitTest --tests 'io.github.aedev.flow.sync2.*' --tests 'io.github.aedev.flow.sync.*': 319 tests, 0 failures./gradlew --offline ktlintCheck: passedpython3 .github/scripts/nightly_notes.py --check: validLinkedProfilesTest.a_new_device_joins_default_s_link_whichever_profile_runs_and_never_another_one(was..._or_the_first_one_synced, which asserted the old rule) now checks that with Default unlinked the welcome link is neither Default's old link nor the other profile's.a_deleted_only_link_leaves_this_device_with_none_and_a_new_link_to_offerreplaces theNoProfileSyncedcheck.Test device and Android version: bug reproduced on the owner's phone (Android 16) with the Mac test app; the fix is not device-tested yet
Risk and compatibility
No wire change. Nothing is linked without the user's choice.
linked_error_no_profile_syncedis removed fromvalues/strings.xml; its one translation is left for Weblate to drop. Nightly note added.