Repository navigation
Conversation
grierj
force-pushed
the
feat/shrink-time-estimate-and-progress
branch
from
December 4, 2026 16:54
3011da4 to
f8f2d0c
Compare
Large APFS shrinks (100+ GB) take well over an hour (~1 min/GB), so the hardcoded 'around 30 minutes' estimate misled users into thinking the operation had hung, and neither the GUI nor CLI surfaced the helper's live step or byte progress. - Compute upfront split action (shrink/grow/partition-only) from the actual APFS container size and show a size-based estimate (~1 min/GB) on the split picker and while splitting. - Parse the helper's optional telemetry fields tolerantly into SplitProgress (released/total bytes, step count, finishing stage, and rate-paired elapsed time) without breaking terminal status handling. - Track both locally started and adopted splits through reconnects so a split that finishes or stops during a disconnect always delivers its terminal outcome, and mark adopted splits connected so GUI/CLI show live progress instead of a reconnect warning. - Surface live progress, paired ETA, and finishing state in the GUI and CLI (80-column-safe live TTY line, non-TTY milestones, JSON events, and clean exit on split refusal). - Update companion app copy to avoid a fixed 30-minute claim. Fixes OrchardLinux#157 Assisted-by: LLM
grierj
force-pushed
the
feat/shrink-time-estimate-and-progress
branch
from
December 5, 2026 00:01
f8f2d0c to
ccce9d0
Compare
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.
Fixes #157.
Changes
crates/flow/src/lib.rs,view.rs&tests.rs:SplitAction(Shrink { gb },Grow,PartitionOnly),SplitStage(Shrinking,Finishing),SplitProgress,split_action(),shrink_gb_for(),shrink_estimate_minutes()(SHRINK_MINUTES_PER_GB = 1),format_approx_minutes(),format_remaining_minutes(), andformat_remaining_compact()(overflow-safeu128/u64math).splittable_bytesandipados_container_bytestoLayoutso shrink/grow/partition-only classification uses the actual APFS container size (including interrupted-shrink layouts).Event::SplitProgress(SplitProgress)andprogress: Option<SplitProgress>onState::Splitting.Link::Up,flow.companion = true) when adopting a running split (Event::SplitRunning) or receivingEvent::SplitProgress, so reopening the installer shows live progress instead of a reconnect warning and routes refusals back toChooseSplitrather than DFU.crates/runtime/src/companion.rs:observedCapacityBytes,apfsStep,startedAt,observedAt,stepIndex,plan.before,plan.steps,plan.targetBytes) tolerantly so partial/null/unexpected telemetry never breaks terminalcompleted/stopped/unknownhandling.observedAt - startedAt) or a delta baseline on reopen instead of mixing lifetime released bytes with a fresh UI clock.SplitWatcherby device and operation ID, and process reconnect snapshots immediately so a split that finishes or stops during a disconnect always delivers its outcome.crates/app/src/lib.rs&install_screens.rs:self.sinceacross transientSplitting/Reconnectscreen transitions.choose_split(~1 min per GB, depending on data layout).crates/cli/src/commands/install.rs:after_rowandState::Splitting(never printing0 GBon resume), keep the live TTY status line within 80 columns, emit permanent progress milestones on non-TTY output, emitsplit-progressJSON events, and fail cleanly when a split is refused instead of hanging onChooseSplit.companion/App/App.swift:"around 30 minutes"with direction-neutral"Shrinking can take around 1 minute per GB. Your computer shows how it's going.".Verification
cargo test -p orchard-flow: 129 passed, 0 failed.cargo test -p orchard-runtime: 112 passed, 0 failed (1 ignored).cargo test -p orchard-cli -- commands::install: 21 passed, 0 failed.cargo check --workspace --tests: passed cleanly.