refactor(wizard): replace hand-rolled arrow-key menu with questionary

The reviewer asked for a known-good interactive-menu library instead of
the custom termios/select key reader; arrow keys had failed in their
terminal. The TTY path now delegates to questionary.select (pointer ">",
bold highlight via pointer/selected styles), keeping choice values mapped
to list indices. Cancellable menus graft an eager Escape binding onto the
prompt's own key-binding registry so Esc backs out while Ctrl-C still
aborts fixed menus and backs out of cancellable ones. The non-TTY
numbered fallback is untouched, and hand-rolled internals
(_arrow_menu/_read_keypress/_option_line/_draw_menu_rows) are gone.
This commit is contained in:
2026-08-27 08:36:56 +00:00
parent 12ca06ba0d
commit daf0a203a0
4 changed files with 277 additions and 212 deletions
+1
View File
@@ -8,6 +8,7 @@ dependencies = [
"keyring>=25",
"httpx>=0.27",
"python-debianbts>=4.1.1",
"questionary>=2.1.1",
]
[project.scripts]