Resolve git merge conflicts change by change [INS-908] - #9052
Conversation
| "@mismerge/core": "^1.2.1", | ||
| "@mismerge/react": "^1.0.1" |
There was a problem hiding this comment.
Interested how you can justify adding a new package here
There was a problem hiding this comment.
I also don’t want to introduce a new dependency, but in the resolve conflict scenario, this library provides a professional two-way merge editor interaction. Users can view the two conflicting branches side by side and edit the final file content in the middle, with highlighted displays of the conflicting parts. I admit that with heavy customization of the Monaco Editor, we could achieve a VSCode-like experience, but that would require a huge amount of development effort. I believe using this library is the better choice for now.
There was a problem hiding this comment.
This library doesn't support react 19
eee41ae to
e8f1dff
Compare
1e49505 to
bc80b0d
Compare
bc80b0d to
3d30996
Compare
3235e1e to
624b5d0
Compare
624b5d0 to
7c25f23
Compare
| mergeConflictError: InstanceType<typeof git.Errors.MergeConflictError>, | ||
| oursBranch: string, | ||
| theirsBranch: string, | ||
| writeFileMap?: WriteFileMap, |
There was a problem hiding this comment.
Nit: I see every call passes this, maybe we could remove the ? to make it simpler.
| let isLightTheme = false; | ||
| if (rootLoaderData?.settings) { | ||
| const colorScheme = getColorScheme(rootLoaderData.settings); | ||
| if (colorScheme === 'light') { |
There was a problem hiding this comment.
Do we consider adding the mismerge theme config to the theme files?
7c25f23 to
c6c1914
Compare
Add startCollectWriteAction & stopCollectWriteAction functions to the fs object passed to git-vcs to collect conflicted file content when encountering conflicts.
Call abortMerge explicitly after the user cancels resolving conflicts.
Refactor sync-merge-modal.tsx.