[MS-1044] CoSync Background Syncing - Phase 1 (MVP)#1247
Conversation
dd127ea to
6900f70
Compare
e3522eb to
25c9d22
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR implements the first phase (MVP) of CoSync background syncing by adding support for CommCare as an alternative sync source alongside the existing Simprints backend integration. The key changes include refactoring the sync infrastructure to support multiple sync providers, implementing CommCare content provider integration, and introducing proper permission handling for CommCare access.
Key changes:
- Refactored sync architecture to support multiple providers (Simprints and CommCare)
- Implemented CommCare content provider integration for syncing data
- Added permission handling for CommCare access in setup flow
Reviewed Changes
Copilot reviewed 93 out of 93 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| infra/sync/src/main/java/com/simprints/infra/sync/config/usecase/ResetLocalRecordsIfConfigChangedUseCase.kt | Enhanced to detect sync source changes between Simprints and CommCare |
| infra/event-sync/src/main/java/com/simprints/infra/eventsync/sync/master/EventSyncMasterWorker.kt | Updated master worker to support both Simprints and CommCare sync workflows |
| infra/event-sync/src/main/java/com/simprints/infra/eventsync/sync/down/workers/ | Created base worker class and specialized implementations for Simprints and CommCare |
| infra/event-sync/src/main/java/com/simprints/infra/eventsync/event/commcare/CommCareEventDataSource.kt | New CommCare content provider integration for data fetching |
| infra/config-store/src/main/proto/project_config.proto | Extended configuration to support CommCare sync configuration |
| feature/setup/src/main/java/com/simprints/feature/setup/screen/ | Enhanced setup flow to request CommCare permissions when needed |
| infra/resources/src/main/res/values/strings.xml | Added CommCare-specific UI strings and renamed generic strings |
25c9d22 to
38ad617
Compare
luhmirin-s
left a comment
There was a problem hiding this comment.
All things considered, LGTM.
Left a couple of nitpicks, suggestions and questions that I would prefer to resolve before approving.
ffbfeff to
b065cea
Compare
b065cea to
20d2704
Compare
…ions and content provider URIs
0312c4d to
e529332
Compare
…mmCare and make both down.CommCare and down.Simprints optional
e529332 to
30057b8
Compare
802dc12 to
ee7ae0d
Compare
|



JIRA ticket
Will be released in: 2025.3.0
Notable changes
This is the first phase of CoDownSync - sort of an MVP where background syncing from CommCare works but in a "dumb" way where all records are fetched every time. Optimizations to this process will happen in Phase 2.
See CoPilot's (surprisingly good) description of the PR changes below.
Testing guidance
Additional work checklist