-
Notifications
You must be signed in to change notification settings - Fork 352
Feature Implemented: Warning displayed when frontend version mismatches #4363
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
Feature Implemented: Warning displayed when frontend version mismatches #4363
Conversation
Hi Shivansh! Path is: ComfyUI/app/frontend_management.py I would highly recommend checking the function check_frontend_version() and try to incorporate that into your implementation, for better code reusability. Hope that helps! Best, |
This looks like a very high quality PR. I can review fully this week. Should we make a corresponding PR to the backend to change this code so that it returns |
Thank you for the detailed review and thoughtful feedback — I really appreciate it! I'm glad to hear the implementation aligns with the expectations and integrates well with the existing architecture. I’ve also taken note of Srijita’s suggestion regarding reusing the check_frontend_version() logic from the backend. If the team decides to incorporate that, I’d be happy to refactor accordingly. Please let me know if there are any adjustments or changes you'd like me to make — I’ll be ready to update the PR as needed. Thanks again for the opportunity! |
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.
Looking good!
Should we edit this code to include required_frontend_version
https://github.com/comfyanonymous/ComfyUI/blob/1205afc708d963d160f38c1d6613a384ddf6c564/server.py#L526-L548? I can also review that PR once you make it!
@christian-byrne I have raised the PR comfyanonymous/ComfyUI#8875 to include the required_frontend_version parameter. Also, I will be waiting for a heads-up on the approach shared for the issues in the previously raised PR to shape it perfectly. |
@christian-byrne I’ve committed the suggested improvements. Additionally, I’ve used a Let me know if the current implementation aligns with your expectations — I’d be happy to make further adjustments if needed. |
@christian-byrne Can we run the workflow for this PR as well, so that if anything is breaking, I'll fix it. |
|
@christian-byrne Thank you for running the workflows. Can you please guide me on how to solve the chromium errors. Will fix all the errors and commit the changes ASAP. |
It's possible that the chromium tests will fail if the backend PR is not merged yet and the frontend relies on it. For ESLint and Prettier, please refer to:
|
…lacement of component in graphview.vue so that it only loads after the versions are fetched from api and corrected the UI of the banner to be more smooth with better UX
@christian-byrne I have corrected the workflow errors encountered. Also, I am attaching the image for the warning banner to show how it will actually look, please ignore the backend version upgradation to 1.27.4, that was staged to display the update frontend button as well. I have tested it locally and the dismissal state is properly persisting across tab and window refreshes along with the proper fetching of particular version parameters from backend. I have made a commit 561bb00 which contains all the final corrections incorporating all the actions stated. ![]() ![]() |
@christian-byrne Awaiting for your feedback. Please let me know if this aligns with your expectations. Also, it's been some time that I have been working on the same issue and I badly want to take new issues to contribute as well. So, can we have a final testing and close both the PRs. Thank you. |
@christian-byrne I understand you might have been busy, but please squeeze some time to review this. I have shared more details about the solution implemented. Awaiting for your feedback. |
Thank you for your contribution @shivansh-gupta4 ! |
…l and code cleanup - Fix dismissal persistence: warnings now automatically dismiss for 7 days when shown - Eliminate code duplication by consolidating key generation into computed properties - Replace Vue component with composable for better reusability and testability - Add comprehensive test coverage for both composable and store - Ensure clean separation of concerns between display logic and state management
…g system - Add comprehensive JSDoc documentation to composable - Replace localStorage with vueuse useStorage for better reactivity and client/server compatibility - Simplify whenever callback by removing unnecessary boolean parameter check - Update all tests to work with new useStorage-based storage format - Maintain full functionality while improving code quality and maintainability
- Consolidate all version mismatch dismissals into single 'comfy.versionMismatch.dismissals' key - Prevents localStorage clutter with multiple individual keys - Fix test suite to properly mock useStorage from VueUse instead of direct localStorage - Use reactive storage mocking for better test reliability and accuracy - All tests now pass with proper reactive behavior verification
- Replace custom version comparison with robust semver library - Fix bug where warnings showed when frontend meets/exceeds required version - Only warn when frontend is significantly ahead (>2 minor versions or major version mismatch) - Don't warn when there's no required version but frontend is newer than backend - Add comprehensive test coverage for all warning scenarios Co-Authored-By: Claude <noreply@anthropic.com>
- Remove isFrontendNewer logic - only warn when required version > installed version - Simplify warningMessage computed to only handle outdated case - Update tests to reflect the simplified behavior - Clean up unnecessary complexity in version comparison The warning system now only shows when the frontend is behind the required version, which is the only case where user action is needed. Co-Authored-By: Claude <noreply@anthropic.com>
@christian-byrne Wanted to know what are the problems that are causing the CI playwright tests to fail. Is there anything more that needs to be fixed in this PR? Would love to help and make further changes if needed. Thank you. |
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Nope, this is all good, just going to switch to using the toast API and add a test! |
…ssary code - Remove unused Comfy.VersionMismatch.DismissedVersion setting and schema - Remove unnecessary setTimeout wrapper in version compatibility initialization - Remove redundant comments about version compatibility setup The dismissal mechanism now uses localStorage directly via useStorage.
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.
LGTM!!
…es (#4363) Co-authored-by: bymyself <cbyrne@comfy.org> Co-authored-by: Claude <noreply@anthropic.com>
Issue: [Feature Request] Display warning when frontend version mismatches backend requirements #4356
┆Issue is synchronized with this Notion page by Unito