Skip to content

feat(review): show GitHub PR review comments inline#18990

Open
Haohao-end wants to merge 1 commit intoanomalyco:devfrom
Haohao-end:fix/18964-inline-github-review-comments
Open

feat(review): show GitHub PR review comments inline#18990
Haohao-end wants to merge 1 commit intoanomalyco:devfrom
Haohao-end:fix/18964-inline-github-review-comments

Conversation

@Haohao-end
Copy link
Copy Markdown

Issue for this PR

Closes #18964

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This PR adds read-only GitHub PR review comments to the Desktop review panel.

Before this change, the review panel could render local inline comments, but it had no way to fetch and show existing GitHub review comments for the current PR. That meant users still had to switch back to GitHub to see reviewer feedback next to the relevant diff.

This change adds a small VCS endpoint to fetch review comments for the PR associated with the current branch, maps GitHub review comment positions into the same file/line selection model already used by the review UI, and then renders those comments inline in the existing review panel.

I kept GitHub comments read-only on purpose. Local editable comments still work the same way as before, and this PR does not try to handle posting/replying/resolving review comments.

Why this works:

  • the app already had inline annotation rendering for file + selection based comments
  • GitHub review comments can be adapted into that same structure
  • by keeping GitHub comments separate from local editable comments, the UI gains reviewer context without changing the existing local comment flow

How did you verify your code works?

I verified it by:

  • regenerating the SDK with cd packages/sdk/js && bun ./script/build.ts
  • running package typechecks:
    • cd packages/opencode && bun typecheck
    • cd packages/app && bun typecheck
    • cd packages/ui && bun typecheck
    • cd packages/sdk/js && bun typecheck
  • running repo-wide typecheck with bun turbo typecheck

All of those completed successfully locally.

Screenshots / recordings

I do not have a screenshot/recording attached yet. The UI change is limited to showing GitHub PR review comments inline in the existing review panel.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Show GitHub PR review comments inline in the Desktop review panel

1 participant