Skip to content

Conversation

@charley-oai
Copy link
Collaborator

@charley-oai charley-oai commented Jan 28, 2026

Summary

This PR improves the TUI experience for request_user_input by rendering submitted question/answer sets directly in conversation history with clear, structured formatting.

It also intentionally simplifies interrupt behavior for now: on Esc / Ctrl+C, the questions overlay interrupts the turn without attempting to submit partial answers.

Screenshot 2026-02-02 at 4 51 40 PM

Scope

  • TUI-only changes.
  • No core/protocol/app-server behavior changes in this PR.
  • Resume reconstruction of interrupted question sets is out of scope for this PR.

What Changed

  • Added a new history cell: RequestUserInputResultCell in codex-rs/tui/src/history_cell.rs.
  • On normal request_user_input submission, TUI now inserts that history cell immediately after sending Op::UserInputAnswer.
  • Rendering includes a Questions header with answered/total count.
  • Rendering shows each question as a bullet item.
  • Rendering styles submitted answer lines in cyan.
  • Rendering styles notes (for option questions) as note: lines in cyan.
  • Rendering styles freeform text (for no-option questions) as answer: lines in cyan.
  • Rendering dims only the (unanswered) suffix.
  • Rendering can include an interrupted suffix and summary text when the cell is marked interrupted.
  • Rendering redacts secret questions as •••••• instead of showing raw values.
  • Added wrap_with_prefix(...) in history_cell.rs for wrapped prefixed lines.
  • Added split_request_user_input_answer(...) in history_cell.rs for decoding "user_note: ..." entries.

Interrupt Behavior (Intentional for this PR)

  • Esc / Ctrl+C in the questions overlay now performs Op::Interrupt and exits the overlay.
  • It does not submit partial/committed answers on interrupt.
  • Added TODO comments in request_user_input overlay interrupt paths indicating where interrupted partial result emission should be reintroduced once core support is finalized.
  • Queued request_user_input overlays are discarded on interrupt in the current behavior.

Tests Updated

  • Updated/added overlay tests in codex-rs/tui/src/bottom_pane/request_user_input/mod.rs to reflect interrupt-only behavior.
  • Added helper assertion for interrupt-only event expectation.
  • Existing submission-path tests now validate history insertion behavior and expected answer maps.

Behavior Notes

  • Completed question flows now produce a readable Questions block in transcript history.
  • Interrupted flows currently do not persist partial answers to model-visible tool output.

Follow-ups

  • Reintroduce partial-answer-on-interrupt semantics once core can persist/sequence interrupted request_user_input outputs safely.
  • Optionally add replay/resume rendering for interrupted question sets as a separate PR.

Codex author

codex fork 019bfb8d-2a65-7313-9be2-ea7100d19a61

@charley-oai charley-oai changed the base branch from main to ask-user-question-is-other-in-tui January 28, 2026 05:05
@charley-oai charley-oai force-pushed the partially-submit-user-answers branch from f1ce61c to eae4941 Compare January 28, 2026 05:11
@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eae4941f89

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d755995341

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai force-pushed the partially-submit-user-answers branch from d755995 to ce98d0e Compare January 28, 2026 07:06
Base automatically changed from ask-user-question-is-other-in-tui to main January 28, 2026 17:42
@charley-oai charley-oai force-pushed the partially-submit-user-answers branch from ce98d0e to 93737eb Compare January 28, 2026 19:44
@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 93737eb14a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e3aa042db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai force-pushed the partially-submit-user-answers branch from a2d9589 to f4a934c Compare January 29, 2026 08:53
@charley-oai
Copy link
Collaborator Author

@codex review this

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai force-pushed the partially-submit-user-answers branch from 23df216 to 18fd1fb Compare January 30, 2026 04:07
@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 18fd1fb1a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f90a06fbc2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 586cf07b2f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c385209012

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae9698b32b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai
Copy link
Collaborator Author

@codex review this

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce40172e60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@charley-oai charley-oai force-pushed the partially-submit-user-answers branch from ce40172 to a8b5c2c Compare January 30, 2026 18:21
@charley-oai charley-oai force-pushed the partially-submit-user-answers branch from 6cc71e5 to 1d0c887 Compare February 3, 2026 00:48
@charley-oai charley-oai changed the title Save committed request_user_input answers on interrupt and render questions/answers in tui history TUI: Render request_user_input results in history and simplify interrupt handling Feb 3, 2026
@charley-oai
Copy link
Collaborator Author

@codex review this

@charley-oai charley-oai marked this pull request as ready for review February 3, 2026 01:04
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1a5d62a99

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1811 to +1812
if answer_missing && let Some(last) = question_lines.last_mut() {
last.spans.push(" (unanswered)".dim());
Copy link
Contributor

Choose a reason for hiding this comment

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

P3 Badge Preserve unanswered suffix in wrapping

The (unanswered) suffix is appended after wrap_with_prefix finishes wrapping the question text, so for long questions or narrow terminal widths the suffix can overflow the line and be truncated by the renderer. In that case the user loses the unanswered indicator even though the question is still unanswered. Consider including the suffix in the wrapped text (or placing it on its own wrapped line) so the marker is never pushed past the width limit.

Useful? React with 👍 / 👎.

@charley-oai charley-oai merged commit 8f5eddd into main Feb 3, 2026
32 checks passed
@charley-oai charley-oai deleted the partially-submit-user-answers branch February 3, 2026 01:41
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 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.

3 participants