-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
When a PR review completes with no findings (clean review) or only LOW severity findings that are resolved in a follow-up, there is no UI option to post the clean result as a review COMMENT. The "Post Findings" button only appears when selectedCount > 0, which means users cannot post the positive "all code is good" comment to GitHub.
Problem Description
The PR review UI only shows a "Post Findings" button when there are selected findings to post (selectedCount > 0). However, when a review is clean (no findings or all findings resolved in follow-up), users may want to post a comment indicating the review passed. Currently, this workflow is not supported.
Important distinction: This should only post a COMMENT to GitHub, NOT change the PR's review status (APPROVE/REQUEST_CHANGES). Only approved GitHub reviewers with write permissions should be able to formally approve a PR.
Key scenarios affected:
- Clean initial review - Review finds zero issues, but user cannot post "all good" comment
- Clean follow-up review - All issues from previous review were resolved, but the clean result cannot be posted
Context
The PR review system in Auto Claude allows users to:
- Run AI reviews on GitHub PRs
- Select specific findings to post as review comments
- Post approvals for clean PRs (only users with permissions should do this)
The post functionality lives in PRDetail.tsx:647-734 where the "Post Findings" button is conditionally rendered based on selectedCount > 0 (line 649).
Affected Areas
- apps/frontend/src/renderer/components/github-prs/components/PRDetail.tsx:649-662 - Conditional rendering of "Post Findings" button
- apps/frontend/src/renderer/components/github-prs/components/PRDetail.tsx:528-549 - handlePostReview function that posts findings
- apps/frontend/src/main/ipc-handlers/github/pr-handlers.ts:1223-1433 - GITHUB_PR_POST_REVIEW IPC handler
Steps to Reproduce
- Run a PR review that completes with zero findings (clean)
- Observe: No "Post Findings" button appears (because selectedCount === 0)
- User has no way to post the clean result as a review comment on GitHub
OR
- Run an initial review with findings
- Post findings and run follow-up review
- All issues are resolved (follow-up review shows no new findings)
- Observe: No option to post the "all resolved" clean result
Expected Behavior
When a review is clean (zero findings or all resolved in follow-up), the user should be able to post a COMMENT to GitHub indicating the review passed. This should:
- Post a COMMENT (event type: "COMMENT"), not change PR review status
- Include the review summary in the comment body
- Provide clear documentation that the PR was reviewed
- Be transparent to the PR author
- Leave formal approval to users with appropriate GitHub permissions
Actual Behavior
When selectedCount === 0, the "Post Findings" button does not render. Users cannot post any review comment for clean reviews. The only workaround is to manually post a comment via GitHub CLI or web UI.
Proposed Solution
Add a "Post Clean Review" button that appears when:
- Review is successful (reviewResult.success === true)
- No findings are selected (selectedCount === 0)
- Review hasn't been posted yet (!hasPostedFindings)
The button should:
- Post a COMMENT (not APPROVE/REQUEST_CHANGES) with the review summary
- Use event: "COMMENT" in the GitHub API call
- Include the review summary in the comment body
Code changes needed:
- Add conditional button rendering in PRDetail.tsx after line 663 (alongside existing "Post Findings" button)
- Create handler function that calls onPostComment with formatted clean review message
- Format should include summary and indicate clean review passed
Example comment format:
✅ Auto Claude PR Review - PASSED
Status: All code is good
[Review summary content...]
This automated review found no issues. Generated by Auto Claude.
Code References
- apps/frontend/src/renderer/components/github-prs/components/PRDetail.tsx:649-662 - Button rendering logic
- apps/frontend/src/renderer/components/github-prs/components/PRDetail.tsx:528-549 - handlePostReview implementation
- apps/frontend/src/renderer/components/github-prs/components/PRDetail.tsx:359-368 - isCleanReview logic
- apps/frontend/src/main/ipc-handlers/github/pr-handlers.ts:1436-1483 - GITHUB_PR_POST_COMMENT IPC handler (for posting simple comments)
Additional Notes
- Use onPostComment prop instead of onPostReview to avoid any GitHub review state changes
- The onPostComment function already exists and posts via GitHub CLI (gh pr comment)
- Translation keys will need to be added to apps/frontend/src/shared/i18n/locales/en/common.json and fr/common.json
- Consider showing the button after a follow-up review when unresolvedCount === 0 && newIssuesCount === 0
Metadata
Metadata
Assignees
Labels
Projects
Status