feat(review): pick a commit as the diff base (#709)#723
Merged
Conversation
Widens the base picker for `branch` and `merge-base` diff modes from "branch only" to any commit-ish. `getGitContext` now returns the last 20 commits on HEAD; the picker shows them in a new "Recent commits" group, and SHA-like or HEAD~N queries get a "Use … as base" affordance for manual entry. Backend changes are minimal because git diff already accepts any commit-ish on the left side of the range.
Replaces the three-section list (Local / Remote / Recent commits) with a Branches | Commits tab strip — commits were below a scroll wall in repos with many branches. SHA-like and HEAD~N queries auto-focus the Commits tab so manual entry stays one keystroke away.
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
branchandmerge-basediff modes from "branch only" to any commit-ish.getGitContextnow returns the last 20 commits on HEAD; the picker exposes them via a Branches / Commits tab strip and accepts SHAs orHEAD~Ntyped into the search box.git diffalready accepts any commit-ish on the left side — the change is mostly UI plus one shared helper (listRecentCommits) wired intogetGitContext. Pi inherits the change automatically viavendor.sh.Test plan
plannotator review, switch to Committed changes, click the base chip, confirm Branches/Commits tabs render.bun test packages/shared/review-core.test.tspasses (coverslistRecentCommits+getGitContext.recentCommits).