-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
What version of Codex is running?
Built from source (codex-rs TUI).
What platform is your computer?
WSL2 (Windows).
What issue are you seeing?
Snapshot tests for the TUI shortcut overlay are non-deterministic under WSL.
On WSL, Codex detects the environment and renders the paste-image shortcut as Ctrl+Alt+V (many terminals intercept Ctrl+V), while non-WSL renders Ctrl+V.
Because the snapshot output depends on this detection, running cargo test -p codex-tui / cargo test -p codex-tui2 under WSL can fail with diffs like:
ctrl + v to paste images→ctrl + ⌥ + v to paste images
What steps can reproduce the bug?
- Run Codex from source under WSL2.
- Run the TUI unit tests:
cargo test -p codex-tuicargo test -p codex-tui2
- Observe snapshot failures in footer/shortcut overlay tests.
What is the expected behavior?
Snapshot tests should be deterministic across environments. WSL-specific runtime behavior is fine, but unit test snapshots should not depend on host detection.
Additional information
A fix is proposed in PR #9359: gate WSL detection behind cfg(not(test)) (runtime unchanged) and add a focused unit test that still asserts the WSL-specific paste-image binding.