Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 Summary
Walkthrough
ChangesDocument unload guard
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested labels: Suggested reviewers: Merge Risk: 🔵 Low · up to A replacement installed while its predecessor’s unload hook is pending can miss its own unload and remain registered. This is a bounded cleanup risk; merge is reasonable with follow-up. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Summary
unloadDocumentpreviously checked and deleted by document name only. A late call for an already-unloaded instance could remove a newer instance registered under the same name (e.g. after reconnect), breaking sync and storage.This change requires instance identity: unload only proceeds when
this.documents.get(documentName) === document, checked at the start and again immediately beforedelete.Closes #1169
Test plan
documentsunloadingDocuments