Skip to content

Terminal installer: show the stalled start while the account is typed - #140

Merged
henrikklee merged 3 commits into
mainfrom
cli-account-prompt-follows-flow
Dec 3, 2026
Merged

henrikklee merged 3 commits into
mainfrom
cli-account-prompt-follows-flow

Conversation

@henrikklee

@henrikklee henrikklee commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

In orchard install, the account prompt (password, PIN, the SSH question) opens as soon as the device is in DFU mode, while the install system boots in parallel. The prompt read its input blocking, so while someone typed, the terminal showed nothing the flow said: palera1n stalling at "Checkmate?" (the window's "Reconnect the cable at your iPad") or a failed start. One user saw this as "DFU times out while typing the PIN".

What changes for the user:

  • The order and the parallel boot are as before.
  • While a question is open, the run keeps following the device. A stall prints the yellow "Reconnect the cable at your iPad" and its explanation above the question, rings the bell once, and draws the question again underneath with what was typed (still dots for the password and PIN). Other messages the run prints in this window go above the question the same way.
  • If the start fails while typing, the question closes cleanly and the usual "Starting your iPad didn't work / put it in DFU mode again" step shows; the account is asked again when the flow is back at it.
  • Without a terminal nothing changes, and a password or PIN given with --password-file/--pin-file isn't asked, as before; every question still asked (for example the PIN after --password-file, or the SSH question) follows the device the same way. The terminal mode is restored on every way out, Ctrl-C included.

How: keys are read one at a time on their own thread in raw mode (KeyReader); the terminal holds the typed text (Prompt) and redraws it below every line printed while it is open; the account step drains the flow's updates between keys and runs them through the same handling as the main loop.

Tests: the prompt's text and redraw logic with a fake terminal writer, and a stall arriving during the password that gives hint, bell and redraw and keeps the typed text; a failed start closes the question. Also checked in a pseudo-terminal with the scripted device (--demo, ORCHARD_DEMO_STALL=1).

Assisted-by: LLM

The account's questions open as soon as the device is in DFU mode, while
the install system boots. They were read blocking, so a stalled start
("Reconnect the cable at your iPad") or a failed one stayed unseen until
the typing was done.

The questions are now read key by key on a thread of their own, in raw
mode, and the run keeps following the flow: what it says goes above the
question, which is drawn again below with what was typed (dots for the
password and PIN); a stall also rings the bell once. A start that fails
meanwhile closes the question and the DFU-again step runs; the account is
asked again when the flow is back at it. Without a terminal, or with
--password-file or --pin-file, nothing changes. The terminal is put back
on every way out (Ctrl-C through the signal handler, errors through Drop).

Assisted-by: LLM
A password or PIN a file answers isn't asked; the questions that are still
asked (the PIN after --password-file, the SSH question) now show a stalled
or failed start like the rest.

Assisted-by: LLM
@henrikklee
henrikklee merged commit 87445c1 into main Dec 3, 2026
21 of 22 checks passed
@henrikklee
henrikklee deleted the cli-account-prompt-follows-flow branch December 3, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant