feat: standalone spawn mode + PR inline comment review#477
Open
MW-DO wants to merge 20 commits intobacknotprop:mainfrom
Open
feat: standalone spawn mode + PR inline comment review#477MW-DO wants to merge 20 commits intobacknotprop:mainfrom
MW-DO wants to merge 20 commits intobacknotprop:mainfrom
Conversation
Adds hook-stdin.ts with parseHookStdin() and formatPreToolUseDeny() utilities, plus colocated tests covering all 6 cases. These will be used by the upcoming annotate-hook and review-hook subcommands to bypass the Bash tool timeout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds two new CLI subcommands (`annotate-hook` and `review-hook`) that read PreToolUse hook stdin JSON, extract the relevant command args, run the shared annotate/review flow, and emit a formatted PreToolUse deny decision with feedback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: bypass 10-min Bash timeout for annotate and review via PreToolUse hooks
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
In spawn mode, the deny/feedback button shows "Send to Claude" and the approve button shows "Dismiss" (clicking it just closes the window). The approve/dismiss button is also made visible in annotate+spawn mode. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds `plannotator plan <file.md | - | --archive>` subcommand for reviewing plans outside the hook flow. Introduces global `--spawn` flag (via isSpawnMode()) that, when set, launches a new claude session with the denial feedback instead of printing to stdout. Removes --spawn from args before subcommand routing so all subcommands see clean args. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Threads spawnFlag through runReviewFlow() and runAnnotateFlow() into their respective server options, and adds post-feedback spawn logic to the review and annotate subcommand blocks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…port Lift usePRContext hook from ReviewPanel to App.tsx so inline comments flow to both the sidebar and DiffViewer. PR inline comments render after their target diff line using the same lineAnnotations slot as user annotations and AI markers. Reply creates a CodeAnnotation with prComment metadata for export. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nv var Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The compiled binary couldn't resolve @plannotator/server/spawn because the export path was missing from the package's exports map. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bun's default 10s idle timeout causes "[Bun.serve]: request timed out" errors on stderr when the server shuts down with lingering SSE connections. Setting idleTimeout to 255s (max) avoids the false warning. Also removes temporary debug logging from annotate subcommand. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of extending idleTimeout, properly dispose all SSE subscriber streams via ExternalAnnotationHandler.dispose() before calling server.stop(). This prevents the "[Bun.serve]: request timed out" error from lingering connections. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
plannotator plan <file.md | --archive | ->subcommand for standalone plan review without hooks--spawnflag (andPLANNOTATOR_SPAWNenv var) to plan, review, and annotate modes — feedback spawns a new interactiveclaudesession instead of writing hook outputTest plan
plannotator plan /tmp/test.mdopens plan review UIplannotator plan /tmp/test.md --spawnopens UI with "Send to Claude"/"Dismiss" buttons, feedback spawnsclaudeplannotator plan --archive --spawnopens archive browserplannotator plan -reads from stdinplannotator review --spawnopens code review with spawn buttonsplannotator annotate README.md --spawnopens annotate with spawn buttonsPLANNOTATOR_SPAWN=1 plannotator plan /tmp/test.mdworks via env varplannotator review https://github.com/.../pull/N --spawnshows inline PR comments on diff🤖 Generated with Claude Code