Show live progress while archiving saved posts #4

Merged
salix merged 1 commit from t3code/archive-progress-display into main 2026-10-03 17:45:24 +02:00
Owner

The archive row gave no feedback during a pass: just a disabled Start button and an open-ended "Archiving…". A large library could look stuck for minutes.

The core's bulk pass now reports a running tally. archive_all_saved_posts calls an optional ArchiveProgressListener once before the first post and again after every post is considered, carrying completed (skipped posts included), total, and the failure count. The listener is a UniFFI callback interface, so both clients get it from the same core change.

GNOME: the row subtitle counts up ("Archiving 3 of 45…", plus " · N failed" when uploads fail), and a progress bar under the row fills as the pass advances. Updates come through a channel from the worker thread onto the main loop, and stop once the pass settles so a late update can't clobber the final subtitle.

Android: ArchiveCoordinator feeds the same tally into ArchiveUiState, and the row subtitle shows "Archiving X of Y" while the WorkManager pass runs.

A core test pins the callback sequence: one initial tally, one per post, monotonic completed, and the final failed count.

The archive row gave no feedback during a pass: just a disabled Start button and an open-ended "Archiving…". A large library could look stuck for minutes. The core's bulk pass now reports a running tally. `archive_all_saved_posts` calls an optional `ArchiveProgressListener` once before the first post and again after every post is considered, carrying `completed` (skipped posts included), `total`, and the failure count. The listener is a UniFFI callback interface, so both clients get it from the same core change. GNOME: the row subtitle counts up ("Archiving 3 of 45…", plus " · N failed" when uploads fail), and a progress bar under the row fills as the pass advances. Updates come through a channel from the worker thread onto the main loop, and stop once the pass settles so a late update can't clobber the final subtitle. Android: `ArchiveCoordinator` feeds the same tally into `ArchiveUiState`, and the row subtitle shows "Archiving X of Y" while the WorkManager pass runs. A core test pins the callback sequence: one initial tally, one per post, monotonic `completed`, and the final `failed` count.
salix merged commit 565c25ec6c into main 2026-10-03 17:45:24 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
salix/threado!4
No description provided.