Skip to content

refactor(sync): keep linked devices state per device - #1629

Merged
1 commit merged into
mainfrom
refactor/sync2-device-state
Nov 1, 2026
Merged

1 commit merged into
mainfrom
refactor/sync2-device-state

Conversation

@A-EDev

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

Copy link
Copy Markdown
Collaborator

Summary

  • Linked-devices state belongs to the device: the linked_store folder moves to device scope (Default's path is unchanged) and the inventory marks it and linked_devices as DEVICE.
  • The linked sync, the LAN service, the live socket and the sync worker run in every profile. Outside Default a run keeps the group up to date (roster, rotation, uploads, garbage collection, join requests) but sends and applies nothing, since only Default is linked until profiles choose their links.
  • Now playing names no link outside Default.
  • A profile switch waits while a linked sync runs, as it already did for one-time sync.

Related issue

Part of #1039 (Phase 6 of FLOW-SYNC/2).

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: not run on this branch; the top of the stack builds it.
  • ./gradlew :app:testGithubDebugUnitTest: 4721 tests, 0 failures, 46 skipped.
  • I ran any additional flavor-specific build or test tasks affected by this change: testFossDebugUnitTest 4678 tests, 0 failures, 46 skipped; ktlintCheck, spotlessCheck and lintGithubRelease pass; assembleFossRelease builds, FOSS arm64-v8a APK 21,803,740 B (budget 29,500,000 B).
  • I manually tested the affected behavior on an Android device or emulator.

Test device and Android version:

Risk and compatibility

No schema change. Storage paths are unchanged for Default; another profile now reads the device's linked_store instead of an unused private copy.

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

@A-EDev A-EDev closed this pull request by merging all changes into main in b7d3a0e Nov 1, 2026
@A-EDev
A-EDev deleted the refactor/sync2-device-state 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant