Skip to content

Fix Enter key omitting the selected serial line ending - #52

Open
CAOShurong wants to merge 2 commits into
nesnes:mainfrom
CAOShurong:agent/fix-enter-line-ending
Open

Fix Enter key omitting the selected serial line ending#52
CAOShurong wants to merge 2 commits into
nesnes:mainfrom
CAOShurong:agent/fix-enter-line-ending

Conversation

@CAOShurong

@CAOShurong CAOShurong commented Aug 9, 2026

Copy link
Copy Markdown

Fixes #46.

The issue report by @grbl-IO correctly identified that the Enter handler called sendText with only the text, while the Send button also passed input.endlineToSend. This makes both paths call the same function with the same two arguments, so devices requiring CR, LF, or CRLF receive the configured ending regardless of how the command is submitted.

Validation:

  • npm --prefix server test covers both template handlers and the CRLF, LF, CR, and empty-ending conversions without adding dependencies. The same test passes with Node 14.21.3 on Windows x64 and Ubuntu 24.04 WSL2 x64.
  • A headless VS Code-webview harness exercised the real Vue keyup and click handlers for all four endings and observed identical sendToSerial messages with no page or console errors.
  • A source-level boundary harness loaded DataInputSerial.js and vscode/src/extension.ts, then used SerialPort 10.5.0's mock binding to record the final bytes written by SerialPort.write. Windows and Linux Node 14 runs matched byte-for-byte for CRLF, LF, CR, empty ending, terminator-only, and UTF-8 payload cases.
  • The server packaged for node14-windows-x64; the generated executable started and served the same verified UI path.

SerialPort.list() found no active Windows port on the validation host, so no physical-device claim is made; the serial-library boundary was validated with its official mock binding.

@CAOShurong
CAOShurong marked this pull request as ready for review August 9, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serial send: Enter key does not include selected line ending (CR/LF)

1 participant