Repository navigation
a better "push needs pull" dialog to avoid race condition - #6610
Conversation
@shiftkey what do you mean by this? Are you planning to modify the underlying handling of fetching while another network operation is in process or is this PR only dealing with the dialog displayed? |
|
@outofambit I don't plan to change the concurrent network check in this PR. #6141 leverages this behaviour to address some long-running issues with concurrent The new behaviour is to perform the |
|
I am also seeing this - I'm not sure if I have my remote tracking set up incorrectly or not, but there is no option anywhere to sync with origin or pull latest commits from the branch. I know I have commits on the remote but I can't pull them down through this interface. Fine, I can just do it through command line, but then this is pretty disruptive of a common git workflow. |
8f5d96d to
0495c59
Compare
9abbf27 to
6158791
Compare
|
Dropping in some updated screenshots of the dialog (my screen recording setup is busted right now, apologies for the lo-fi info): I also added in a Loading spinner to the fetch button because the user might not see the fetch progress because of how the dialog steals the attention (screenshot is a bit darker because I literally had to I went down this path because it felt like a little "what is happening" moment and showing some progress before closing the dialog seemed like a good way to help transition the user back to try and pull again. |
|
I've assigned this to |
f90aa75 to
05dab54
Compare
…rently is in-progress
05dab54 to
c5895be
Compare
Co-Authored-By: Steven Yeh <[email protected]>
outofambit
left a comment
There was a problem hiding this comment.
Had a good chat with @shiftkey about this and I'm feeling good about this as a next step.
I had some concerns about why we couldn't resolve this for users by reworking some of our error handling logic, but I think that may be too much magic without rethinking how we fetching in the UI. I'll fully defer diving into that. :)
|
Just merged |


Overview
Fixes #2738
Fixes #5451
While troubleshooting #6593 and doing some groundwork testing for the upcoming rebase flows, I noticed a bug with the classic "push needs pull" error handling that meant you could get stuck in a loop and never be able to see what's changed.
Description
The easiest way to reproduce this issue:
The generic Git error handler is displayed with a message, and
Dispatcher.fetchfires in the background:desktop/app/src/lib/dispatcher/error-handlers.ts
Lines 243 to 246 in 64367a5
It's at this point that I'd expect to see the push/pull button update to show there's both a commit ahead and behind, but it never updates:
What's happening underneath is the concurrent network operation check (which was set to
truewhen thepushwas started) has not been cleared (the error handing is being performed, but this flag is only cleared after the error handling completes), so thefetchis considered re-entrant and it's not perforrmed.desktop/app/src/lib/stores/app-store.ts
Lines 2579 to 2582 in 64367a5
I suspect this only way this eventually "comes good" is when the background fetch eventually kicks in, and nothing changes while the impatient user (i.e me) repeatedly presses "Push" and wonders what happened.
This PR replaces that "fire and forget" fetch with a proper dialog to better explain the situation and run the fetch outside the error handler. I haven't finalized the flow yet, but here's the current message you will see:
I'd love your ideas about what we want to explain here @desktop/product @desktop/design
TODO
Release notes
Notes: fix "push needs pull" flow to explain context and actions better