Skip to content

Fix Linux terminal input loss during resize - #40

Merged
swerner merged 4 commits into
mainfrom
codex/linux-terminal-input
Oct 14, 2026
Merged

swerner merged 4 commits into
mainfrom
codex/linux-terminal-input

Conversation

@swerner

@swerner swerner commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Linux terminal input can stall after a resize when Enter is already waiting. Crossterm 0.29's default Mio reader returns the first event from a readiness batch and can discard the other edge-triggered notification. The first-run key prompt then waits until the terminal test times out. The internal dependency update run tracked by #39 and the latest nightly both show this failure.

Enable Crossterm's use-dev-tty polling backend only on Linux. Add a PTY regression that queues resize and Enter before the reader resumes and requires both events to arrive. macOS keeps its existing backend: applying this feature there changed terminal-mode restoration in the earlier experiment.

Add filedescriptor 0.8.3, the polling backend's descriptor wrapper. Its thiserror / thiserror-impl 1.0.69 versions already exist in Fabro's lockfile. Existing package versions and git revisions are unchanged.

Fixes #39.

Validation:

  • mise run check passed on macOS: 1,683 tests passed, one skipped; formatting, Clippy, doctests, documentation, library feature checks, workflow audit, and whitespace checks passed.
  • The new Linux regression fails on the default backend with enter=false resize=true.
  • Earlier isolated backend testing delivered both pending events in 100/100 Linux trials, and the original first-run reproduction passed 100/100 trials with the Linux feature enabled. The Linux and macOS TUI suites also passed in that experiment.
  • The full routine CI gate passed on macOS, Linux x86_64, and Linux arm64 at b15f47e, including the new Linux regression and the original first-run test. The current implementation and dependency manifests are unchanged from that tested commit. Whitespace checks passed locally, and PR CI will run again on the latest commit.

@swerner swerner added the bug Something isn't working label Oct 14, 2026
@swerner
swerner marked this pull request as ready for review October 14, 2026 17:10
@swerner
swerner merged commit 6895551 into main Oct 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nightly internal dependency update failed

1 participant