Skip to content

Clean PR review results cannot be posted as review comments #892

@linear

Description

@linear

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:

  1. Clean initial review - Review finds zero issues, but user cannot post "all good" comment
  2. 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:

  1. Run AI reviews on GitHub PRs
  2. Select specific findings to post as review comments
  3. 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

  1. Run a PR review that completes with zero findings (clean)
  2. Observe: No "Post Findings" button appears (because selectedCount === 0)
  3. User has no way to post the clean result as a review comment on GitHub

OR

  1. Run an initial review with findings
  2. Post findings and run follow-up review
  3. All issues are resolved (follow-up review shows no new findings)
  4. 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:

  1. Post a COMMENT (not APPROVE/REQUEST_CHANGES) with the review summary
  2. Use event: "COMMENT" in the GitHub API call
  3. Include the review summary in the comment body

Code changes needed:

  1. Add conditional button rendering in PRDetail.tsx after line 663 (alongside existing "Post Findings" button)
  2. Create handler function that calls onPostComment with formatted clean review message
  3. 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

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions