Skip to content

Conversation

@slkzgm
Copy link
Contributor

@slkzgm slkzgm commented Jan 16, 2026

Fixes #9361

Context

Split out from #9059 per review: #9059 (comment)

Summary

The shortcut overlay renders different paste-image bindings on WSL (Ctrl+Alt+V) vs non-WSL (Ctrl+V), which makes snapshot tests non-deterministic when run under WSL.

Changes

  • Gate WSL detection behind cfg(not(test)) so snapshot tests are deterministic across environments.
  • Add a focused unit test that still asserts the WSL-specific paste-image binding.

Testing

  • just fmt
  • just fix -p codex-tui
  • just fix -p codex-tui2
  • cargo test -p codex-tui
  • cargo test -p codex-tui2

Gate WSL detection behind cfg(not(test)) so shortcut-overlay snapshots stay deterministic across environments. Add a focused unit test that still asserts the WSL-specific paste-image binding.
@etraut-openai
Copy link
Collaborator

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

joshka-oai added a commit that referenced this pull request Jan 18, 2026
Fixes #9058

## Summary
When the transcript backtrack preview is armed (press `Esc`), allow
navigating to newer user messages with the `→` arrow, in addition to
navigating backwards with `Esc`/`←`, before confirming with `Enter`.

## Changes
- Backtrack preview navigation: `Esc`/`←` steps to older user messages,
`→` steps to newer ones, `Enter` edits the selected message (clamped at
bounds, no wrap-around).
- Transcript overlay footer hints updated to advertise `esc/←`, `→`, and
`enter` when a message is highlighted.

## Related
- WSL shortcut-overlay snapshot determinism: #9359

## Testing
- `just fmt`
- `just fix -p codex-tui`
- `just fix -p codex-tui2`
- `cargo test -p codex-tui app_backtrack::`
- `cargo test -p codex-tui pager_overlay::`
- `cargo test -p codex-tui2 app_backtrack::`
- `cargo test -p codex-tui2 pager_overlay::`

---------

Co-authored-by: Josh McKinney <joshka@openai.com>
//! hint. The owning widgets schedule redraws so time-based hints can expire even if the UI is
//! otherwise idle.
#[cfg(target_os = "linux")]
#[cfg(all(target_os = "linux", not(test)))]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like having test related cfg checks in non-test code like this. It makes it difficult to reason about how the behavior works as different behavior under tests is usually not something that most people will anticipate. Likely this instead should be separate test behavior that triggers based on the test environment.

This probably means that we need to investing in actually setting up our CI to have a WSL specific test in the matrix.

@etraut-openai etraut-openai added the needs-response Additional information is requested label Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-response Additional information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WSL: shortcut overlay snapshot tests are non-deterministic

3 participants