Render Agent request failures in the TUI#14044
Conversation
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR factors failed Agent Mode request presentation into a shared helper and adds TUI rendering for failed agent requests, including quota, invalid API key, context-window, AWS Bedrock credential, and usage-notice states. No approved spec context was provided, and I did not find security issues in the changed code paths.
Concerns
- This is user-facing TUI behavior, but the PR description does not include the required TUI visual evidence. Please attach a terminal transcript,
render_to_lines/TuiBuffer::to_linessnapshot output, or a./script/run-tuicapture demonstrating the failure states end to end.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Co-Authored-By: Oz <oz-agent@warp.dev>
fb8986b to
545d1fe
Compare
| (message.clone(), body_style), | ||
| ]) | ||
| .finish(), | ||
| FailedOutputPresentation::InvalidApiKey { title, detail } => TuiText::from_spans([ |
There was a problem hiding this comment.
seeing the TUI ui framework come together such that we can add this without new elements is very satisfying
There was a problem hiding this comment.
for sure, this PR stands on the shoulder of giants

Description
Surface Agent Mode request failures in the headless TUI using presentation logic shared with the GUI. Out-of-credits failures match the supplied TUI design with exact copy, semantic styling, and clickable plan/BYOK actions inside the transcript while keeping the persistent footer metadata-only.
Implementation plan: https://staging.warp.dev/drive/notebook/Q4amHEjF0oDbPPvwB5t9Y2
Shared GUI/TUI surfaces
flowchart LR Error["RenderableAIError"] --> Presentation["Shared presentation layer<br/>failed_output_presentation<br/>FailedOutputPresentation"] Policy["Shared policy and state<br/>UserWorkspaces<br/>AIRequestUsageModel"] --> Presentation Usage["Shared usage-notice predicate<br/>should_show_failed_output_usage_notice"] --> GUI Usage --> TUI Presentation --> GUI["GUI renderer<br/>render_failed_output"] Presentation --> TUI["TUI renderer<br/>TuiAIBlock::sections"] GUI --> GUIControls["GUI-specific controls<br/>upgrade and settings actions"] TUI --> TUIRows["TUI-specific composition<br/>cell rows and TuiHoverable links"]Linked Issue
N/A
ready-to-specorready-to-implement.Testing
cargo nextest run -p warp_tui(429 passed)cargo check -p warp -p warp_tui --libcargo clippy -p warp -p warp_tui --all-targets -- -D warnings./script/formatgit diff --check./script/runAgent Mode
CHANGELOG-IMPROVEMENT: Show actionable Agent Mode request failures in the headless TUI.
Co-Authored-By: Oz oz-agent@warp.dev