Repository navigation
Terminal installer: show the stalled start while the account is typed - #140
Merged
Merged
Conversation
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
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
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.
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:
--password-file/--pin-fileisn'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