feat(core,fuse,gui,cli): pause/resume sync and a visible upload queue (phase 2)

Backend (docs/UI_UX_PLAN.md B-1, B-2):
- Request::SetSyncPaused { paused, until } pauses the drain worker and the
  mirror reconcile. FUSE reads, write staging, the watcher and the poll keep
  running. The pause is persisted in the `state` table (`sync_paused_until`),
  so it survives a restart; a timed pause ends by itself through a timer
  thread, re-armed on mount. Resuming wakes the drain and runs a full
  reconcile. Response::Status gains `paused` and `paused_until`.
- Request::ListPendingOps lists the queue with paths, attempts, last error,
  next attempt and parked/failing flags. Request::RetryPendingOp { id } makes
  one backed-off op (or every failed one) due now. Parked ops are never
  un-parked and nothing is dropped from the queue.

Front ends:
- Sync page: a status card with Pause/Resume (split button with 1 h, 8 h and
  24 h pauses) and a "Waiting to Upload" list with Retry now and Retry All.
- The sidebar strip and the tray show the paused state; the tray gains Pause
  Sync / Resume Sync and names failing changes.
- CLI: `pdfs sync pause [--for 30m|1h|2d]`, `pdfs sync resume`,
  `pdfs sync queue`, `pdfs sync retry [id]`; `pdfs status` reports a pause.

Not in this phase: merging Activity into the Sync page, discarding a queued
op (needs a recovery copy first), and per-folder pause.
This commit is contained in:
nvrl committed 2026-09-23 02:06:41 +02:00
1 parent cf9e1665ca
commit 067561564e
17 files changed
+995 -13

No files matched your search

+19
View File
@@ -9,6 +9,25 @@ release ships. Migrations are forward-only — a database written by a newer cli
refuse-to-open, not a downgrade, so rolling back a release means restoring the cache from
scratch (user data in `staging/` and `recovery/` is never touched by this).
## [Unreleased]
Schema: **30** (unchanged).
### Added
- **Pause and resume sync.** The Sync page, the tray and `pdfs sync pause [--for 1h]` /
`pdfs sync resume` hold back queued uploads and mirror-folder reconciles. Reads through the mount
keep working, writes keep being accepted and staged, and a timed pause ends by itself. The pause
survives a restart.
- **See what is waiting to upload.** The Sync page lists the queue with each item's last error and
next retry, with Retry now per item and Retry All; `pdfs sync queue` and `pdfs sync retry [id]`
do the same from the CLI. Nothing in the queue is ever dropped from here.
### Changed
- **New app shell.** Every page has its own header bar; the sidebar ends in a footer with sync
state, storage and the account; the Settings page became a Preferences dialog (Ctrl+,), with
transfers on the Sync page and developer details in About. The app follows the system accent
colour; the Proton purple accent is a preference.
## [1.11.1] — 2026-09-19
Schema: **30** (unchanged).