Skip to content

feat: add PR comments sliding right panel#214

Open
eugenioenko wants to merge 1 commit into
mainfrom
feat/pr-comments-right-panel
Open

feat: add PR comments sliding right panel#214
eugenioenko wants to merge 1 commit into
mainfrom
feat/pr-comments-right-panel

Conversation

@eugenioenko

Copy link
Copy Markdown
Owner

Summary

  • Add a sliding right panel widget (CommentPanelWidget) that displays PR review comments in a chat thread / email inbox aesthetic
  • Add GitHub API functions (FetchPRComments, AddPRComment, AddPRReviewComment) that fetch both inline review comments and general issue comments via gh api
  • Register new command pr.showComments ("Git: Show PR Comments") that opens comments for the currently loaded PR or prompts for a PR URL
  • Panel features: scrollable threaded view with author names, relative timestamps, word-wrapped body text, clickable file:line references for inline comments, compose area with submit, close via Escape/q/[X] button

Test plan

  • Unit tests for sortCommentsByTime and PRComment type correctness (internal/github/github_test.go)
  • Unit tests for CommentPanelWidget: creation, SetComments, rendering (with/without comments, loading state, inline file references), keyboard handling (Escape close, scroll keys, compose mode enter/exit/submit, empty submit ignored, quit key), panel width calculation, word wrapping, timestamp formatting, cursor position, focused input
  • make build passes
  • make test passes (except pre-existing TestLoadNoFiles config test failure)
  • Manual test: open a PR with Git: Review PR, then run Git: Show PR Comments from the command palette to see the threaded comment view
  • Manual test: type c to enter compose mode, write a comment, press Enter to submit

🤖 Generated with Claude Code

Add a sliding right panel that displays PR review comments in an
email/chat thread aesthetic. The panel fetches both inline review
comments and general issue comments via the GitHub CLI, displays
them chronologically with author attribution, timestamps, and
word-wrapped body text. Inline comments show clickable file:line
references. Includes a compose area at the bottom for submitting
new comments.

New command: "Git: Show PR Comments" (pr.showComments) - opens
comments for the currently loaded PR or prompts for a PR URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant