fix(input): preserve mouse forwarding through handoff - #3002
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; 9 remain after this review. 📝 WalkthroughWalkthroughLive handoff now restores mouse tracking and encoding through terminal escape sequences. The handoff test verifies SGR mouse-wheel encoding. The changelog documents the fix. ChangesMouse Handoff
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change restores mouse-event forwarding across handoff, with no actionable merge-blocking risk remaining 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
After a live handoff, mouse-aware applications that remain running stop receiving clicks and wheel events until they restart.
Problem
The replacement server restored the pane's recorded mouse modes for routing decisions, but not the matching encoder state used to turn mouse actions into terminal input. Herdr therefore routed wheel events to the pane and then failed to encode them.
How did we fix it?
Handoff reconstruction now restores mouse mode and encoding through the terminal emulator's existing control-sequence parser. This keeps routing and encoding synchronized within each imported pane without sending anything to the running pane process.
Verification
Before the fix, restoring ButtonMotion with SGR encoding made a wheel event return no bytes. After the fix, the same production path emits
ESC[<64;12;10M; handoff state capture and existing mouse encoding tests also pass.just checkcompleted formatting, clippy, and 3,481 tests; its one remaining live-handoff PID-discovery failure reproduces unchanged against the base implementation.refs #3000