fix(terminal): detect macOS PTY controller disconnects - #176
Merged
Conversation
Greptile SummaryThe PR fixes macOS PTY controller-disconnect monitoring by requesting read readiness, throttling ordinary readable events without consuming input, and replacing terminal-name lookup with device-identity classification.
Confidence Score: 5/5The PR appears safe to merge, assuming the required macOS CI checks pass. The monitor prioritizes explicit disconnect events, preserves readable input, throttles repeated readiness, and includes focused tests for the corrected behavior; no concrete blocking or non-blocking issue remains.
|
| Filename | Overview |
|---|---|
| src/terminal.rs | Updates terminal descriptor classification and polling behavior, with focused PTY regression tests; no actionable defect was established. |
| docs/issues/175-plan.md | Documents the disconnect-monitoring failure, intended fix, and acceptance criteria. |
Reviews (1): Last reviewed commit: "fix(terminal): detect macOS PTY controll..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The macOS disconnect monitor requested no poll events, so it missed PTY controller closure.
The editor usually exited later through a failed write, but slower startup exposed the broken monitor as a one-second disconnect timeout.
Request read events and throttle ordinary readiness without consuming input.
Use device identity to preserve
/dev/ttyexclusion and report classification errors before terminal setup.Closes #175.
This fixes the terminal failure exposed by #174 without changing test deadlines.
Verification:
Continueinstead ofDisconnect) and passes with the fix.cargo test: 322 unit tests pass, four existing performance tests ignored; eight of ten terminal tests pass locally.cargo fmt --check, all-target Clippy with warnings denied, and release build pass.