Skip to content

feat: configure review bases and display active targets - #22

Merged
jhochenbaum merged 2 commits into
mainfrom
feat/base-override-and-target-clarity
Sep 7, 2026
Merged

feat: configure review bases and display active targets#22
jhochenbaum merged 2 commits into
mainfrom
feat/base-override-and-target-clarity

Conversation

@jhochenbaum

@jhochenbaum jhochenbaum commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Fixes #8 and #15.

  • Prefer uncommitted changes in auto mode; use <base>...HEAD only when the tree is clean and ahead of its base. exclude_untracked also controls target selection.
  • Add review.base to override base detection, with a warning and fallback for invalid refs.
  • Show the active target in pane titles and keep it accurate across reloads, automatic reviews, and comment delivery.

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.

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
jhochenbaum marked this pull request as ready for review September 7, 2026 20:48
@jhochenbaum jhochenbaum changed the title fix: make the reviewed diff controllable and visible feat: configure review bases and display active targets Sep 7, 2026
@jhochenbaum
jhochenbaum merged commit bc23f3b into main Sep 7, 2026
3 checks passed
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.

Wrong changes shown

1 participant