mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
19d8f71a98
## Summary Polishes the `request_user_input` TUI overlay Question 1 (unanswered) <img width="853" height="167" alt="Screenshot 2026-01-27 at 1 30 09 PM" src="https://github.com/user-attachments/assets/3c305644-449e-4e8d-a47b-d689ebd8702c" /> Tab to add notes <img width="856" height="198" alt="Screenshot 2026-01-27 at 1 30 25 PM" src="https://github.com/user-attachments/assets/0d2801b0-df0c-49ae-85af-e6d56fc2c67c" /> Question 2 (unanswered) <img width="854" height="168" alt="Screenshot 2026-01-27 at 1 30 55 PM" src="https://github.com/user-attachments/assets/b3723062-51f9-49c9-a9ab-bb1b32964542" /> Ctrl+p or h to go back to q1 (answered) <img width="853" height="195" alt="Screenshot 2026-01-27 at 1 31 27 PM" src="https://github.com/user-attachments/assets/c602f183-1c25-4c51-8f9f-e565cb6bd637" /> Unanswered freeform <img width="856" height="126" alt="Screenshot 2026-01-27 at 1 31 42 PM" src="https://github.com/user-attachments/assets/7e3d9d8b-820b-4b9a-9ef2-4699eed484c5" /> ## Key changes - Footer tips wrap at tip boundaries (no truncation mid‑tip); footer height scales to wrapped tips. - Keep tooltip text as Esc: interrupt in all states. - Make the full Tab: add notes tip cyan/bold when applicable; hide notes UI by default. - Notes toggling/backspace: - Tab opens notes when an option is selected; Tab again clears notes and hides the notes UI. - Backspace in options clears the current selection. - Backspace in empty notes closes notes and returns to options. - Selection/answering behavior: - Option questions highlight a default option but are not answered until Enter. - Enter no longer auto‑selects when there’s no selection (prevents accidental answers). - Notes submission can commit the selected option when present. - Freeform questions require Enter with non‑empty text to mark answered; drafts are not submitted unless committed. - Unanswered cues: - Skipped option questions count as unanswered. - Unanswered question titles are highlighted for visibility. - Typing/navigation in options: - Typing no longer opens notes; notes are Tab‑only. - j/k move option selection; h/l switch questions (Ctrl+n/Ctrl+p still work). ## Tests - Added unit coverage for: - tip‑level wrapping - focus reset when switching questions with existing drafts - backspace clearing selection - backspace closing empty notes - typing in options does not open notes - freeform draft submission gating - h/l question navigation in options - Updated snapshots, including narrow footer wrap. ## Why These changes make the ask‑user‑question overlay: - safer (no silent auto‑selection or accidental freeform submission), - clearer (tips wrap cleanly and unanswered states stand out), - more ergonomic (Tab explicitly controls notes; backspace acts like undo/close). ## Codex author `codex fork 019bfc3c-2c42-7982-9119-fee8b9315c2f` --------- Co-authored-by: Ahmed Ibrahim <aibrahim@openai.com>
19d8f71a98
·
2026-01-27 14:57:07 -08:00
History