Conversation
Applies backnotprop#1331 onto 0.27.15: review-args gains --patch-file with parse once-required path semantics folded into the errors[] contract (hosts must surface rather than throw); the direct `plannotator review` CLI reads a static unified diff from a file or `-` (stdin) and opens a workspace-less session (diffType "static-patch"). Harness surfaces (pi command, opencode bridge) keep the PR's explicit reject for now — generalized in the follow-up commit. Co-Authored-By: Kimchi <noreply@kimchi.dev>
Generalizes backnotprop#1331's CLI-only --patch-file to the in-process harnesses: - pi: openCodeReview / startCodeReviewBrowserSession accept `patch` (inline unified diff), `patchFile` (path read at call time, resolved against the caller cwd), and `patchLabel`; static sessions open the same review server with diffType "static-patch" and no workspace / gitContext, so no repo is required. The shared `plannotator:request` bus forwards the three fields on the `code-review` action, and `/plannotator-review --patch-file <path>` now works inside pi instead of erroring. patch* and prUrl remain mutually exclusive. - opencode: the OpenCode bridge (opencode-review entrypoint) reads `--patch-file <path>` itself — relative to PLANNOTATOR_CWD or the process cwd — and starts the review in static-patch mode. `-` (stdin) is rejected with guidance: the bridge's stdin carries the input JSON. - docs: pi README documents the new code-review payload fields and the command flag. Tests: `bun test apps/pi-extension` (276 pass; the same 2 config tests fail on a clean tree — env-dependent baseline), `bun test apps/opencode-plugin`, `bun test apps/hook/server`, `tsc -p apps/pi-extension/tsconfig.json` all green. Co-Authored-By: Kimchi <noreply@kimchi.dev>
…drop unused options - Move --patch-file conflict validation into parseReviewArgs (PR URL, --base, --diff-type, --git/--gitbutler, explicit --local) so all three runtimes reject in one place; delete the duplicated guards in the direct CLI and OpenCode bridge branches. - Extract readStaticPatch() shared by both Bun review entry paths; reject empty patch content on the Bun path to match Pi. - Remove the uncalled inline `patch` and `patchLabel` options from the Pi session/event API. - Document --patch-file in the plannotator knowledge skill. Co-Authored-By: Kimchi <noreply@kimchi.dev>
Author
|
@backnotprop could you TAL? |
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.
Review static unified diffs without a repository (--patch-file)
Adds plannotator review --patch-file <path | -> — a way to open the code review UI against a caller-supplied unified diff, with no Git repo, no worktree, and no VCS detection. Useful for reviewing patches from emails, pastes, remote agents, CI artifacts, or anywhere a diff exists without a checkout.
plannotator review --patch-file reading.diff curl -s https://example.com/change.diff | plannotator review --patch-file -What it does
Supported surfaces
Validation (in parseReviewArgs, shared by all runtimes)
--patch-file wins over VCS detection entirely, so conflicting selectors are usage errors, not silently ignored flags:
Tests