Today Sync now can fail (e.g. Google Drive API disabled) while the UI only console.logs the failure and the green banner only means OAuth connected, not sync OK.
## Summary
Companion to [chat_backend#57](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/57) (async Drive sync task).
Today `Sync now` can fail (e.g. Google Drive API disabled) while the UI only `console.log`s the failure and the green banner only means **OAuth connected**, not sync OK.
## Backend dependency
[chat_backend#57](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/57)
Expected API shape (already partially present):
- `last_sync_status`: `pending` | `ok` | `error` | `never`
- `last_sync_error`: human-readable message
- `last_sync_at`
- Sync POST will enqueue and return quickly with `pending` instead of blocking
## Acceptance
- [ ] Sync now: show pending/Syncing state while `last_sync_status=pending`
- [ ] Poll connections (or connection detail) until status leaves `pending` (with timeout message)
- [ ] On `error`: error toast/alert showing `last_sync_error` (truncate long GCP JSON if needed)
- [ ] On `ok`: optional success toast; refresh document list
- [ ] OAuth green “Drive connected” banner remains connect-only — does not imply sync success
- [ ] Tests for error / pending UX where practical
## Related
- Documents / Drive UI: [#83](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/83) / [#84](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/84)
- Backend epic: [chat_backend#42](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/42)
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.
Summary
Companion to chat_backend#57 (async Drive sync task).
Today
Sync nowcan fail (e.g. Google Drive API disabled) while the UI onlyconsole.logs the failure and the green banner only means OAuth connected, not sync OK.Backend dependency
chat_backend#57
Expected API shape (already partially present):
last_sync_status:pending|ok|error|neverlast_sync_error: human-readable messagelast_sync_atpendinginstead of blockingAcceptance
last_sync_status=pendingpending(with timeout message)error: error toast/alert showinglast_sync_error(truncate long GCP JSON if needed)ok: optional success toast; refresh document listRelated
Backend dependency: chat_backend#57 — async Drive sync task + API error fields.