Skip to content

fix(sync2): pair a new device's Default only with Default - #1656

Merged
A-EDev merged 31 commits into
mainfrom
fix/sync2-welcome-default
Nov 2, 2026
Merged

A-EDev merged 31 commits into
mainfrom
fix/sync2-welcome-default

Conversation

@A-EDev

@A-EDev A-EDev commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

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.welcomeLink returns 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, its LinkedError and its string are removed.

Related issue

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Build, packaging, or CI
  • Documentation

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: passed
  • python3 .github/scripts/nightly_notes.py --check: valid
  • LinkedProfilesTest.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_offer replaces the NoProfileSynced check.
  • I manually tested the affected behavior on an Android device or emulator.

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_synced is removed from values/strings.xml; its one translation is left for Weblate to drop. Nightly note added.

  • The change does not introduce secrets, private data, or unexpected telemetry.
  • New user-facing text uses Android string resources.
  • Dependency and lockfile changes are intentional and limited to this PR.
  • Room schema changes include the required version bump and migration, or this PR does not change the Room schema.
  • Breaking changes and upgrade steps are clearly documented.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 16:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@github-actions github-actions Bot added documentation Improvements or additions to documentation ui Compose UI, theming, or Material 3 surfaces labels Nov 2, 2026
@github-actions github-actions Bot added sync Device-to-device sync build Gradle, dependencies, packaging, or R8 labels Nov 2, 2026
@A-EDev
A-EDev merged commit 9f6bf1c into main Nov 2, 2026
9 checks passed
@A-EDev
A-EDev deleted the fix/sync2-welcome-default branch November 2, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle, dependencies, packaging, or R8 documentation Improvements or additions to documentation sync Device-to-device sync ui Compose UI, theming, or Material 3 surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants