Skip to content

Conflicted merge resolution flow - #5809

Merged
shiftkey merged 89 commits into
masterfrom
conflicted-merge-flow
Oct 30, 2018
Merged

shiftkey merged 89 commits into
masterfrom
conflicted-merge-flow

Conversation

@outofambit

@outofambit outofambit commented Oct 3, 2018 •

Copy link
Copy Markdown
Contributor

🎉 resolves #5400

There are a couple outstanding issues (see Known issues section below) but I'd like to get code review kickstarted now.

Would love to merge this Monday, Oct 29 (or earlier).

Gifs

Merge flow

merge conflict resolution flow

Abort flow

merge conflict abort flow

Known issues

To be fixed in this PR

  • merge conflicts popup loads twice sometimes
  • handle outstanding TODO in app.tsx

To be fixed in future PRs

I'll convert these into their own issues to be addressed separately

  • background updates while popup is displayed
  • popups not always centered vertically
  • show flow whenever repository is in a conflicted state (ie cover conflicted merges started outside of desktop)

@outofambit
outofambit force-pushed the conflicted-merge-flow branch from 060fd3e to 198ba94 Compare October 4, 2018 18:13
@outofambit outofambit modified the milestones: 1.4.3, 1.4.2, 1.4.x Oct 8, 2018
@shiftkey

Copy link
Copy Markdown
Member

This is getting close. Just wanted to call out some of the UX things we should try and follow up:

  • after completing a successful merge, the commit summary remains pre-filled with what we found when we were in a conflicted state (note the "Undo" message with my new commit):

  • we don't show any indicator when we are checking the state of conflicted files, so the screen can just sit there for a while before it switches to "resolved!" - not sure if we want to provide a "working" state when we switch back to Desktop from your editor

@shiftkey

Copy link
Copy Markdown
Member

I've pushed some work to this branch around the error handling, so I'd like some 👀 from @iAmWillShepherd too before we wrap this up.

@shiftkey

Copy link
Copy Markdown
Member

Also, I just used this PR to address merge conflicts in this PR so I feel pretty meta right now

@outofambit
outofambit removed the request for review from shiftkey October 26, 2018 17:55

@shiftkey shiftkey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor things to call out, nothing blocking

readonly dispatcher: Dispatcher
readonly repository: Repository
readonly onDismissed: () => void
readonly currentBranch: string

This comment was marked as spam.

Comment thread app/src/ui/app.tsx
)
}
case PopupType.AbortMerge:
if (enableMergeConflictsDialog()) {

This comment was marked as spam.

readonly dispatcher: Dispatcher
readonly repository: Repository
readonly status: WorkingDirectoryStatus
readonly onDismissed: () => void

This comment was marked as spam.

Comment thread app/src/lib/stores/app-store.ts Outdated
}

const { tip } = gitStore
await gitStore.performFailableOperation(() => gitStore.merge(branch), {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tierninho

Copy link
Copy Markdown
Contributor

Getting a Maximum call stack size exceeded dialogue for attempting to merge too many conflicts at once (I'm guessing here).

The error prevents the merge conflict modal from appearing. It also causes Desktop to remove my repo altogether. I also have to relocate it on my computer and add it back.

screen shot 2018-10-26 at 2 04 58 pm

Repro:

Logs

install.ts:23 `git merge origin/0.11` exited with an unexpected code: 1.
Auto-merging src/wallet/wallet.cpp
CONFLICT (content): Merge conflict in src/wallet/wallet.cpp
((repeat, repeat, repeat))
Automatic merge failed; fix conflicts and then commit the result.

(The error was parsed as 7: We found some conflicts while trying to merge. Please resolve the conflicts and commit the changes.)

tested on 87b9a1a

@say25

say25 commented Oct 26, 2018

Copy link
Copy Markdown
Member

Out of curiosity, is the conflict file list sorted in any particular order?

@shiftkey

Copy link
Copy Markdown
Member

Out of curiosity, is the conflict file list sorted in any particular order?

@say25 I suspect this is based on whatever git status returns (so alphabetical based on relative path).

@shiftkey

Copy link
Copy Markdown
Member

Going to merge this in so we can get ready for the next beta release. @outofambit don't forget to open issues for remaining work from your notes in the PR description 👍

@outofambit

Copy link
Copy Markdown
Contributor Author

@shiftkey all issues opened!:

@shiftkey

Copy link
Copy Markdown
Member

popups not always centered vertically (can't repro)

I was seeing this one when the list of conflicts files was populated after the dialog was first displayed. If I can see it again I'll try and get together a meaningful set of repro steps.

@lee-dohm

Copy link
Copy Markdown
Contributor

@zKoz210 your comment was deleted as a violation of the Desktop Code of Conduct as it was insulting or derogatory. You may consider this an official warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants