Improve Gitea config menu UX #36
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The interactive menu (
python gitea_config.py menu/./scripts/gitea-config-menu, added in #31/#34) works but is clunky: every choice needs a number and Enter, profiles must be typed by hand, Enter doesn't consistently cancel/back out, the screen never clears, and repeated profile/auth/reviewer checks feel slow.Desired UX
1/2/… selects immediately (no Enter). Keep a line-input fallback for non-TTY/tests.prgs-author/prgs-reviewer/mdcpsexcept an explicit manual-entry path (e.g. naming a new profile when adding).Press any key to continuein TTY mode; never block in non-TTY/test mode.Implementation guidance
gitea_config_menu.py,tests/test_config_menu.py, README/runbook if UX text changes. Leavescripts/gitea-config-menuunchanged unless a tiny update is truly needed.read_key(),choose_menu_option(),choose_profile(),clear_screen(),pause_for_key().sys.stdin.isatty()+sys.stdout.isatty(). Single-key via stdlibtermios/ttyon macOS/Linux, with a line-input fallback. Make menu IO injectable so tests need no real terminal.Safety (unchanged)
No tokens/passwords printed; no raw config dumps; no
.env.personal; no change to auth behavior or secret storage.Tests
Single-key select (TTY abstraction), main-menu Enter exits, submenu Enter cancels, chooser lists profiles, chooser selects by key, chooser handles no profiles, non-TTY line fallback, clear-screen called only when appropriate, pause never hangs non-TTY, no secrets in output.
Non-goals
No MCP runtime behavior change; no new Gitea API ops; no credential-storage change; no bypass of the canonical profile model.
Refs #31, #34.
Claimed. Starting implementation.
Branch:
fix/issue-36-config-menu-ux.Adding injectable menu IO (
MenuIO) + helpersread_key/choose_menu_option/choose_profile/clear_screen/pause_for_key: single-key nav in a TTY (termios/tty, line-input fallback for non-TTY/tests), Enter quits/backs-out, numbered profile chooser, TTY-only clear + pause. No auth/secret-storage changes; no secrets printed.