fix: honor mouse capture config in terminal attach - #2995
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 (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughDirect terminal attachment now respects ChangesDirect attach mouse capture
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Direct terminal attach now honors the configured mouse-capture preference while preserving enabled-mode behavior and teardown; no actionable merge-blocking risk remains after normal checks and review. Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Issue
A user disables mouse capture and directly attaches to one terminal, but Herdr still takes the mouse. Native click-drag selection therefore does nothing in that attach window.
Problem
Direct attach always enabled outer-terminal mouse reporting during startup instead of applying the local mouse-capture preference. The attach client then received pointer events that the host terminal needed for native selection, even though the user had explicitly opted out.
How did we fix it?
Direct attach now applies the same already-loaded local mouse-capture preference when it initializes the host terminal. This extends the existing configuration mechanism to the one-terminal attach surface only; the default remains captured, and later mouse-mode requests from the attached terminal keep their existing behavior.
Verification
Before the change, the real direct-attach PTY path emitted
CSI ?1000hwithmouse_capture = false. After the change, a fresh direct attach emitted no mouse-enable modes for the false setting and retained all existing modes for a true-setting control; detach still emitted terminal teardown.The focused direct-attach integration regression and seven attach input/scroll tests pass. Formatting and clippy pass. The broad suite passes 3,479 tests when excluding one unrelated live-handoff harness test whose checkout-path PID matcher cannot recognize this Kennel job's externally located
CARGO_TARGET_DIR; the fulljust checkreaches that same infrastructure-only failure.refs #2992