feat: configure review bases and display active targets - #22
Merged
Conversation
Two reports with one root cause: you cannot tell or choose what a review is comparing against. `auto` now prefers the working tree whenever it is dirty, and only falls back to `<base>...HEAD` when the tree is clean. It previously chose the branch diff whenever HEAD was ahead of its base, silently dropping uncommitted work — the opposite of what bare `hunk diff` and `git diff` show, which is what #8's reporter was reasoning from. `exclude_untracked` also governs dirtiness now, so untracked files alone do not force a working-tree review when they are hidden anyway. `review.base` sets the comparison base for branch reviews. Base detection can only fall back to the default branch when a feature branch's upstream is its own remote-tracking branch, because Git does not record where a branch was cut from; that is #15, and a branch cut from `develop` has had no way to say so. A configured base is validated first: a typo is reported and falls back to detection rather than reaching hunk as an unresolvable range. Pane titles now name the resolved target — `Review: repo — origin/main...HEAD` rather than `Review: repo` — so `auto` is never a guess. `realTargetDeps` replaces the same wiring copied across three entry points. It takes the runner factory rather than reaching for `realRunner` itself, so git calls stay observable to the laziness tests. Fixes #8. Fixes #15. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jhochenbaum
marked this pull request as ready for review
September 7, 2026 20:48
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.
Fixes #8 and #15.
automode; use<base>...HEADonly when the tree is clean and ahead of its base.exclude_untrackedalso controls target selection.review.baseto override base detection, with a warning and fallback for invalid refs.Behavior change: dirty branches now open a working-tree review by default. Set
review.default_target = "branch"to always review the branch diff.Validation: 705 tests passed, including real Git coverage; formatting, lint, TypeScript build, and dependency audit passed.