Conversation
A failed open reached only the log, and nothing else takes the preparation overlay down. It now shows the reason, and the review on screen is left untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Show why a review failed to open instead of spinning forever
Problem
Opening a pull request or a branch from the start page puts up the "Preparing the
review workspace" overlay. If the open failed -
ghnot reachable, a fetch refused,a ref that does not resolve - the exception went to the global handler, which writes
one log line. Nothing took the overlay down, so the window stayed behind a spinner
that would never stop, with no word of what went wrong.
Change
line of the tool's own error for a failed command) and a Close button. The same text
goes to the start page's status line and the Log pane.
show it.
Cancelling the open also has to mean the review already on screen is untouched:
OpenPrAsynccleared the offline flags, andOpenLocalRangeAsyncoverwroteDirtyWorktreePath, before anything had been fetched. Both now assign state onlyonce the diff has been read, so a failure up to that point changes nothing.
Screenshot
Not covered
Opens that do not go through the start page - the PR list pane, reload, the auto-open
with no start page - never showed the overlay and report failures as before.
Testing
Builds with 0 warnings and 0 errors. The error state has not been exercised in the
running app. To check it: open a pull request that has no cached snapshot with the
network off.