TUI: request_user_input options render vertically when option label is long (description column collapses to 1)
What version of Codex CLI is running?
codex-cli 0.98.0
What subscription do you have?
doesn't matter
Which model were you using?
_No response_
What platform is your computer?
_No response_
What terminal emulator and version are you using (if applicable)?
_No response_
What issue are you seeing?
<img width="1908" height="1600" alt="Image" src="https://github.com/user-attachments/assets/185672e2-ae15-4c5f-8406-105eb6e74401" />
Summary
In the request_user_input overlay, if an option label (left column) is very long, the shared selection-row renderer computes the description start column so far to the right that only 1 terminal cell remains for the description. With wrapping enabled, that forces the description to wrap one character per line, producing the vertical right-edge text seen in the screenshot.
Where This Happens (commit b3de6c7f2b5fd5f8e5a2cf98e06f1615d858329b)
request_user_input builds GenericDisplayRow where the option label is name and the option description is description:
- https://github.com/openai/codex/blob/b3de6c7f2b5fd5f8e5a2cf98e06f1615d858329b/codex-rs/tui/src/bottom_pane/request_user_input/mod.rs#L268
- https://github.com/openai/codex/blob/b3de6c7f2b5fd5f8e5a2cf98e06f1615d858329b/codex-rs/tui/src/bottom_pane/request_user_input/mod.rs#L283-L286
The overlay renders option rows through the shared selection renderer (render_rows):
- https://github.com/openai/codex/blob/b3de6c7f2b5fd5f8e5a2cf98e06f1615d858329b/codex-rs/tui/src/bottom_pane/request_user_input/render.rs#L307
- https://github.com/openai/codex/blob/b3de6c7f2b5fd5f8e5a2cf98e06f1615d858329b/codex-rs/tui/src/bottom_pane/request_user_input/render.rs#L319
Shared selection-row renderer computes desc_col as min(max_name_width + 2, content_width - 1), which can leave only 1 cell for description:
- https://github.com/openai/codex/blob/b3de6c7f2b5fd5f8e5a2cf98e06f1615d858329b/codex-rs/tui/src/bottom_pane/selection_popup_common.rs#L200-L249
- https://github.com/openai/codex/blob/b3de6c7f2b5fd5f8e5a2cf98e06f1615d858329b/codex-rs/tui/src/bottom_pane/selection_popup_common.rs#L246
When a description exists, wrapping indents continuation lines to desc_col:
- https://github.com/openai/codex/blob/b3de6c7f2b5fd5f8e5a2cf98e06f1615d858329b/codex-rs/tui/src/bottom_pane/selection_popup_common.rs#L251-L262
- https://github.com/openai/codex/blob/b3de6c7f2b5fd5f8e5a2cf98e06f1615d858329b/codex-rs/tui/src/bottom_pane/selection_popup_common.rs#L419-L426
word_wrap_line clamps the available width after indent to at least 1 cell:
Default wrapping options enable break_words: true, so a 1-cell width becomes 1-char-per-line output:
Repro (Minimal Condition)
Let W = content_width passed to compute_desc_col.
If the widest visible row.name has display width >= W - 3, then:
desc_colbecomesW - 1.- Remaining description width becomes
W - desc_col = 1. - Description wraps as 1 character per line at the far right edge.
This is easy to hit with long option labels (especially when the menu surface inset reduces available width).
Expected
The description area should keep a reasonable minimum width (or fall back to a single-column layout, render description on the next line, or truncate), but not collapse to 1 terminal cell.
Actual
Description wraps vertically (one character per line), making the UI unreadable.
Notes On Tests
Existing request_user_input snapshots use relatively short labels and do not cover this edge case.
What steps can reproduce the bug?
-
What is the expected behavior?
_No response_
Additional information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗