Mark imported PR comments added to code review#9648
Mark imported PR comments added to code review#9648dhruvac29 wants to merge 2 commits intowarpdotdev:masterfrom
Conversation
|
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 @dhruvac29 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 |
|
I'm starting a first review of this pull request. I reviewed this pull request and requested human review from: @zachbai. Comment I completed the review and posted feedback on this pull request. Comment I'm re-reviewing this pull request in response to a review request. I reviewed this pull request and requested human review from: @zachbai. Comment I reviewed this pull request and requested human review from: @zachbai. Comment You can view the conversation on Warp. I reviewed this pull request and requested human review from: @zachbai. Comment Powered by Oz |
There was a problem hiding this comment.
Pull request overview
Updates the imported PR comments UI so a comment card reflects when its “Open in code review” action has already been used, preventing repeated adds and clarifying state for the user (Fixes #9627).
Changes:
- Adds per-imported-comment state to track whether a comment has been added to the code review panel.
- Updates the per-comment “Open in code review” button to switch to a disabled “Added to code review” state after use.
- Refactors repo/CWD-based disabling to flow through a single per-comment button update method.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Overview
This PR adds per-imported-comment UI state so a comment card's button changes from "Open in code review" to a disabled "Added to code review" state after the per-comment import action is used, while preserving the existing repository/CWD disabled behavior.
Concerns
- No blocking correctness, security, or error-handling concerns found in the changed diff.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
2435b0c to
5dfffce
Compare
There was a problem hiding this comment.
Overview
This PR tracks per-imported-comment UI state so cards switch from Open in code review to disabled Added to code review after they are opened, while keeping the repository/CWD disabled state separate.
Concerns
- The bulk open action only marks comments owned by the AI block that handled the click, but the existing bulk import path collects comments from every AI block in the current thread. If the footer is rendered on a later block that does not own the imported comments, earlier source cards remain enabled after the comments are imported.
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
There was a problem hiding this comment.
Pull request overview
Adds UI state tracking so imported PR comment cards reflect when they’ve already been added to the code review panel, while keeping the existing repo/CWD-based disabled behavior.
Changes:
- Add an
added_to_code_reviewflag to imported-comment element state and centralize label/disabled/tooltip derivation. - Update imported-comment actions to mark comments as “Added to code review” after opening in the review panel (single and bulk).
- Add unit tests for the button state logic and precedence rules.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/src/ai/blocklist/block.rs | Adds per-imported-comment “added” state, updates button state computation, and marks state on open actions. |
| app/src/ai/blocklist/block_tests.rs | Adds tests covering button label/disabled/tooltip behavior for repo-disabled vs already-added states. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5dfffce to
b068f0b
Compare
There was a problem hiding this comment.
Overview
This PR tracks imported PR comments that have already been opened in the code review panel, updates per-comment button state to "Added to code review", and preserves the existing CWD/repo disabled behavior.
Concerns
- No blocking correctness, security, or error-handling concerns found in the changed diff.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
There was a problem hiding this comment.
Overview
This PR tracks imported PR comments that have already been opened in the code review panel and updates the source cards to a disabled "Added to code review" state while preserving the existing repository/CWD disabled behavior.
Concerns
- No blocking correctness or security concerns found in the changed diff.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
There was a problem hiding this comment.
Pull request overview
This PR improves the imported PR comments UI by tracking when an imported comment has already been opened/added to the code review panel, and updating the source comment card to reflect that state (while preserving the existing repo/CWD-based disabled behavior).
Changes:
- Track an
added_to_code_reviewstate per imported comment and update the “Open in code review” button to a disabled “Added to code review” state after use. - When importing all comments for a conversation thread, mark the originating blocks’ imported comments as “added to code review”.
- Add unit tests for the imported comment button state logic (label/disabled/tooltip precedence).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/src/terminal/view.rs | Collects source AI blocks when importing all comments and marks their imported comment buttons as “added”. |
| app/src/ai/blocklist/block.rs | Adds added_to_code_review state + button state computation and updates single-comment open to mark the button as added. |
| app/src/ai/blocklist/block_tests.rs | Adds tests for button-state logic (added-state vs repo-disabled/tooltip). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Overview
This PR tracks imported PR comment cards after they are opened in code review, updates the per-comment button label/disabled state, and marks source blocks after bulk import.
Concerns
- No blocking correctness concerns found in the changed lines.
- Supplemental security pass found no security findings.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Summary
Fixes #9627
Testing
cargo check -p warpcargo fmt -- --checkgit diff --check