Pending sync
Shows offline changes still waiting to be sent to the server, grouped by type with attempt counts.
FactsheetSupport & admin
- Who uses it
- CadreUnit In-Charge / FMT L1
- How you get here
- Sync icon on the Home bottom bar, or Check Sync in the device-conflict dialog.
- APIs
- 0 calls today, 8 App Service operations
- Offline
- Fully offline; reads the Bridge sync queue.
Screens
| Screen | What it does | Source |
|---|---|---|
| Pending Sync | Sectioned list of queued operations. | app/src/main/java/org/platformcommons/urvi/view/pendingsync/PendingSyncActivity.kt |
Rules
Conditions from the code, rewritten as plain decision rules.
| When | Then |
|---|---|
| The screen opens | List queued, not-yet-evaluated operations for the current account, grouped by operation type with a count. |
| An operation's URL is in the readable-name map | Show its name (e.g. "Add Farmer", "Add Portfolio Line Item", "Delete Compact Block"). |
| An operation's URL is not mapped | Show "Unknown Operation". |
| The queue is empty | Show "Everything synced and backed up". |
API contracts
Each call opens to its use case, headers, request and response bodies, and errors.
| App Service v2: operation | Use |
|---|---|
POST /auth/refresh | Rotate the refresh token |
GET /farmers/changes | Delta sync: upserts and tombstones since a cursor |
POST /sync/batch | Apply an ordered batch of offline mutations |
GET /sync/batches/{batchId} | Status of an asynchronously processed batch |
POST /files | Create a file upload (resumable or single-shot) |
PATCH /files/{fileId} | Append a chunk to a resumable upload |
HEAD /files/{fileId} | Current offset of a resumable upload |
POST /telemetry | Screen events and sync-health counters (no PII) |
Behaviour notes
- Each row shows URL, next attempt time, attempt count and created time.
- The queue lives in the Bridge CoreAPI database, not the app's Room database.
- Possible bug · unverified the list is a one-time snapshot and does not refresh while sync runs.
Improve in the rewrite
- Make the list live and show per-item errors in plain language.
- Show the farmer each item belongs to instead of raw URLs.