Skip to content

fix(windows): preserve remote multiline paste - #3282

Open
akbash-bot wants to merge 1 commit into
herdrdev:masterfrom
akbash-bot:akbash/3209-remote-windows-paste
Open

fix(windows): preserve remote multiline paste#3282
akbash-bot wants to merge 1 commit into
herdrdev:masterfrom
akbash-bot:akbash/3209-remote-windows-paste

Conversation

@akbash-bot

Copy link
Copy Markdown
Collaborator

Issue

A Windows user pastes multiline text with Shift+Insert or Shift+right-click during herdr --remote. The remote pane receives one wrapped block without line breaks.

Problem

Windows Terminal encoded each pasted newline as an Enter press and release report. The Windows client kept those reports as literal paste text instead of restoring the newline.

How did we fix it?

Herdr now converts the exact adjacent unmodified Enter press and release reports to one carriage return after a complete paste arrives. Other report-shaped paste text remains unchanged.

Verification

The reporter's exact input stream failed before because both Enter reports remained in the Paste event. The same test now emits one Paste with the expected line breaks, and the incomplete-pair test keeps unmatched reports unchanged. All 62 Windows input tests passed. just check passed formatting, Clippy, and 3,534 of 3,535 tests; the unrelated live-handoff process-discovery test still fails alone on this VPS.

refs #3209

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f1bb6c4-09b7-4cf3-84bb-21fc577a97c7

📥 Commits

Reviewing files that changed from the base of the PR and between d79fd74 and f8d48b8.

📒 Files selected for processing (1)
  • src/client/input/windows_vti.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Windows Terminal paste handling

Layer / File(s) Summary
Paste Enter report decoding
src/client/input/windows_vti.rs
process_raw_events decodes exact adjacent unmodified Enter report pairs in Paste events as \r and resets the Win32 paste-record flag. Tests verify complete pairs decode and incomplete pairs remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to f8d48

This PR restores line breaks for Windows remote multiline paste while preserving unmatched report-shaped text; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the Windows remote multiline paste fix, which is the main change.
Description check ✅ Passed The description directly explains the Windows Terminal Enter-report problem, the decoding fix, preserved behavior for incomplete pairs, and verification results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kangal-bot kangal-bot added the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Trigger automated AI reviews for pull requests admitted by the PR gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants