codeapprove / feedback

Feedback for CodeApprove
0 stars 0 forks source link

CodeApprove duplicates review-level threads #72

Closed mtlynch closed 2 years ago

mtlynch commented 2 years ago

On this review, CodeApprove is duplicating a review-level discussion thread:

image

From the history on Github, it looks like the reviewer:

  1. Made a review-level comment
  2. Approved
  3. Published the review
  4. Added a line-level comment
  5. Published the line-level comment

It looks like somehow CodeApprove got confused by that flow and duplicated his review-level comment starting with "Shall we also move..."

jotaen4tinypilot commented 2 years ago

To clarify, the course of events was:

  1. I (the reviewer) wrote a line-level comment, but forgot to submit (i.e. click the “Add to review” button)
  2. I then wrote a review-level comment
  3. I published the review
  4. I noticed that the line-level comment wasn’t included, so I submitted it and published the review again

It would have been cool if CodeApprove had warned me that there is an un-submitted line-level comment.

But regardless of that, I agree it shouldn’t have published the review-level comment again.

samatcodeapprove commented 2 years ago

Thank you both for laying out how this happened! I will try to reproduce this.

samatcodeapprove commented 2 years ago

(commenting for myself) investigating here a little bit and this is not just a frontend bug, the comment in question got into the database twice with different timestamps:

  1. Wed Oct 19 2022 09:16:37
  2. Wed Oct 19 2022 09:16:56

So for some reason, it was submitted twice even when @jotaen4tinypilot obviously did not intend to.

samatcodeapprove commented 2 years ago

🤦 well this is a simple one! The "finish review" dialog doesn't clear its state after submitting, so if you submit back-to-back reviews without leaving the page it's really easy to send the same review-level comment twice.

Fix for this going out now!

jotaen4tinypilot commented 2 years ago

Awesome, thanks for sorting that out!