[APP-2267] Show credit footer for cancelled long-running commands#9695
[APP-2267] Show credit footer for cancelled long-running commands#9695vkodithala wants to merge 4 commits intomasterfrom
Conversation
0f63fe9 to
e548cb4
Compare
| let has_expanded_last_requested_command = status.output_to_render().is_some_and(|output| { | ||
| let output = output.get(); | ||
| output.messages.last().is_some_and(|message| { | ||
| let AIAgentOutputMessageType::Action(action) = &message.message else { | ||
| return false; | ||
| }; | ||
|
|
||
| matches!( | ||
| &action.action, | ||
| AIAgentActionType::RequestCommandOutput { .. } | ||
| ) && props | ||
| .requested_commands | ||
| .get(&action.id) | ||
| .is_some_and(|requested_command| { | ||
| requested_command.view.as_ref(app).is_header_expanded() | ||
| }) | ||
| }) | ||
| }); |
There was a problem hiding this comment.
context: We track (and use) this to fix an issue where the credit footer rendered while a cancelled LRC was expanded/in user control.
a65fdbf to
b9ca67f
Compare
|
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 hides CLI-subagent bootstrap exchanges from blocklist ownership/rendering and updates response footer/suggestion visibility around requested command detail views.
Concerns
- Expanded MCP tool-call details are not considered by the new last-expanded-requested-action check, so completed MCP tool calls can still show response controls under the expanded tool details.
- Requested-command margin removal still consults hidden root-task exchanges; hidden bootstrap exchanges can therefore keep affecting spacing even though they are no longer rendered.
Verdict
Found: 0 critical, 2 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
| matches!( | ||
| &action.action, | ||
| AIAgentActionType::RequestCommandOutput { .. } | ||
| ) && props | ||
| .requested_commands | ||
| .get(&action.id) | ||
| .is_some_and(|requested_command| { | ||
| requested_command.view.as_ref(app).is_header_expanded() | ||
| }) |
There was a problem hiding this comment.
CallMCPTool at the end of the output will still render response controls under the tool details.
| matches!( | |
| &action.action, | |
| AIAgentActionType::RequestCommandOutput { .. } | |
| ) && props | |
| .requested_commands | |
| .get(&action.id) | |
| .is_some_and(|requested_command| { | |
| requested_command.view.as_ref(app).is_header_expanded() | |
| }) | |
| match &action.action { | |
| AIAgentActionType::RequestCommandOutput { .. } => props | |
| .requested_commands | |
| .get(&action.id) | |
| .is_some_and(|requested_command| { | |
| requested_command.view.as_ref(app).is_header_expanded() | |
| }), | |
| AIAgentActionType::CallMCPTool { .. } => props | |
| .requested_mcp_tools | |
| .get(&action.id) | |
| .is_some_and(|requested_tool| { | |
| requested_tool.view.as_ref(app).is_header_expanded() | |
| }), | |
| _ => false, | |
| } |
| && conversation | ||
| .root_task_exchanges() | ||
| .skip_while(|exchange| { | ||
| exchange.id != self.client_ids.client_exchange_id | ||
| }) | ||
| .nth(1) | ||
| .map_or(false, |exchange| { |
There was a problem hiding this comment.
| && conversation | |
| .root_task_exchanges() | |
| .skip_while(|exchange| { | |
| exchange.id != self.client_ids.client_exchange_id | |
| }) | |
| .nth(1) | |
| .map_or(false, |exchange| { | |
| && conversation | |
| .root_task_exchanges() | |
| .skip_while(|exchange| { | |
| exchange.id != self.client_ids.client_exchange_id | |
| }) | |
| .skip(1) | |
| .find(|exchange| !conversation.is_exchange_hidden(exchange.id)) | |
| .map_or(false, |exchange| { |

Description
Fixes APP-2267.
When a user cancels or takes over an agent-initiated long-running command after the CLI subagent starts, Warp creates an internal CLI-subagent bootstrap exchange. That exchange is removed from the visible blocklist UI, but it still exists in the conversation and was incorrectly becoming the latest footer-owning exchange. As a result, the visible requested-command output did not render the stopped-task footer or response toolbelt after the command completed.
There was an adjacent issue where we removed the bottom padding for requested command views (LRCs and MCP tool calls). This was added back on the next exchange, but kept removed for cancelled conversations with LRCs as their last visible exchange; see demo below for an example. We fix this here, too.
This PR:
No server API dependencies.
Testing
Manually verified. Demo here.
cargo fmt --all --manifest-path /Users/vkodithala/Desktop/warp/warp.varoon-fix-credit-footer/Cargo.tomlcargo check --manifest-path /Users/vkodithala/Desktop/warp/warp.varoon-fix-credit-footer/Cargo.toml -p warp --libgit --no-pager -C /Users/vkodithala/Desktop/warp/warp.varoon-fix-credit-footer diff --checkNo automated tests were added; the core change is UI ownership/rendering behavior around hidden exchanges and requested-command expansion state, and the targeted manual repro covers the regression.
Server API dependencies
No server dependencies.
Agent Mode
Changelog Entries for Stable
CHANGELOG-BUG-FIX: Fixed response controls and stopped-task footer visibility after cancelling agent-initiated long-running commands and MCP tool calls.
Co-Authored-By: Oz oz-agent@warp.devever