## Summary This PR fixes long-text rendering in the `request_user_input` TUI overlay while preserving a clear two-column option layout. (Issue https://github.com/openai/codex/issues/11093) Before: - very long option labels could push description text into a narrow right-edge strip - option labels were effectively single-line when descriptions were present, causing truncation/poor readability - label and description wrapping interacted in one combined wrapped line <img width="504" height="409" alt="Screenshot 2026-02-08 at 2 27 25 PM" src="https://github.com/user-attachments/assets/a9afd108-d792-4522-bce1-e43b3cce882b" /> After: - option labels wrap inside the left column - descriptions wrap independently inside the right column - row measurement and row rendering use the same wrapping path, so layout stays stable <img width="582" height="211" alt="Screenshot 2026-02-09 at 10 28 02 AM" src="https://github.com/user-attachments/assets/47885a1c-07e5-4b0f-b992-032b149f1b0d" /> ## Problem `request_user_input` needs to handle verbose prompts/options. With oversized labels: - descriptions could collapse into a thin, hard-to-read column - important label context was lost ## Root Cause In shared row rendering (`selection_popup_common`): - rows were wrapped as a single combined line - auto column sizing could still place `desc_col` too far right for long labels - `request_user_input` rows did not provide wrap metadata to align continuation lines after the option prefix ## What Changed ### 1) `request_user_input` rows opt into wrapped labels File: `codex-rs/tui/src/bottom_pane/request_user_input/mod.rs` - In `option_rows()`, compute the rendered option prefix (`› 1. ` / ` 2. `) and set `wrap_indent` from its display width. - Apply the same behavior to the synthetic “None of the above” row. - Add long-text snapshot test coverage (`question_with_very_long_option_text` + `request_user_input_long_option_text_snapshot`). ### 2) Shared renderer now has an opt-in two-column wrapping path File: `codex-rs/tui/src/bottom_pane/selection_popup_common.rs` - Add focused helpers: - `should_wrap_name_in_column` - `wrap_two_column_row` - `wrap_standard_row` - `wrap_row_lines` - `apply_row_state_style` - For opted-in rows (plain option rows with `wrap_indent` + description), wrap label and description independently in their own columns. - Keep the legacy standard wrapping path for non-opted rows. - Use the same `wrap_row_lines` function in both rendering and height measurement to keep them in sync. ### 3) Keep column sizing simple and derived from existing fixed split constants File: `codex-rs/tui/src/bottom_pane/selection_popup_common.rs` - Keep fixed mode at `3/10` left column (`30/70` split). - In auto modes, cap label width using those same fixed constants (max 70% label, min 30% description), instead of extra special-case constants/branches. - Add/keep narrow-width safety guard in `wrap_two_column_row` so extremely small widths do not panic. ### 4) Snapshot coverage File: `codex-rs/tui/src/bottom_pane/request_user_input/snapshots/ codex_tui__bottom_pane__request_user_input__tests__request_user_input_long_option_text.snap` - Add snapshot for long-label/long-description two-column rendering behavior. |
||
|---|---|---|
| .devcontainer | ||
| .github | ||
| .vscode | ||
| codex-cli | ||
| codex-rs | ||
| docs | ||
| patches | ||
| scripts | ||
| sdk/typescript | ||
| shell-tool-mcp | ||
| third_party/wezterm | ||
| .bazelignore | ||
| .bazelrc | ||
| .bazelversion | ||
| .codespellignore | ||
| .codespellrc | ||
| .gitignore | ||
| .markdownlint-cli2.yaml | ||
| .npmrc | ||
| .prettierignore | ||
| .prettierrc.toml | ||
| AGENTS.md | ||
| announcement_tip.toml | ||
| BUILD.bazel | ||
| CHANGELOG.md | ||
| cliff.toml | ||
| defs.bzl | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| LICENSE | ||
| MODULE.bazel | ||
| MODULE.bazel.lock | ||
| NOTICE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| rbe.bzl | ||
| README.md | ||
npm i -g @openai/codex
or brew install --cask codex
Codex CLI is a coding agent from OpenAI that runs locally on your computer.
If you want Codex in your code editor (VS Code, Cursor, Windsurf), install in your IDE.
If you are looking for the cloud-based agent from OpenAI, Codex Web, go to chatgpt.com/codex.
Quickstart
Installing and running Codex CLI
Install globally with your preferred package manager:
# Install using npm
npm install -g @openai/codex
# Install using Homebrew
brew install --cask codex
Then simply run codex to get started.
You can also go to the latest GitHub Release and download the appropriate binary for your platform.
Each GitHub Release contains many executables, but in practice, you likely want one of these:
- macOS
- Apple Silicon/arm64:
codex-aarch64-apple-darwin.tar.gz - x86_64 (older Mac hardware):
codex-x86_64-apple-darwin.tar.gz
- Apple Silicon/arm64:
- Linux
- x86_64:
codex-x86_64-unknown-linux-musl.tar.gz - arm64:
codex-aarch64-unknown-linux-musl.tar.gz
- x86_64:
Each archive contains a single entry with the platform baked into the name (e.g., codex-x86_64-unknown-linux-musl), so you likely want to rename it to codex after extracting it.
Using Codex with your ChatGPT plan
Run codex and select Sign in with ChatGPT. We recommend signing into your ChatGPT account to use Codex as part of your Plus, Pro, Team, Edu, or Enterprise plan. Learn more about what's included in your ChatGPT plan.
You can also use Codex with an API key, but this requires additional setup.
Docs
This repository is licensed under the Apache-2.0 License.