[codex] Keep TUI approvals inline#11
Conversation
Inline HITL approval cards avoid modal takeover and keep approval outcomes visible in the chat stream. Help and worker-error paths now render in the transcript as well, while stale approval modal code is removed to prevent regressions back to full-screen prompts. Constraint: TUI approval decisions must preserve existing resume_with_decision payloads Rejected: Keep ApprovalModal as a fallback | no production path remained and it preserved an unwanted full-screen interaction Confidence: high Scope-risk: moderate Directive: Do not reintroduce approval popups without a transcript-first interaction review Tested: uv run pytest Not-tested: Manual terminal rendering across very small viewport sizes
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c40e8e82e
ℹ️ 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".
| from deep_code_agent.tui.widgets.approval_request import ApprovalRequest | ||
|
|
||
| widget = ApprovalRequest(interrupt_data, callback=callback) | ||
| self._mount_above_todos_card(widget) |
There was a problem hiding this comment.
Preserve pending approvals when clearing chat
Because the active approval prompt is now mounted inside the chat log, the existing Ctrl+L screen binding can call clear_messages() while an HITL interrupt is waiting. That removes the only widget holding on_decision, so the interrupted stream never receives a resume decision and the input remains disabled until the user restarts/exits. Please either ignore/disable clear while an approval is pending or keep pending ApprovalRequest widgets out of the cleared transcript.
Useful? React with 👍 / 👎.
What changed
Why
The previous approval modal took over the terminal window, could obscure options, and did not match the transcript-first interaction style used by CLI coding agents. Approval decisions are now visible where the tool call appears, without redundant popups.
User impact
Users can review and approve tool calls inside the normal TUI flow. Keyboard interaction is more predictable, accidental mouse approvals are avoided, and non-essential popups are reduced.
Validation
uv run pytest