Skip to content

Adds conflict resolution actions to rebase editor conflict list#5153

Merged
ianhattendorf merged 2 commits intomainfrom
rebase-editor-conflict-file-list-add-useful-actions
May 5, 2026
Merged

Adds conflict resolution actions to rebase editor conflict list#5153
ianhattendorf merged 2 commits intomainfrom
rebase-editor-conflict-file-list-add-useful-actions

Conversation

@ianhattendorf
Copy link
Copy Markdown
Contributor

@ianhattendorf ianhattendorf commented Apr 18, 2026

Summary

  • Adds per-file Take Current, Take Incoming, and Stage actions to each conflicted file in the rebase editor's conflict panel, plus panel-header Take All Current / Take All Incoming actions (with modal confirmation) for bulk resolution
  • Wraps git checkout --ours|--theirs -- <path> as a new checkoutConflictedPath operation on the git provider, filters actions to those valid for each conflict status, and warns before staging a file that still contains conflict markers
  • Fixes misleading conflict status labels by decoding Git's unmerged two-char status codes explicitly — UA / AU now read as Added by Incoming / Added by Current instead of mixing in a bogus Modified side, while UD / DU keep their correct modified/deleted wording

Closes #5127

image

Test plan

  • Start a rebase that produces conflicts with a mix of statuses (UU, UA, AU, UD, DU, AA, DD)
  • In the rebase editor conflict panel, verify each file shows only the actions valid for its status
  • Use Take Current / Take Incoming / Stage per-file and confirm the working tree + index update correctly
  • Use the header Take All Current / Take All Incoming and verify the confirmation modal + bulk resolution
  • Stage a file that still contains conflict markers and confirm the warning prompt appears
  • Verify conflict status labels read correctly for UA / AU / UD / DU

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 18, 2026

🤖 Augment PR Summary

Summary: This PR enhances the Rebase Editor’s conflict panel by adding per-file and bulk conflict-resolution actions.

Changes:

  • Adds per-conflict-file actions: Take Current, Take Incoming, and Stage, plus panel-header bulk actions for taking one side across all conflicts (with confirmation).
  • Introduces a new git operation wrapper for resolving unmerged paths via git checkout --ours|--theirs -- <path(s)...>, including batching to respect CLI length limits.
  • Refactors/centralizes decoding of Git’s two-character unmerged status codes and updates labels/descriptions (notably fixing UA/AU wording).
  • Adds utilities and unit tests for conflict status labeling/action availability and for mapping conflict statuses to concrete resolution actions (take ours/theirs/delete/unsupported).
  • Adds telemetry events for resolving a single conflict, staging a conflict, and resolving all conflicts in bulk.

Technical Notes: Bulk resolution classifies each conflicted file into checkout/delete operations, stages successful results, and logs/report failures; staging warns if conflict markers are still present.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread packages/git-cli/src/providers/operations.ts Outdated
Comment thread src/webviews/apps/rebase/rebase.ts
Comment thread src/webviews/rebase/rebaseWebviewProvider.ts Outdated
Comment thread src/webviews/rebase/rebaseWebviewProvider.ts Outdated
@ianhattendorf ianhattendorf force-pushed the rebase-editor-conflict-file-list-add-useful-actions branch from 6426419 to deaa869 Compare April 18, 2026 05:30
@ianhattendorf ianhattendorf requested a review from eamodio April 18, 2026 05:31
@ianhattendorf ianhattendorf force-pushed the rebase-editor-conflict-file-list-add-useful-actions branch 2 times, most recently from 1797217 to 6f34fb7 Compare April 20, 2026 17:16
@gitkraken-services
Copy link
Copy Markdown

gitkraken-services Bot commented Apr 21, 2026

🟢 Conflict resolved with 100% confidence

Apply conflict resolution in GitKraken

Comment gitkraken apply to apply this conflict resolution.


Resolution details

🟢 package.json (merged, 100%)

Merged the new rebase conflict resolution commands from 'theirs' into the 'ours' version of package.json. The 'ours' side had removed some remote provider commands in this section which were present in 'theirs', so I preserved the 'theirs' additions (rebase commands) while maintaining the 'ours' state for the surrounding remote provider commands.

🟢 packages/git-cli/src/providers/operations.ts (merged, 100%)

Merged imports from '../exec/git.js' by combining additions from both sides. 'ours' added signing-related utilities (classifySigningError, inferSigningFormatFromError) and formatted the import as a multi-line block, while 'theirs' added 'maxGitCliLength'.

🟢 src/webviews/apps/rebase/rebase.ts (merged, 100%)

Merged changes from both sides: adopted the new percentage-based split panel constants from 'ours', integrated the new 'Stage All' buttons and layout toggle improvements from 'theirs', and used the shared conflict rendering utilities introduced in 'ours' while ensuring compatibility with the logic updates in 'theirs'.


Generated by GitKraken at 2026-05-04 23:36:51 UTC

@gitkraken-services gitkraken-services Bot force-pushed the rebase-editor-conflict-file-list-add-useful-actions branch from 6f34fb7 to f2c7e73 Compare April 21, 2026 16:43
@eamodio eamodio force-pushed the rebase-editor-conflict-file-list-add-useful-actions branch from f2c7e73 to 2791549 Compare April 22, 2026 15:12
@ianhattendorf ianhattendorf force-pushed the rebase-editor-conflict-file-list-add-useful-actions branch 2 times, most recently from d52b878 to 12b5d8e Compare April 23, 2026 16:52
Copy link
Copy Markdown
Member

@eamodio eamodio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ianhattendorf this is ready to go once the conflicts are resolved right?

@ianhattendorf
Copy link
Copy Markdown
Contributor Author

@ianhattendorf this is ready to go once the conflicts are resolved right?

Yes, I'll rebase and merge today.

@ianhattendorf ianhattendorf force-pushed the rebase-editor-conflict-file-list-add-useful-actions branch 2 times, most recently from d6393dc to 55b14b5 Compare May 5, 2026 01:15
@ianhattendorf
Copy link
Copy Markdown
Contributor Author

ianhattendorf commented May 5, 2026

 - Adds per-file Open Current/Incoming Changes and Stage actions, plus right-click Stage Current/Incoming Changes context-menu actions (gated per conflict status so invalid sides are hidden)
 - Adds panel-header Stage All Current / Stage All Incoming bulk actions with a modal confirmation
 - Warns before staging a file that still contains conflict markers
 - Fixes misleading conflict status labels for `UA` / `AU` / `UD` / `DU` by explicitly decoding Git's unmerged two-char codes instead of mapping `U` to `Modified` on both sides

Closes #5127
@ianhattendorf ianhattendorf force-pushed the rebase-editor-conflict-file-list-add-useful-actions branch from 0ed820b to de6d261 Compare May 5, 2026 03:46
@ianhattendorf ianhattendorf merged commit d4a49e2 into main May 5, 2026
7 checks passed
@ianhattendorf ianhattendorf deleted the rebase-editor-conflict-file-list-add-useful-actions branch May 5, 2026 03:54
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.

Rebase editor conflict file list: add useful actions (take ours/theirs/all, stage, etc.)

2 participants