fix model picker wrapping (#6589)

Previously the popup measured rows using the full content width while
the renderer drew them with 2 columns of padding, so at certain widths
the layout allocated too little vertical space and hid the third option.
Now both desired_height and render call a shared helper that subtracts
the padding before measuring, so the height we reserve always matches
what we draw and the menu doesn't drops entries.


https://github.com/user-attachments/assets/59058fd9-1e34-4325-b5fe-fc888dfcb6bc
This commit is contained in:
Ahmed Ibrahim
2025-11-13 08:09:13 -08:00
committed by GitHub
parent 2a417c47ac
commit ba74cee6f7
3 changed files with 212 additions and 10 deletions

View File

@@ -0,0 +1,13 @@
---
source: tui/src/bottom_pane/list_selection_view.rs
expression: "render_lines_with_width(&view, 80)"
---
Select Model and Effort
1. gpt-5.1-codex (current) Optimized for Codex. Balance of reasoning
quality and coding ability.
2. gpt-5.1-codex-mini Optimized for Codex. Cheaper, faster, but less
capable.
3. gpt-4.1-codex Legacy model. Use when you need compatibility
with older automations.

View File

@@ -0,0 +1,16 @@
---
source: tui/src/bottom_pane/list_selection_view.rs
expression: "render_lines_with_width(&view, 24)"
---
Debug
1. Item 1
xxxxxxxxx
x
2. Item 2
xxxxxxxxx
x
3. Item 3
xxxxxxxxx
x