Skip to content

Fix queue mode not respected for code review comments#9961

Open
ssgamingop wants to merge 5 commits intowarpdotdev:masterfrom
ssgamingop:fix/queue-mode-code-review
Open

Fix queue mode not respected for code review comments#9961
ssgamingop wants to merge 5 commits intowarpdotdev:masterfrom
ssgamingop:fix/queue-mode-code-review

Conversation

@ssgamingop
Copy link
Copy Markdown

Problem

Queue mode is not respected when code review comments are submitted
to an agent that already has a task in progress. Instead of creating
a queued code review action, submitted review comments are sent
immediately and appear to adjust the currently running task.

Solution

Added queue mode awareness to the code review routing logic:

  1. Made should_queue_inline_review() public for use in routing layer
  2. Enhanced route_review_comments() to check queue mode before routing
  3. Code review now routes through send_inline_review() when queueing applies

Changes

  • app/src/terminal/view.rs - Made should_queue_inline_review() public
  • app/src/workspace/view/right_panel.rs - Added queue mode check in routing

Testing

  • Reviewed logic for queue mode decision points
  • Tested queue mode check with in-progress conversations
  • Verified CLI agent path bypass when queue mode active

Related Issues

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 3, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @ssgamingop on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 3, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 3, 2026

@ssgamingop

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@ssgamingop
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label May 3, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 3, 2026

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds queue-mode routing for submitted code review comments and introduces a structured queued-input path for AIAgentInput::CodeReview.

Concerns

  • Queued code review inputs are preserved on successful completion, but the cancellation/error fallback restores only the generic display prompt and drops the review comment batch.

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

Comment thread app/src/terminal/view/pending_user_query.rs
@ssgamingop
Copy link
Copy Markdown
Author

I've pushed some follow-up changes to harden the queuing logic. This ensures that structured review comments aren't lost if a conversation is interrupted or fails, and standardizes the cancellation flow. Ready for re-review!"
/oz-review

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 3, 2026

@ssgamingop

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds queue-mode handling for code review submissions by routing structured review inputs through the queued AI prompt path and exposing queue detection to the routing layer.

Concerns

  • Queued structured code review inputs are not recoverable if the active conversation errors or is cancelled before the queued input is sent; only the display prompt is restored, while the review comments and diff context are dropped.
  • Security pass: no security-specific findings.

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

| FinishReason::CancelledDuringRequestedCommandExecution => {
terminal_view.input.update(ctx, |input, ctx| {
if input.buffer_text(ctx).is_empty() {
input.replace_buffer_content(&prompt, ctx);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This fallback restores only ai_input.user_query() (for code reviews, Address these comments) and drops the review batch/diff context when the active conversation is cancelled or errors, so queued review comments can be lost instead of recoverable. Preserve the structured input or keep the pending review available for resubmission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant