K2GO-448 feat(ui): stage indicator [N/M] on multi-stage progress (restore, rootfs) - #625
Merged
Merged
Conversation
Restore runs three passes (copy, verify, extract) on one unified bar, but each pass reports its own ETA, so the resetting time read as the whole run slowing down. Prefix each stage label with its position via ExtractProgress.stepped: "[1/3] Copying the file", "[2/3] Checking the file", "[3/3] Restoring". Pure helper, unit-tested; backup (single pass) is unchanged. Label only, no change to unifiedPercent or ETA.
The rootfs install shows two measured bars: download, then verify+extract. Prefix the boot-screen status with its position ([1/2] download, [2/2] verify+extract) via ExtractProgress.stepped, so the per-stage ETA does not read as the whole run slowing down. UI only (LibraryActivity); reuses the restore helper. PROVISIONING stays an unnumbered spinner.
Code-review follow-up. The "[N/M]" prefix was only on the progress emits, so the restore copy stage still showed an unprefixed "Copying the file" first: in the notification and the initial indeterminate state (DeepOpService) and in the fragment's optimistic status (BackupJobFragment), flipping to "[1/3] ..." only once the copy reported a percent. Prefix at the source, and label the fragment from the same pass constants (now public). Name the rootfs stage count (ROOTFS_INSTALL_STAGES) so the two call sites share one source.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restore -> [1/3] Copying / [2/3] Checking / [3/3] Restoring.
Rootfs install -> [1/2] download / [2/2] verify+extract.
A single unified bar is several stages with different per-stage ETAs, which read
as the run slowing down; the position makes it legible. Backup (single pass) is
unchanged. "[N/M]" is numbers+punctuation, so no new localized string. Label only.
Verification: ExtractProgress unit tests + lint + compile; device-checked on a
OnePlus (rootfs [1/2] live, install completed end-to-end).