Pending comments were lost

Hi everyone,

I was reviewing some code yesterday using pending comments. When I was ready to submit the review and started typing in a comment under “Finish your review”, I accidentally closed my browser window. When I got back to GitHub, all review comments that I had been adding over the last 2 days were lost. I couldn’t find a way to restore them.

I wasn’t able to re-create the issue since. The pending comments are properly saved, even when closing the browser window. I’m not sure what went wrong. Maybe I hit an unfortunate key combination or there was a bug on GitHub’s side… I just don’t know. This never happened before.

I just wanted to report this in case other people have been experiencing the same problem. Unfortunately, I don’t have a solution to this.

I was quite confused because you said issue. But maybe you are referring to reviewing changes of a pull request, right? If I’m correct then you might be confused with the two ways,

first is this when you click the Review changes, of course as you can see, when you accidentally close the tab without submitting, the comment will be lost,

the other one is this, when you hover the code line by line, you will be seeing the blue add button +

as you can see also, without clicking either Add single comment or Start a review, you will not be able to save it,

so, if you did not click any of those buttons before closing the tab or the entire Google Chrome window, I’m sure, it’s really not saved,

Thanks for the reply!

And sorry, poor choice of words from my side: When I said “I wasn’t able to re-create the issue since”, I meant that I wasn’t able to reproduce the same problem.

And to clarify further: I did ‘Start a review’ and added my comments by clicking “Add Review Comment”. Over the course of 2 days I added reviews comments and they were saved as usual as pending comments. I’m aware that they are not saved before actually “adding” them - and I definitely did save them and they showed up on the conversation page.

But when I clicked on “Finish your review” and accidentally closed the browser window, it did not only delete the comment I had started writing for “Finish the review” (which was to be expected and also not dramatic) but it also deleted all my pending review comments.

It completely removed my entire review and all its comments and code suggestions. They’re also gone from the conversation page, where they previously had been listed. I guess you get the same effect when clicking “delete/cancel review” but I definitely didn’t do that.

In order to find/reproduce the problem, I started a new review and added pending comments, then closed the browser after starting to write a comment in ‘Finish your review’. But the pending comments do not disappear, even if I close the broswer window the moment I submit the review.

1 Like

okay nice observation, so it did not happen again,

maybe you forgot that you deleted the browser history? that can be the cause