Skip to content

feat(profiles): choose which profiles sync and link them - #1632

Merged
A-EDev merged 7 commits into
mainfrom
feat/profiles-sync-choice
Nov 1, 2026
Merged

A-EDev merged 7 commits into
mainfrom
feat/profiles-sync-choice

Conversation

@A-EDev

@A-EDev A-EDev commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Linked devices gets a Profiles card: a switch per profile here. Turning one on starts a new synced profile under its own id, or joins a profile synced from the other devices (its data merges). Synced profiles this device doesn't have can be added as new profiles, up to the profile limit.
  • Turning a profile off stops syncing it on this device, or on every device (a deleted profiles record); its data stays everywhere. One profile here keeps syncing; a deletion from another device is honored even for the last one, and the device then adds no new device until a profile is linked again.
  • The profiles collection names each link: canonical {"deleted","hlc","link","name"} records, merged last-writer-wins, with a blank name for a default profile never renamed (shown as Default; a link with no record shows as an unnamed profile). A rename on another device renames the profile here. Each device snapshots profiles, and garbage collection waits for that snapshot.
  • A new device's Default joins the member's running profile's link, else the first linked profile's. A restored device whose logs name several links lets the user choose in the same card.
  • Linked devices shows in every profile; one-time sync still runs only in Default and says so. The Profiles settings page marks every synced profile, not just Default. Change ledgers and brain merge state are stored per profile (same paths as before). Replacing a synced profile's data leaves the group, as it did for Default.

Related issue

Closes #1039

Change type

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

Validation

All Gradle runs used --offline -Dorg.gradle.jvmargs="-Xmx4096m -XX:MaxMetaspaceSize=1024m -Dfile.encoding=UTF-8 -Djava.net.preferIPv6Addresses=true".

  • ./gradlew :app:assembleGithubDebug: builds.
  • ./gradlew :app:testGithubDebugUnitTest: 4743 tests, 0 failures, 46 skipped. New: LinkedProfilesTest (linking, catching up only links already read, names and blank default names, last-writer-wins renames and deletions, the last profile staying linked, a deleted only link, the welcome link, profiles that are gone, adding a profile for a synced link) and the profiles wire test in ProfileLinksTest.
  • I ran any additional flavor-specific build or test tasks affected by this change: testFossDebugUnitTest 4700 tests, 0 failures, 46 skipped; ktlintCheck, spotlessCheck and lintGithubRelease pass; assembleFossRelease builds, FOSS arm64-v8a APK 21,827,008 B (budget 29,500,000 B); nightly_notes.py --check passes.
  • I manually tested the affected behavior on an Android device or emulator.

Test device and Android version:

Screenshots or recordings

Risk and compatibility

No schema change beyond the previous PR. sync_default_only_body is removed with its translations, as nothing shows it any more. The profiles records match Flow Desktop byte for byte (flow-sync spec "Profiles").

  • 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.

Device testing fix (flow-sync #65): a new device now joins the link of Default instead of the running profile, and only the running profile can start syncing, so a profile that is not in use offers "Switch to sync".

@github-actions github-actions Bot added documentation Improvements or additions to documentation ui Compose UI, theming, or Material 3 surfaces sync Device-to-device sync localization Translations and locale resources labels Oct 31, 2026
Copilot AI balanced review requested due to automatic review settings November 1, 2026 18:46

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.

@A-EDev
A-EDev changed the base branch from feat/sync2-batches-per-profile to main November 1, 2026 20:42
@A-EDev A-EDev closed this Nov 1, 2026
@A-EDev A-EDev reopened this Nov 1, 2026
@A-EDev
A-EDev merged commit b7d3a0e into main Nov 1, 2026
10 checks passed
@A-EDev
A-EDev deleted the feat/profiles-sync-choice branch November 1, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation localization Translations and locale resources 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.

[Feature]: Add support for multiple profiles

2 participants