Fix review button disable logic with special handling for approve button#7507
Fix review button disable logic with special handling for approve button#7507
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
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:
|
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.