Repository navigation
Stop rating dialog reloads wiping edits - #1867
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 44 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1867 +/- ##
==========================================
+ Coverage 43.29% 43.41% +0.12%
==========================================
Files 282 282
Lines 7248 7267 +19
Branches 1458 1459 +1
==========================================
+ Hits 3138 3155 +17
- Misses 4089 4091 +2
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The admin rating dialog could throw away what was typed into it. Saving a new rating refetches the video, which flips its
is_ratedflag. The dialog reloaded its rating whenever that flag changed, even while it was open, and the late load reset the form over whatever the user had typed after saving. This also madeconcurrent-edits.spec.ts › a rating edit sends only the changed fieldflaky: it failed on main whenever the reload landed between typing and saving, and the PATCH went out empty.What changes
isRatedas it was when the dialog opened, so the dialog's own save no longer triggers a reload. The videos table already did this.Notes for reviewers
isRated. Both parents now freeze it at open; moving the "load once per opening" rule into the dialog would be a bigger rewrite of its effect.