-
Notifications
You must be signed in to change notification settings - Fork 704
Fix review button disable logic with special handling for approve button #7507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
alexr00
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot The changes also need to be made in AddComment in comment.tsx
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Applied the same disable logic to both Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
alexr00
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Actually, the approve button is allowed even when there are no comments and no pending review.
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Fixed! The approve button is now allowed even when there are no comments and no pending review. It's only disabled when the system is busy, while other review buttons (Request Changes, Comment/Submit Review) still require either content or existing review draft. (53fdb43) |
This PR fixes an issue where clicking review buttons (Approve/Comment/Request Changes) without entering any text in the comment box and with no pending review comments would cause a GraphQL error and display duplicate entry boxes.
Problem
When users clicked review buttons with empty content, the extension would:
Solution
The fix implements differentiated disable logic for review buttons:
hasReviewDraftis false)Changes Made
Updated all review submission components to apply the new disable logic:
AddReviewSummaryComment(timeline.tsx)commentText)isBusy || pr.busy!commentText.trim() && !pr.hasReviewDraftAddComment&AddCommentSimple(comment.tsx)hasReviewDraftto component props!pendingCommentText?.trim() && !hasReviewDraftBehavior
This prevents the GraphQL error and eliminates the duplicate entry box issue while maintaining GitHub's standard behavior where approvals don't require additional commentary.
Fixes #7476.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.