Skip to content

[codex] Keep TUI prompt flow recoverable#12

Merged
hzhaoy merged 1 commit into
mainfrom
codex/tui-history-approval-clear
Jul 7, 2026
Merged

[codex] Keep TUI prompt flow recoverable#12
hzhaoy merged 1 commit into
mainfrom
codex/tui-history-approval-clear

Conversation

@hzhaoy

@hzhaoy hzhaoy commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add in-memory prompt history navigation for the TUI input box with Up/Down keys.
  • Preserve slash-command suggestion navigation while regular prompts use input history.
  • Prevent transcript clearing while an inline HITL approval request is still pending, so the resume callback remains reachable.

Why

The input box already captured Up/Down for slash-command suggestions, which meant normal prompt history navigation could not work. Separately, inline approval requests now live inside the chat log, so clearing the transcript during an approval could remove the only widget holding the decision callback and leave the interrupted stream stuck.

Validation

  • uv run pytest
  • git diff --check

Add in-memory prompt history for the TUI composer so arrow navigation recalls recent prompts without breaking slash-command completion. Guard transcript clearing while an inline approval card is still pending so the callback that resumes an interrupted stream remains reachable.

Constraint: Inline HITL approvals are mounted inside the chat transcript.

Rejected: Preserve only approval widgets during clear | leaves users with detached approval context after erasing the surrounding transcript.

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Do not clear pending approval widgets without preserving a usable resume decision path.

Tested: uv run pytest

Tested: git diff --check
@hzhaoy
hzhaoy marked this pull request as ready for review July 6, 2026 15:59
@hzhaoy
hzhaoy merged commit 7fe24d0 into main Jul 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant