-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Adds AI rebase commands #4644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
sergeibbb
wants to merge
12
commits into
feature/4443-ai-rebase-on-branch
Choose a base branch
from
feature/4443-ai-rebase-branch-final
base: feature/4443-ai-rebase-on-branch
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Adds AI rebase commands #4644
sergeibbb
wants to merge
12
commits into
feature/4443-ai-rebase-on-branch
from
feature/4443-ai-rebase-branch-final
Conversation
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
6 tasks
98aa126
to
536e6ad
Compare
7 tasks
6426093
to
3a7fd74
Compare
536e6ad
to
22bf966
Compare
22bf966
to
58fea79
Compare
8109580
to
8095dc5
Compare
Introduces new AI-assisted commands to recompose all branch commits and specifically unpushed commits via the graph webview. (#4443)
Updates branch context detection to add a '+recomposable' flag for branches that have commits eligible for recomposition, determined by checking recent merge bases against stored targets. Adjusts menu conditions so the AI rebase command is shown only when a branch can be recomposed, preventing unnecessary options for branches without suitable commits. (#4443, #4522)
Introduces AI-powered branch actions ("Recompose" and "Explain") directly into the branches view, enabling context menu options when branches are recomposable or have unpushed commits. Refactors and centralizes branch recomposability detection to ensure consistent logic across graph and views, improving maintainability and user experience. Enhances discoverability and workflow integration for AI-assisted Git operations. (#4443)
58fea79
to
303ed6f
Compare
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.
Description
Resolves ???? (follow-up of #4443)
This is probably waiting for Commit Composer being able to re-compose.
(TODO: probably an issues with the following title should be created: "Add an option to generate commits from all changes on a branch")
(another TODO: be accurate with menu groups. Since the branch is old enough, the related groups could be renamed in
main
and items be reordered.goes to issue description
Description
<--
Generating new commits from a set of current commits with Commit Composer currently requires picking a commit in the graph and initiating an "AI rebase" for all commits in a branch back to that point. While this is helpful for the specific case where you want to re-generate commits for a selection of commits, this is not very discoverable or intuitive for the case where someone wants to re-compose all commits on a branch.
There should be an option to generate commits for all changes on a branch that is accessible from multiple places:
The "recompose" action in GL is currently called
AI Rebase Current Branch onto Commit... (Preview)
which only really works for that use case, so we will need a new name for this action - maybe something likeGenerate New Commits for this Branch (Preview)
?"Recompose branch commits"
- merge base or merge target? -> closest to the current top"Recompose unpushed commits"
only when we have unpushed"Explain Unpushed Changed"
"Explain Branch Changes"
- by trying to find user-configured merge base.Verification steps
getBranchMergeTargetName
getBranchMergeTargetName
Checklist
Fixes $XXX -
orCloses #XXX -
prefix to auto-close the issue that your PR addresses