Show and resolve a commit's conflicts in the desktop diff - #15278
Draft
mtsgrd wants to merge 2 commits into
Draft
Conversation
The API reached the SDK's generated types but not its generated functions, so Electron callers could not see it at all: commit_conflicts and resolve_commit_conflict_hunks now opt into the napi binding. Rebasing onto the moved CliId and Context APIs is folded in here too. A conflict with no hunk representation used to fail the whole request, so a single binary hid every other conflict in the commit — fatal for a caller with no edit mode to fall back to. Those files are now reported per file, and a commit counts as resolved only when nothing remains in either list. In lite, a conflicted commit now shows the base-vs-commit diff its auto-resolution was hiding, and each conflict is offered where its region starts: take the left side, the right side, or replace the region with edited text. Any number can be checked and resolved in a single apply, which is one rewrite and one undo entry rather than one of each per conflict. The card shows only the common ancestor as highlighted code, since the two sides are already the diff either side of it.
Clicking a conflicted commit now shows a normal diff for every file. The ones whose conflict the auto-resolution hides get the synthetic base-vs-commit change to diff against, behind a banner that interleaves the conflicts inline at the position each one occurs. Every conflict carries its own resolution — use the current base, use this commit, edit the merged text, or resolve with AI — and the view follows the rewritten commit after each apply, so what is left stays in front of you. The old right-click conflicts modal is removed in favour of the inline view.
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.
Clicking a conflicted commit now shows a normal diff for every file. The ones
whose conflict the auto-resolution hides get the synthetic base-vs-commit change
to diff against, behind a banner that interleaves the conflicts inline at the
position each one occurs.
Every conflict carries its own resolution — use the current base, use this
commit, edit the merged text, or resolve with AI — and the view follows the
rewritten commit after each apply, so what is left stays in front of you. The
old right-click conflicts modal is removed in favour of the inline view.