gum TUI with plain-text fallback #6

Merged
yuri merged 1 commits from feat/gum-tui into main 2026-10-27 19:49:14 +01:00
Owner

Styled menus, confirms, multi-select and an update spinner when gum is present (Fedora repo package, optional install in base); classic prompts otherwise; --yes untouched.

Two pre-ship bugs caught by pty harness testing: have_gum stdout check (pipe inside $()) and fallback output leaking into captured answers.

Tested: full gum run via pty (9 interactions), multi-select browsers, fallback regression, unattended, defaults.

Styled menus, confirms, multi-select and an update spinner when gum is present (Fedora repo package, optional install in base); classic prompts otherwise; --yes untouched. Two pre-ship bugs caught by pty harness testing: have_gum stdout check (pipe inside $()) and fallback output leaking into captured answers. Tested: full gum run via pty (9 interactions), multi-select browsers, fallback regression, unattended, defaults.
yuri added 1 commit 2026-10-27 19:09:59 +01:00
Interactive install gets styled menus, confirms, multi-select and a
spinner around the system update when gum is available (dnf install
gum, installed optionally in the base section); every prompt falls
back to the classic numbered/yn prompts otherwise, and --yes runs
stay 100% non-interactive.

Call sites moved to ui_choose/ui_confirm/ui_choose_multi/ui_run:
DE + TWM menus (defaults preserved: none/none), SELinux + dotfiles
questions, advanced-menu category + multi-select app picker, reboot
prompt. Dead ask_choice/ask_yes_no removed.

Two bugs caught by pty-based harness testing before shipping:
- stdout is a pipe inside $(ui_...), so have_gum must test stdin +
  /dev/tty, never -t 1 (gum would never have fired on a real term).
- fallback display output must go to >&2 — a stray newline on stdout
  made choice='\nno' and broke every case match.
yuri merged commit 3e23ce1210 into main 2026-10-27 19:49:14 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yuri/fedora#6