-
-
Notifications
You must be signed in to change notification settings - Fork 0
Improve SPA permanence #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. If you have any questions or need clarification, feel free to leave a comment in this PR. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Key SPA-hardening goals aren’t met yet: permanent flags need stable IDs to take effect, and the new document-wide MutationObserver runs on every mutation, which can noticeably hurt performance. Address these to ensure the widget stays stable without regressing page responsiveness.
💬 Posted 2 inline comments
📋 Skipped 1 file (lock files, minified, images, etc.)
js/chat.min.js
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Improves the resilience of the Ultralytics Chat widget in SPA environments by marking key elements as permanent and hardening DOM reattachment logic.
📊 Key Changes
markPermanenthelper that setsdata-turbo-permanentanddata-turbolinks-permanenton critical chat elements.watchForRemovalto:parentaccessors (() => document.head/body) instead of static references.document.documentElementwithsubtree: truefor more robust detection across SPA navigations.markPermanentto the injected style tag, backdrop, pill, modal, and tooltip in bothchat.jsand the minifiedchat.min.jsbundle.🎯 Purpose & Impact