Drive Sync now: pending UX + error toast when sync fails #90

Closed
opened 2026-08-02 03:59:04 -07:00 by westfarn · 1 comment
Owner

Summary

Companion to chat_backend#57 (async Drive sync task).

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.

Backend dependency

chat_backend#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

## 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)
Author
Owner

Backend dependency: chat_backend#57 — async Drive sync task + API error fields.

Backend dependency: [chat_backend#57](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/57) — async Drive sync task + API error fields.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_web_app#90