Skip to content

Expose typed terminal input without an actor scheduler - #705

Merged
wolfy-j merged 4 commits into
mainfrom
feat/terminal-event-reader
Sep 10, 2026
Merged

wolfy-j merged 4 commits into
mainfrom
feat/terminal-event-reader

Conversation

@wolfy-j

@wolfy-j wolfy-j commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Compiled terminal clients need parsed input without creating a scheduler-owned process solely to receive keystrokes, plus a completion signal when the terminal disconnects. The former Unix reader parsed each read independently, so terminal sequences split at a buffer boundary could be corrupted.

This change exposes NewEventInputReader with serial typed callbacks while preserving NewInputReader as the scheduler adapter. Each session reports Done and Err, late cleanup cannot stop a restarted reader, and Stop restores terminal modes while serializing cleanup.

Unix input now uses the existing streaming decoder with a bounded incomplete-frame budget. The polished replay removes unrelated test commits, correctly releases accounting for completed multi-read events, and handles decoder-channel closure without spinning. Windows retains the established Console API reader.

Validation: the terminal service suite passes under race; framing and shutdown regressions pass repeatedly; repository-pinned scoped lint, vet, Windows compilation, and diff checks pass. Coverage includes fragmented mouse and navigation sequences, UTF-8 and paste input, EOF with data, framing bounds, restart generations, cancellation, and consecutive large valid pastes.

@wolfy-j
wolfy-j force-pushed the feat/terminal-event-reader branch from a544d72 to d88afe7 Compare September 10, 2026 15:15
@wolfy-j
wolfy-j merged commit 27d1055 into main Sep 10, 2026
9 checks passed
@wolfy-j
wolfy-j deleted the feat/terminal-event-reader branch September 10, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants