Skip to content

Improve conflict detection#368

Merged
geofflamrock merged 6 commits intomainfrom
improve-conflict-detection
Sep 11, 2025
Merged

Improve conflict detection#368
geofflamrock merged 6 commits intomainfrom
improve-conflict-detection

Conversation

@geofflamrock
Copy link
Owner

@geofflamrock geofflamrock commented Sep 8, 2025

Improves conflict handling by replacing the user prompt with a poll that detects when conflicts have been handled externally. When conflicts resolution is complete we move on to the next action (e.g. merge the next branch in the chain).

This means that the user can go and fix conflicts in whatever means they normally do, and doesn't have to remember to come and say Continue at the prompt (which would then fail because the action has probably already been completed anyway).

Fixes #233

@geofflamrock geofflamrock added the enhancement New feature or request label Sep 8, 2025
@geofflamrock geofflamrock force-pushed the improve-conflict-detection branch 3 times, most recently from 4db1c0c to b589858 Compare September 9, 2025 22:16
@geofflamrock geofflamrock force-pushed the improve-conflict-detection branch from f386950 to 043af29 Compare September 11, 2025 07:37
@geofflamrock geofflamrock marked this pull request as ready for review September 11, 2025 07:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves conflict detection by replacing the interactive prompt-based conflict resolution system with an automated polling-based approach. The change allows the CLI to wait for users to manually resolve conflicts outside the application and automatically detect when the operation has been completed or aborted.

Key changes:

  • Replaces interactive conflict prompts with automated conflict state polling
  • Introduces new Git state detection methods for merge and rebase operations
  • Simplifies the conflict resolution workflow by removing user interaction requirements

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Stack/Git/GitClient.cs Adds new methods to detect merge/rebase progress and retrieve HEAD/ORIG_HEAD SHA values
src/Stack/Git/ConflictResolutionDetector.cs New utility class that polls Git state to detect conflict resolution completion or abortion
src/Stack/Commands/Helpers/StackActions.cs Replaces interactive conflict prompts with automated conflict resolution detection
src/Stack/Commands/Helpers/Questions.cs Removes unused conflict resolution prompt constants
src/Stack.Tests/Git/GitClientTests.cs Adds tests for new Git state detection methods
src/Stack.Tests/Git/ConflictResolutionDetectorTests.cs Comprehensive tests for the new conflict resolution detection logic
src/Stack.Tests/Commands/Helpers/StackActionsTests.cs Updates tests to work with new automated conflict resolution approach

@geofflamrock geofflamrock merged commit fd26112 into main Sep 11, 2025
15 checks passed
@geofflamrock geofflamrock deleted the improve-conflict-detection branch September 11, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle conflicts during update in non-interactive mode

1 participant