Repository navigation
ADFA-5151 fix(clone): confine the receive to the recovery loop, once accepted - #411
Merged
Merged
Conversation
…tranded on step 2
A successful clone-receive left the user on the receive screen — the transfer was
done but nothing moved them on. The install index has always redirected home on
success; the receive did not.
showReceiveTerminal now, on success, confirms briefly on the progress screen ("Copy
complete", 100%, no Cancel) and after 3s goes to the Library tab, where
LibraryHomeFragment refreshes onto the system releaseCloneEnv just booted. A
receiveExiting flag holds the confirmation so onTransferState's renderReceive (SUCCESS
is not active) can't tear it down first. Failure keeps the existing dialog.
It lives in the shared terminal, so a normal receive gets the same exit. openLibraryTab
mirrors openCloneTab. This is the success exit ADFA-5151's loop needs before the
confinement can be added safely — the door before the walls.
… fork with no system Two pieces of the recovery confinement, on top of the success exit. No system → CloneFragment enters receive step 1 directly, skipping the Send/Receive fork: Send is dead (ADFA-5150), so Receive is the only real move and the fork is a screen with one live option. The user is still free to back out until they accept. Once accepted (the receive is running, past CONFIRM) a Back guard turns on, mirroring BackupJobFragment's: first Back warns via snackbar, the next backgrounds the app — the copy keeps running under CloneShareService and the notification returns to progress (ADFA-5152). Before acceptance the guard is off, so Back is free. updateBackGuard keeps it in step with side and transfer state; any terminal turns it off. One new string, 33 locales.
… accepted, route failure Three pieces on top of the success exit, completing the receive loop's lifecycle. No system → CloneFragment enters receive step 1 directly, skipping the Send/Receive fork: Send is dead (ADFA-5150), so Receive is the only real move. Free to back out until the transfer is accepted. Once accepted (running, past CONFIRM) a Back guard turns on, mirroring BackupJobFragment's: first Back warns, the next backgrounds the app — the copy keeps running under CloneShareService and the notification returns (ADFA-5152). Before acceptance Back is free; updateBackGuard keeps it in step and any terminal turns it off. On failure the terminal offers Retry (re-scan; rsync resumes from the half-written tree) or Recover (the hub), never stranding on a dead receive or a systemless Home. One new string (Back warning), 33 locales; Retry/Recover reuse existing strings.
Second-pass finding: receiveExiting was set on the success exit and never reset — a flag with no clear-path, the persistent-marker-nobody-clears smell we keep removing. Navigation destroys the fragment so it normally dies with it, but resetting it in the redirect runnable gives it an owner and a lifetime: if navigation ever no-ops, renderReceive is not left permanently muted.
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.
ADFA-5151 — confine navigation to the Recover hub, once a transfer is accepted
Completes the systemless recovery flow (after ADFA-5147 / 5150 / 5152). A clone-receive
is the way a systemless phone gets a system; this makes its lifecycle whole — the user
is free to decide up to the point they commit, protected after, and never stranded or
dropped onto a systemless Home.
What changed (CloneFragment, + LibraryActivity.openLibraryTab)
progress screen confirms ("Copy complete", 100%) and after 3s goes to the Library,
exactly as the install index does. In the shared terminal, so a normal receive gets it
too. (
db1eb10c.)(5150), so Receive is the only real move.
user is still deciding. Once the transfer is running, a Back guard (mirroring
BackupJobFragment's) warns on the first press and backgrounds the app on the next; the
copy keeps running under CloneShareService and the notification returns to progress
(ADFA-5152). Back never reaches a systemless Library/Connect.
half-written tree) or Recover (the hub); never a dead receive.
One new string (the Back warning) in all 33 locales; Retry/Recover/Copy-complete reuse
existing strings.
Design note
Confinement begins at acceptance, not at receive entry — trapping someone still
deciding would be the opposite error. The loop is a funnel, not a cage: leaving the app
is always allowed and the transfer survives. Exit is defined on both ends — success →
Library, failure → Retry/Recover — so the loop is never a trap with no way out.
Verification
Symbols, XML and locale counts checked; no build here (gradle offline). On-device: with
no system, Clone opens on receive step 1; Back is free before accepting and confined
after (snackbar → background → notification returns); success lands on the Library;
failure offers Retry / Recover. A normal receive (with a system) gets the success exit too.