diff options
| author | akbash <akbash@herdr.dev> | 2026-09-18 02:13:13 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-18 01:13:13 +0200 |
| commit | b88e8116e9e1f7e2f6e8b211536311cd17feca9a (patch) | |
| tree | 699535f31233ae1aee63a110bdbf2e989ba0878b /src | |
| parent | 14351f121f6fc8c84b7c6c6eda78ad210e93cfcb (diff) | |
test: add local windows input gauntlet (#4298)
* test: add local windows input gauntlet
refs #4251
* test: add local windows input gauntlet
Harden elevation and channel identity checks, distinguish known host limitations, and surface incomplete cleanup.
refs #4251
* test(windows): harden input gauntlet execution
refs #4251
* test(windows): make input gauntlet self-contained
refs #4251
* test(windows): bound input gauntlet failure paths
refs #4251
* test(windows): extend input qualification gauntlet
refs #4251
* test(windows): complete input qualification matrix
refs #4251
---------
Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
Co-authored-by: Jonathan Liebig <jonathan.liebig@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/input.rs | 7 | ||||
| -rw-r--r-- | src/client/input/windows_vti.rs | 16 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/client/input.rs b/src/client/input.rs index 848d0156..41850f96 100644 --- a/src/client/input.rs +++ b/src/client/input.rs @@ -327,13 +327,18 @@ fn windows_stdin_reader_loop( should_quit: &Arc<AtomicBool>, ) { if !super::windows_vti_input_backend_enabled() { + windows_vti::trace_input_transport("reader=crossterm"); windows_crossterm_reader_loop(event_tx, should_quit); } else { match windows_vti::console_input_handle() { Ok(handle) => { + windows_vti::trace_input_transport("reader=windows-console"); windows_vti::raw_console_reader_loop(handle, event_tx, should_quit); } - _ => windows_crossterm_reader_loop(event_tx, should_quit), + _ => { + windows_vti::trace_input_transport("reader=crossterm-fallback"); + windows_crossterm_reader_loop(event_tx, should_quit); + } } } } diff --git a/src/client/input/windows_vti.rs b/src/client/input/windows_vti.rs index 48fe8220..2b92c167 100644 --- a/src/client/input/windows_vti.rs +++ b/src/client/input/windows_vti.rs @@ -4,6 +4,8 @@ use std::collections::VecDeque; use std::sync::atomic::{AtomicBool, Ordering}; #[cfg(windows)] use std::sync::Arc; +#[cfg(windows)] +use std::{fs::OpenOptions, io::Write as _}; #[cfg(windows)] use tokio::sync::mpsc; @@ -57,6 +59,19 @@ pub(super) fn raw_console_reader_loop( } #[cfg(windows)] +pub(super) fn trace_input_transport(value: &str) { + let Some(path) = std::env::var_os("HERDR_WINDOWS_INPUT_TRACE_FILE") else { + return; + }; + if let Ok(mut output) = OpenOptions::new().create(true).append(true).open(path) { + let _ = writeln!(output, "{value}"); + } +} + +#[cfg(not(windows))] +fn trace_input_transport(_value: &str) {} + +#[cfg(windows)] fn process_platform_input_items( items: Vec<PlatformInputItem>, pump: &mut WindowsInputPump, @@ -774,6 +789,7 @@ impl WindowsInputMapper { items.push(PlatformInputItem::Bytes(bytes)) } WindowsWin32InputModeItem::Key { bytes, record } => { + trace_input_transport("transport=win32-serialized"); let win32_paste_bytes = self.paste_payload_bytes_for_key(record).unwrap_or_default(); if let Some(raw_bytes) = self.win32_input_mode_key_record_raw_bytes(record) { |
