Skip to content

fix(tui): warn on unsupported iTerm2 pet versions#23371

Merged
fcoury-oai merged 1 commit into
mainfrom
fcoury/pets-iterm
May 18, 2026
Merged

fix(tui): warn on unsupported iTerm2 pet versions#23371
fcoury-oai merged 1 commit into
mainfrom
fcoury/pets-iterm

Conversation

@fcoury-oai
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai commented May 18, 2026

Why

Older iTerm2 builds can be detected as supporting the image transport that terminal pets use, but in practice they fail to render the pet flow correctly. Instead of silently attempting image rendering, Codex should tell the user that their iTerm2 version is too old and that upgrading is the fix.

What Changed

  • gate iTerm2 pet auto-detection on version 3.6.0 or newer
  • show a dedicated upgrade message for older or unknown iTerm2 versions instead of the generic unsupported-terminal warning
  • keep the existing generic unsupported-terminal path for non-iTerm terminals
  • add regression coverage for iTerm2 version parsing and the old-iTerm warning path

How to Test

  1. Start Codex in iTerm2 3.6 or newer.
  2. Run /pets.
  3. Confirm the pets picker opens instead of showing a warning.
  4. Start Codex in an older iTerm2 build, or exercise the equivalent test path.
  5. Run /pets.
  6. Confirm Codex warns that pets require iTerm2 3.6 or newer and tells the user to upgrade.
  7. Also verify that a non-iTerm unsupported terminal still shows the generic unsupported-terminal message.

Targeted tests:

  • cargo test -p codex-terminal-detection
  • cargo test -p codex-tui pets::
  • cargo test -p codex-tui slash_pets_on_unsupported_terminal
  • cargo test -p codex-tui slash_pets_on_old_iterm2

@fcoury-oai fcoury-oai force-pushed the fcoury/pets-iterm branch from 32fcdf7 to 3ed10b9 Compare May 18, 2026 22:46
@fcoury-oai fcoury-oai force-pushed the fcoury/pets-iterm branch from 3ed10b9 to d436cd8 Compare May 18, 2026 22:50
@fcoury-oai fcoury-oai changed the title [codex] gate iTerm2 pet support by version fix(tui): warn on unsupported iTerm2 pet versions May 18, 2026
@fcoury-oai fcoury-oai marked this pull request as ready for review May 18, 2026 22:50
Copy link
Copy Markdown
Contributor

@canvrno-oai canvrno-oai left a comment

Choose a reason for hiding this comment

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

Tested and reviewed. When running the /pets command on an older version of iTerm, the expected message was displayed:
⚠ Pets require iTerm2 3.6 or newer. Upgrade iTerm2 to use terminal pets.

When running in a newer iTerm version, /pets worked as expected.

@fcoury-oai fcoury-oai merged commit a66712c into main May 18, 2026
31 checks passed
@fcoury-oai fcoury-oai deleted the fcoury/pets-iterm branch May 18, 2026 23:24
@github-actions github-actions Bot locked and limited conversation to collaborators May 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants