Files
codex/codex-rs/tui
Eric Traut 0bbbda9250 Defer numbered TUI questions during active input (#63192)
## Why

A question with numbered options can take focus while someone is typing
in the composer or searching a picker. A digit intended for a draft
such as `Phase 2` can then submit an answer.

## What changed

If a question opens with numbered options, wait for one second of input
inactivity and for any pending key chord to finish. Count editor and
picker input, including custom editing keys and cursor movement, toward
the idle delay.

Keep the original auto-resolution timer running while the question is
hidden and preserve the underlying picker if the question times out
after opening. Treat delayed questions as pending during startup draft
handoff, and clear queued prompts on disconnect.

## Testing

Cover digits reaching the draft before the delay and selecting options
afterward, pending key chords outlasting the idle delay, and timeouts
during paste capture or over an open picker.

GitOrigin-RevId: 6f9945c264fb8ed336041cf13b1be7c00b4b3f21
2026-11-22 21:05:28 +00:00
..