Add code review comments chip to the agent view input#13255
Add code review comments chip to the agent view input#13255warp-dev-github-integration[bot] wants to merge 4 commits into
Conversation
Adds an opt-in context chip to the agent-view input footer that shows code-review comment resolution progress (resolved / total) for the active conversation, mirroring the existing todo chip. Clicking it opens a popup listing each comment as a one-line summary that expands to the full body. "Resolved" maps to the conversation's CodeReview state: total = pending_comments + addressed_comments, resolved = addressed_comments (comments the agent has addressed after they were sent from the code review panel). The chip is gated behind the CodeReviewCommentsChip feature flag and is offered in the agent toolbelt configurator's available list but is NOT in the default footer selection. Co-Authored-By: Warp <agent@warp.dev>
|
@warp-dev-github-integration[bot] 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 adds an opt-in Code Review Comments context chip to the agent input footer, with a popup showing resolved/total review-comment progress for the active conversation.
Concerns
- For this user-facing change, please include screenshots or a screen recording demonstrating it working end to end. The PR description mentions computer-use verification, but no screenshot or video artifact is attached for reviewers to inspect.
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
|
Addressed the review — added the requested visual artifact. I captured a screenshot from a logged-in build (compiled with the This cloud runner can't attach binary images to GitHub directly via the API, so the screenshot is attached to the linked Slack thread ( The populated-chip path (live Re-requesting review. |
harryalbert
left a comment
There was a problem hiding this comment.
Can you also please get a screenshot of this chip in an expanded state w/ the pop up, some comments resolve, some unresolved?
| const COMMENTS_BUTTON_SAVE_POSITION_ID: &str = "code_review_comments::comments_button"; | ||
|
|
||
| /// Reads the active conversation's code review state, if any. | ||
| fn selected_code_review<'a>( |
There was a problem hiding this comment.
Done — inlined selected_code_review into its call sites (should_render, the chip render, and the popup render) in 551c1f2.
| } | ||
|
|
||
| /// Returns `(resolved, total)` review comment counts for the active conversation. | ||
| fn resolved_and_total(code_review: &CodeReview) -> (usize, usize) { |
There was a problem hiding this comment.
Done — inlined resolved_and_total (now addressed.len() / addressed.len() + pending.len()) at each call site in 551c1f2.
Inline the `selected_code_review` and `resolved_and_total` helpers into their call sites in the chip and popup views, per review feedback. Drops the now-obsolete counts unit test (the logic is inline); keeps the available-but-not-default coverage. Co-Authored-By: Warp <agent@warp.dev>
|
Re: the expanded-popup screenshot — done. I temporarily seeded a sample review (1 resolved + 2 unresolved) in a local build to reach the populated state, captured the screenshot, then reverted the stub (it is not in the pushed diff). The screenshot shows the footer chip reading 1/3 and the open popup titled "Comments 1/3" with three rows: one resolved ( As before, this runner can't attach images to GitHub via the API, so the screenshot is posted in the linked Slack thread ( Also addressed the two inline comments by inlining both helper fns (551c1f2). Re-requesting review. |
The popup rows previously showed each comment's file/line location (`ReviewComment::title()`). Instead, show the actual comment text, collapsing internal whitespace/newlines into a single line and clipping with an ellipsis based on the available width (with a defensive char cap). Adds `ReviewComment::summary()` plus unit tests covering truncation, whitespace collapsing, and the empty-content fallback to `title()`. Co-Authored-By: Oz <oz-agent@warp.dev>
Match the blocklist's "addressed comment" styling: resolved rows in the code review comments popup now use the shared green `addressed_comment_icon` instead of a muted checkmark, so resolution reads at a glance. Pending rows keep the neutral chat-bubble icon. Co-Authored-By: Oz <oz-agent@warp.dev>
What
Adds a new opt-in context chip to the agent-view input footer that shows code-review comment resolution progress (
resolved / total) for the active conversation, mirroring the existing todo chip. Clicking it opens a small popup that lists each comment as a one-line summary which expands to the full comment body (like the code-review comment cards).Requested in the factory-client triage thread.
Why
Users want an at-a-glance indicator of how many review comments the agent has addressed, reachable from the agent input without opening the code review panel.
How
ContextChipKind::CodeReviewComments(comment/speech-bubble icon,Icon::MessageChatSquare), seeded likeAgentPlanAndTodoListso visibility is gated by the view'sshould_render.CodeReviewCommentsView(the chip) andCodeReviewCommentsPopupView(the expandable comment list) inapp/src/ai/blocklist/prompt/code_review_comments.rs, modeled onPlanAndTodoListView/AgentTodosPopupView.CodeReview(app/src/ai/agent/comment.rs), exposed via a newAIConversation::code_review()accessor.total = pending_comments + addressed_comments,resolved = addressed_comments(comments the agent has addressed after they were sent from the code review panel).DisplayChip(DisplayChipKind::CodeReviewComments) and the agent footer.agent_footer_available_chips) but not added todefault_left()/default_right().CodeReviewCommentsChipfeature flag (enabled for dogfood builds).Validation
cargo build --bin warp --features code_review_comments_chip— clean.cargo clippy -p warp --features code_review_comments_chip --lib -- -D warnings— clean.cargo fmtapplied.code_review_comments_tests.rs): counts logic (resolved/total) and available-but-not-default behavior (with the flag on it is inall_available()/agent_footer_available_chips()but not indefault_left/default_right; with the flag off it is not available). 3/3 pass.Notes
resolved/totalcount + popup) requires an active conversation with review comments sent to the agent, which is impractical to stage end-to-end via computer use; that path is covered by the unit test on the counts logic and by mirroring the proven todo-chip/popup implementation. The configurator (available-not-default) behavior was verified live.Conversation: https://staging.warp.dev/conversation/3ec4547e-83e4-4171-8ade-0bdefa28f80d
Run: https://oz.staging.warp.dev/runs/019f19e1-cc80-788a-9155-eb4b38905cd4
This PR was generated with Oz.