305d739f56
This commit consolidates the upload and polling functionalities into a single `ServerSync` worker. The `oneliner_poller` and `uploader` modules have been removed, and their responsibilities are now handled by `server_sync`. The `ServerSync` worker manages both uploading pending recordings and polling the `/api/oneliners` endpoint. Uploads take precedence, and polling only occurs when the pending upload directory is empty. The worker now uses a unified HTTP client and a single `tokio::select!` loop for managing these tasks. Key changes include: - Removal of `oneliner_poller.rs` and `uploader.rs`. - Introduction of `server_sync.rs` and `upload.rs` in `doctate-client-core`. - `ServerSync` now handles upload events (`UploadEvent`) and provides a `WorkerSnapshot` for UI feedback. - Upload logic has been refactored to handle transient and terminal errors more robustly, including file deletion for terminal failures. - Polling logic is integrated into the `ServerSync` loop, utilizing the existing `SnapshotCache` and `CaseStore`. - The `App` component in `client-desktop` has been updated to use `ServerSync` instead of the separate poller and uploader. - Documentation comments have been updated to reflect the new structure.