Can refresh listing when opening context menu, resulting in wrong item being operated on.
Observed in integration test:
Between when the right-click event happens and the context menu pops up on the project panel, it is possible for the list to be refreshed. When this happens, the wrong item may be selected.
In this integration test specifically, the sequence of events seems to be:
- Refresh button is clicked, refresh starts
- Find item in list, initial right-click event happens
- The refresh event completes, refreshing the list in DOM
- The context menu click event selects the wrong thing.
This particular test should probably wait until the refresh is completed. However, we should come up with a general approach to defer refreshing the UI unexpectedly if the user seems to be interacting with it.