From f2a9f6ba82feb2d19ff43e877e8e2c600a3ae841 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 16:22:47 +0000 Subject: [PATCH 1/2] Initial plan From 59e0ee95027c8bed9f3cebdff1f1fb1e09f4b8fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 16:57:44 +0000 Subject: [PATCH 2/2] fix: spinner reads from stdin causing double Enter in add-wizard The SpinnerWrapper was creating a Bubble Tea program that started an input reader goroutine (via initInputReader) even though the spinner doesn't need keyboard input. In cooked mode this goroutine was consuming stdin events between interactive huh form prompts, leaving the terminal input in an inconsistent state. This caused the first Enter key press on each huh Select/Confirm field to be dropped, requiring users to press Enter twice to make selections in gh aw add-wizard. Fix: add tea.WithInput(nil) to the spinner's Bubble Tea program to disable stdin reading entirely. Ctrl+C is still handled via OS signal delivery (SIGINT) through bubbletea's signal handler, which operates independently of the input reader. Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b2a6d3df-53fd-4885-b656-e014ef82bded Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com> --- pkg/console/spinner.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/console/spinner.go b/pkg/console/spinner.go index 19e6ba4c601..8b902efc877 100644 --- a/pkg/console/spinner.go +++ b/pkg/console/spinner.go @@ -116,7 +116,11 @@ func NewSpinner(message string) *SpinnerWrapper { message: message, output: os.Stderr, } - s.program = tea.NewProgram(model, tea.WithOutput(os.Stderr), tea.WithoutRenderer()) + // tea.WithInput(nil) disables stdin reading so the spinner does not consume key + // events that should be handled by subsequent interactive forms (e.g. huh.Select). + // Ctrl+C is still handled via OS signal delivery (SIGINT), which bubbletea + // processes independently of the input reader. + s.program = tea.NewProgram(model, tea.WithOutput(os.Stderr), tea.WithoutRenderer(), tea.WithInput(nil)) } return s }