Add PR review monitoring and auto-session creation#38
Merged
dhilgaertner merged 7 commits intomainfrom Apr 7, 2026
Merged
Conversation
5df174b to
03bf432
Compare
250fc5e to
e5e99ce
Compare
Detect incoming GitHub PR review requests and display them in a new Reviews sidebar tab. Users can click "Start Review" to clone the repo, create a dedicated review session, and launch Claude Code with the /review-pr skill for automated code review with human approval gate. Phase 1 — Manual trigger: - ReviewRequest model and SessionKind enum (.work/.review) - IssueTracker polls `gh search prs --review-requested @me` every 60s - ReviewBoardView with sidebar widget and review row list - SessionService.createReviewSession() clones into crow-reviews/ - /review-pr skill reads diff, analyzes, posts review via gh CLI - Auto-complete review sessions when PR merges/closes - Clone cleanup on session deletion Phase 2 — Automatic detection: - Delta detection for new review requests between poll cycles - macOS notifications via reviewRequested NotificationEvent - Unseen badge count on sidebar review widget Closes #33 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add --sort updated to gh search and sort parsed results by date descending so stale review requests sink to the bottom. Display relative timestamps (e.g., "3 days ago") in each review row. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… fields gh search prs only supports a subset of JSON fields (no headRefName or baseRefName). The command was failing silently due to try?, so no review requests were ever returned. Fix by fetching the basic list with valid fields, then enriching each result with branch info via gh pr view which does support those fields. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move the skill from skills/review-pr/ to skills/crow-review-pr/ so it's bundled and deployed by the Crow app via the Scaffolder, matching the crow-workspace pattern. Update all references: Scaffolder paths, bundled resource names, launch command, and SKILL.md activation/examples. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The /crow-review-pr skill wasn't found because Claude Code runs in the clone directory, not the devRoot. Fix by: 1. Copying the crow-review-pr SKILL.md into the clone's .claude/skills/ during createReviewSession() 2. Copying settings.json into the clone's .claude/ for permissions 3. Writing a .crow-review-prompt.md file with the review instructions 4. Launching claude with the prompt file content instead of invoking the skill directly (which requires the skill to be in scope) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The review prompt should just invoke the skill with the PR URL — the skill already has the full review workflow, so duplicating instructions in the prompt was redundant and would drift out of sync. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rewrite the skill to match the proven ~/.claude/skills/review-pr/ structure: checkout PR, gather info, security + code quality review, run static analysis, auto-submit with approve/request-changes/comment based on findings. Removes the manual approval gate and verbose analysis categories in favor of the tighter Red/Yellow/Green format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
64d3041 to
9502ec1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/review-prskillChanges
New files:
ReviewRequest.swift— model for incoming PR review requestsReviewBoardView.swift— review board UI (main view, rows, sidebar widget)skills/review-pr/SKILL.md— Claude Code skill for performing code reviewsModified (11 files):
Enums.swift— addedSessionKind(.work / .review)Session.swift— addedkindfield with backward-compatible decodingAppState.swift— review state, closures, computed properties, unseen badgeNotificationEvent.swift— addedreviewRequestedcaseIssueTracker.swift—fetchReviewRequests(), delta detection, auto-completeSessionService.swift—createReviewSession()with repo cloning, review-aware cleanupScaffolder.swift— deploys review-pr skill, creates crow-reviews directoryNotificationManager.swift— review request notification methodAppDelegate.swift— wiredonStartReviewand notification callbacksSessionListView.swift— review board sidebar row + "Reviews" sectionMainContentView.swift— routes review board tabsettings.json— added gh search/review/clone permissionsTest plan
make buildcompiles cleanly[IssueTracker]logs)crow-reviews/, creates session, launches Claude Code/review-prskill reads diff, presents review, waits for approval before submittingCloses #33
🤖 Generated with Claude Code