Repository navigation
Offer Resolve with AI for paused merge, rebase, and cherry-pick - #28569
Merged
Merged
Conversation
Contributor
Merged
8 of 9 tasks
AmethystLiang
force-pushed
the
rebase-operation-flow
branch
from
October 14, 2026 22:11
835ff34 to
0c7efa1
Compare
AmethystLiang
force-pushed
the
rebase-operation-flow
branch
from
October 22, 2026 18:33
0c7efa1 to
bf95855
Compare
A paused operation can need recovery after every conflict is staged, but the Resolve with AI action only appeared when unmerged paths remained. The operation banner now offers it whenever AI actions are visible and an operation is in progress. Starting an AI conflict-resolution agent is also blocked while a Git operation is running. The composer, the banner and card buttons, and the agent launch itself check the running-operation state, so a launch that began during agent detection cannot start while Git is still running.
The previous gate scanned the host's process table and refused "Resolve with AI" whenever it could not prove no Git process was running. That refused recovery on older paired hosts, on Windows whenever any Git process ran anywhere on the machine, and while a paged `git reflog` or `git grep` was open in a terminal. - The host tracks Orca's own mutating Git commands per worktree (including ones still queued) and reports them through `git.mutationInFlight`. Reads and fetch/push/ls-remote are not tracked. - Recovery is refused only when the host reports that work. Older hosts without the method keep today's behavior. - The gate applies only to launches from the paused-operation banner and conflict card, not every resolveConflicts launch, so the Checks panel's PR-conflict flow is unchanged. - The agent prompt now tells the agent to stop if index.lock exists or another git command is running, which covers Git started outside Orca on every host. With no unmerged files, the prompt asks the agent to find why Git paused instead of listing zero conflicts.
- Cancel stale recovery checks and agent launches when their dialog or scope closes - Guide rebase recovery agents to amend fixes after failed exec steps
AmethystLiang
force-pushed
the
rebase-operation-flow
branch
from
October 22, 2026 18:50
bf95855 to
5011096
Compare
brennanb2025
added a commit
that referenced
this pull request
Oct 23, 2026
Resolve conflicts with #31971 (paired host launch preferences) and #28569 (Resolve with AI): the + menu, new-agent shortcut and default-agent pick use the host's disabled list and default together with the host chat program answer; the Source Control dialog uses main's availability helper over the PR's launchable agents. Main's new auto-start test lands its detected agents in the store the dialog reads.
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.
Problem
When Git pauses a merge, rebase, or cherry-pick, Orca only showed 'Resolve with AI' while there were conflicted files. If every conflict was already fixed but the operation was still paused, there was no AI button to help finish it. The AI launch could also start while another Git command was still running.
Solution
For any paused merge, rebase, or cherry-pick, Orca now shows 'Resolve with AI' when AI actions are on, even with zero conflicts. The button and the launch are blocked while a Git operation is running or being aborted. If Git starts while the agent is being detected, the launch is rejected.
ELI5
Sometimes Git stops partway through a job and waits for you. Before, the AI helper only appeared when there were broken files. Now it also appears when Git is waiting with nothing left to fix. It stays off while Git is busy.
What Changed
Why
A paused operation with no conflicts left still needs a way forward. Checking live state avoids starting an agent against a repo that Git is still changing. The alternative, showing the button only when conflicts exist, is the old behavior that left users stuck.
Linked Issue
No GitHub issue is linked. 'Fixes #' is left blank, so this PR does not close an issue.
Visual Proof
TODO: attach before/after screenshots of the operation banner and the conflict card. The e2e spec writes rebase-running.png and rebase-recovery.png to test output, but they are not attached here.
Testing
Added: banner and status-card tests, a runner test, dialog tests, a hook test, and the e2e spec tests/e2e/source-control-operation-recovery.spec.ts. Pass status is not recorded in this description.
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance.
TODO: confirm these. The change is renderer-only, and the Git operation state is read from the local store.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)