fix(B-0832): nmtui auto-relaunch loop on no-internet — Esc to refresh without breaking install (operator 2026-05-26)#5378
Merged
AceHack merged 2 commits intoMay 27, 2026
Conversation
…ui re-launches (refresh-friendly UX) instead of breaking install flow (operator 2026-05-26) Operator 2026-05-26 substrate-engineering ask during 3rd USB physical test: 'i want to be able to refresh the network withing breaking the script'. Old behavior: launch nmtui ONCE; if no internet on exit → drop_to_shell. That broke the install flow when operator hit Esc to refresh the wifi scan (empirical 2026-05-26 1st USB physical-test session — B-0832 nmtui WiFi rescan empirical anchor). New behavior: loop nmtui until either: - has_internet succeeds → continue install - operator presses 's' within 10s → drop to shell (escape hatch) Operator flow: - Esc out of nmtui without connecting → nmtui re-launches with fresh wifi scan - Connect successfully → script continues to zeta-install - Need shell access → press 's' at the post-attempt prompt Counter NMTUI_ATTEMPTS tracks session count + logs in success message so operator sees how many tries it took. Composes with .claude/rules/non-coercion-invariant.md HC-8: operator agency preserved (drop-to-shell available; choice is operator-driven). Composes with .claude/rules/substrate-or-it-didnt-happen.md: substrate- honest UX matches operator's real-world Esc-to-refresh expectation. Bash syntax verified clean via bash -n. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
This PR updates the first-boot USB NixOS installer flow to prevent an accidental “Esc out of nmtui → drop to shell” path when Wi‑Fi isn’t connected yet, by auto-relaunching nmtui until internet is detected (or the operator explicitly requests a shell).
Changes:
- Loop
nmtuisessions untilhas_internetsucceeds, tracking attempts viaNMTUI_ATTEMPTS. - Add an explicit post-attempt prompt allowing operator-controlled escape to shell via
s(otherwise relaunchnmtuito refresh scans). - Improve on-screen guidance explaining the Esc-to-refresh behavior.
…ded 10s); mirrors ROLE_PROMPT_SECS env-override pattern + adds -r to new read Copilot finding on PR #5378 line 160: > The retry prompt hard-codes the timeout value ('within 10s' in the > message and 'read ... -t 10' in code). This can drift if the timeout > is adjusted later. Consider introducing a single NMTUI_RETRY_PROMPT_SECS > (similar to ROLE_PROMPT_SECS) and use it in both the message + read. Substrate-honest finding. Fix: 1. Add NMTUI_RETRY_PROMPT_SECS=${NMTUI_RETRY_PROMPT_SECS:-10} env- overridable var near ROLE_PROMPT_SECS (consistent pattern) 2. Use $NMTUI_RETRY_PROMPT_SECS in the user-facing 'within Xs' message 3. Use 'read -r -t "${NMTUI_RETRY_PROMPT_SECS}"' in the actual read 4. Added -r flag to the read (ShellCheck Information-level diagnostic on the read I added in the prior commit; hygiene improvement) Now operator can tune via /etc/zeta-firstboot.conf: echo 'NMTUI_RETRY_PROMPT_SECS=30' >> /etc/zeta-firstboot.conf Bash syntax verified clean via bash -n.
auto-merge was automatically disabled
May 27, 2026 02:08
Pull Request is not mergeable
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.
What
Operator 2026-05-26 during 3rd USB physical test: "i want to be able to refresh the network withing breaking the script".
Old behavior: nmtui launched ONCE; if no internet on exit → drop_to_shell (broke install flow). Esc was destructive.
New behavior: loop nmtui until `has_internet` OR operator explicit 's' for shell. Esc out refreshes; 's' escape-hatch preserved.
Operator flow
`NMTUI_ATTEMPTS` counter tracks session count + logs in success message ("wifi ok (after N nmtui session(s))").
Composes with
🤖 Generated with Claude Code