handle_input() previously drained terminal events in an unbounded while-poll loop, so a continuously-ready input stream could keep the frontend inside handle_input() indefinitely, starving managed-event processing, completion checks, peer-close stop policy, and rendering in the outer run_tui() loop.
Bound each call to at most INPUT_EVENT_WORK_BUDGET (128) polled terminal events, mirroring the MANAGED_EVENT_WORK_BUDGET pattern already used for managed event draining. All polled events count against the budget, including ignored/unknown/release events, so a stream of non-actionable input can't bypass the bound. Remaining events are left queued for the next outer-loop iteration rather than dropped. Quit/Ctrl-C now also breaks out of the drain immediately after being handled, since there is no benefit to consuming further buffered input before the outer loop can request managed shutdown.
handle_input() previously drained terminal events in an unbounded while-poll loop, so a continuously-ready input stream could keep the frontend inside handle_input() indefinitely, starving managed-event processing, completion checks, peer-close stop policy, and rendering in the outer run_tui() loop.
Bound each call to at most INPUT_EVENT_WORK_BUDGET (128) polled terminal events, mirroring the MANAGED_EVENT_WORK_BUDGET pattern already used for managed event draining. All polled events count against the budget, including ignored/unknown/release events, so a stream of non-actionable input can't bypass the bound. Remaining events are left queued for the next outer-loop iteration rather than dropped. Quit/Ctrl-C now also breaks out of the drain immediately after being handled, since there is no benefit to consuming further buffered input before the outer loop can request managed shutdown.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
handle_input() previously drained terminal events in an unbounded while-poll loop, so a continuously-ready input stream could keep the frontend inside handle_input() indefinitely, starving managed-event processing, completion checks, peer-close stop policy, and rendering in the outer run_tui() loop.
Bound each call to at most INPUT_EVENT_WORK_BUDGET (128) polled terminal events, mirroring the MANAGED_EVENT_WORK_BUDGET pattern already used for managed event draining. All polled events count against the budget, including ignored/unknown/release events, so a stream of non-actionable input can't bypass the bound. Remaining events are left queued for the next outer-loop iteration rather than dropped. Quit/Ctrl-C now also breaks out of the drain immediately after being handled, since there is no benefit to consuming further buffered input before the outer loop can request managed shutdown.