Skip to content

Add PR-level review feedback persistence to API responses#82

Open
C-Hipple wants to merge 2 commits intomainfrom
claude/review-pr-68-LQQr6
Open

Add PR-level review feedback persistence to API responses#82
C-Hipple wants to merge 2 commits intomainfrom
claude/review-pr-68-LQQr6

Conversation

@C-Hipple
Copy link
Owner

@C-Hipple C-Hipple commented Mar 8, 2026

Summary

Wires up the existing Feedback database table to the RPC API by adding feedback retrieval and persistence across multiple PR-related endpoints. This allows the frontend to save and restore draft review feedback for pull requests.

Changes

  • Added Feedback field to reply types: GetPRReply, AddCommentReply, EditCommentReply, DeleteCommentReply, SubmitReviewReply, and SyncPRReply
  • Implemented fetchFeedback() helper method to retrieve saved feedback with error logging
  • Updated all PR-returning handlers (GetPR, AddComment, EditComment, DeleteComment, SubmitReview, SyncPR) to populate feedback in responses
  • Simplified SetFeedback handler to return lightweight { okay bool } response instead of full PR data
  • Added cleanup of feedback drafts after successful review submission (alongside existing local comment cleanup)
  • Added GetFeedback() and DeleteFeedback() database methods with proper error handling
  • Aligned struct field formatting across reply types for consistency

Test Plan

  • go build ./... passes
  • go test ./... passes

https://claude.ai/code/session_018PuhqsLkBRPTvUKBzYiqy4

claude added 2 commits March 5, 2026 04:47
Reviews SetFeedback handler design, missing Feedback fields in reply
types, stale feedback after submission, and frontend UX issues.

https://claude.ai/code/session_018PuhqsLkBRPTvUKBzYiqy4
- Add GetFeedback and DeleteFeedback methods to database.go
- Make SetFeedbackReply lightweight (Okay bool only); drop unused ID
  field and remove expensive fetchPRAndRunPlugins call from SetFeedback
- Add fetchFeedback helper on RPCHandler that logs errors instead of
  silently discarding them
- Add Feedback field to GetPRReply, SyncPRReply, AddCommentReply,
  EditCommentReply, DeleteCommentReply, and SubmitReviewReply so
  all PR response types carry the feedback draft consistently
- Delete feedback draft from DB after SubmitReview succeeds, mirroring
  the local-comment cleanup that already happens post-submission

https://claude.ai/code/session_018PuhqsLkBRPTvUKBzYiqy4
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.

2 participants