fix(client): avoid abort on terminal hangup - #2427
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe client now uses fallible terminal restoration. Unix-only client-mode tests detect PTY closure, verify clean client exit, and confirm server responsiveness. ChangesTerminal hangup handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThe PR prevents terminal restoration from aborting a client after its outer PTY hangs up while preserving the detached server.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or non-blocking defects identified in the changed behavior. The production change is narrowly scoped to suppressing restoration failure after terminal hangup, and the new integration coverage exercises the intended client-exit and detached-server-survival behavior.
|
| Filename | Overview |
|---|---|
| src/client/mod.rs | Makes ratatui terminal restoration fallible and best-effort so teardown cannot abort when the outer PTY is already unwritable. |
| tests/client_mode.rs | Gates the Unix-specific integration suite appropriately and adds real PTY-master closure coverage for clean client exit and server survival. |
Reviews (1): Last reviewed commit: "test(client): gate PTY integration on un..." | Re-trigger Greptile
Summary
Checks
cargo test --test client_mode client_exits_cleanly_when_terminal_hangs_up -- --exactcargo test --test client_mode client_restores_terminal_on_sighup -- --exactcargo test --test client_mode client_restores_terminal_on_server_eof -- --exactjust lintCARGO_TARGET_DIRis outside its hardcoded checkout-root process scan)just windows-lintrefs #2424