Sync today only exposes coarse last_sync_status (never / pending / ok / error). UI cannot show a real progress bar. Sync loop already knows remote file list and processes files one-by-one in sync_connection — we can track progress.
Proposed approach
On DriveConnection (or sync-status payload), persist / return while syncing:
sync_total — files discovered for this run (after listing selected resources)
sync_processed — files finished (skip-unchanged counts as processed, or document separately — pick one and document it)
optional: sync_added / sync_updated / sync_failed for richer UI copy
clear / zero these fields when sync starts; leave final counts until next sync
Serialize on connection GET + sync enqueue response so FE can poll existing connection endpoints.
Acceptance
While last_sync_status=pending, connection detail includes sync_processed + sync_total (or equivalent) updating during sync
After success/error, final counts remain available until next sync
Existing sync behavior unchanged for callers that ignore progress fields
Tests cover start → mid → end progress values
Notes
Percent = sync_processed / sync_total when sync_total > 0. Indeterminate spinner OK when listing still running (sync_total unknown).
Parent epic: [chat_backend#42](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/42)
Related FE: [chat_web_app#92](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/92)
Related: [#48](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/48), [#49](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/49), [#52](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/52)
## Summary
Sync today only exposes coarse `last_sync_status` (`never` / `pending` / `ok` / `error`). UI cannot show a real progress bar. Sync loop already knows remote file list and processes files one-by-one in `sync_connection` — we can track progress.
## Proposed approach
On `DriveConnection` (or sync-status payload), persist / return while syncing:
- `sync_total` — files discovered for this run (after listing selected resources)
- `sync_processed` — files finished (skip-unchanged counts as processed, or document separately — pick one and document it)
- optional: `sync_added` / `sync_updated` / `sync_failed` for richer UI copy
- clear / zero these fields when sync starts; leave final counts until next sync
Serialize on connection GET + sync enqueue response so FE can poll existing connection endpoints.
## Acceptance
- [ ] While `last_sync_status=pending`, connection detail includes `sync_processed` + `sync_total` (or equivalent) updating during sync
- [ ] After success/error, final counts remain available until next sync
- [ ] Existing sync behavior unchanged for callers that ignore progress fields
- [ ] Tests cover start → mid → end progress values
## Notes
Percent = `sync_processed / sync_total` when `sync_total > 0`. Indeterminate spinner OK when listing still running (`sync_total` unknown).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent epic: chat_backend#42
Related FE: chat_web_app#92
Related: #48, #49, #52
Summary
Sync today only exposes coarse
last_sync_status(never/pending/ok/error). UI cannot show a real progress bar. Sync loop already knows remote file list and processes files one-by-one insync_connection— we can track progress.Proposed approach
On
DriveConnection(or sync-status payload), persist / return while syncing:sync_total— files discovered for this run (after listing selected resources)sync_processed— files finished (skip-unchanged counts as processed, or document separately — pick one and document it)sync_added/sync_updated/sync_failedfor richer UI copySerialize on connection GET + sync enqueue response so FE can poll existing connection endpoints.
Acceptance
last_sync_status=pending, connection detail includessync_processed+sync_total(or equivalent) updating during syncNotes
Percent =
sync_processed / sync_totalwhensync_total > 0. Indeterminate spinner OK when listing still running (sync_totalunknown).