-
Notifications
You must be signed in to change notification settings - Fork 17
feat: Add version detection warnings for hot reload #41
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
Add warnings in all commands that use hot_reload to inform users about the known limitation on Flutter stable <= 3.37.0. This helps users understand why hot reload may fail and provides clear guidance on workarounds (switching to Flutter main channel or manually restarting the app). Changes: - Updated /debug-app command to check Flutter version early and warn users about hot reload limitations - Added inline warnings in /create-app and /modify commands when hot_reload is used - Updated CHANGELOG.md to document this improvement Related to gemini-cli-extensions#15
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.
Code Review
This pull request effectively addresses the issue of hot reload failures on older Flutter versions by adding proactive warnings. The changes are clear and well-documented in the CHANGELOG. My review focuses on ensuring the accuracy and consistency of the information provided in the new warnings.
|
@sethladd @gspencergoog @johnpryan - Would appreciate your review on this improvement for issue #15. This PR adds proactive warnings to help users understand the hot reload limitation on Flutter stable ≤ 3.37.0, providing clear workarounds until the upstream Dart SDK fix is available. |
|
Hi @meylis1998 , any thoughts on the review? |
|
Might also address #8 |
|
Hi @gspencergoog! Thanks for the thorough review. Your suggestions make the messaging much clearer and more user-friendly. |
|
@meylis1998 are you still interested in contributing this PR? If so, could you address the comments and resolve the conflicts so we can continue? |
- Simplify verbose checklist in debug-app.toml to a single note - Remove issue gemini-cli-extensions#15 reference per reviewer request - Use "main" channel consistently (not "main/master") - Reword from "does not work" to "only works reliably" - Change "restarting" to "reloading" for accuracy
Addresses issue gemini-cli-extensions#8 by providing clear instructions to users when they ask to run their app but the launch_app tool is not available or fails. Users are directed to either use flutter run in a terminal or their IDE's Flutter extension.
Hello @gspencergoog , appreciate your consideration, please re-review |
gspencergoog
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.
Looks good! Thanks!
| - Use `hot_reload` to apply logging changes quickly while preserving the app's state. If the state needs to be reset, explain that a Hot Restart is needed, and you will need to stop and restart the app. | ||
| - Use `hot_reload` to apply logging changes quickly while preserving the app's state. | ||
| - Hot reload only works reliably on Flutter at versions at or above 3.37.0. If hot_reload fails, and they are using a version below that, inform the user and suggest either switching to the Flutter main channel or manually reloading the app. | ||
| - If the state needs to be reset, explain that a Hot Restart is needed, and you will need to stop and restart the app. |
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.
| - If the state needs to be reset, explain that a Hot Restart is needed, and you will need to stop and restart the app. | |
| - If the application state needs to be reset, explain that a Hot Restart is needed, and you will need to stop and restart the app. |
Summary
This PR addresses issue #15 by adding version detection warnings for hot reload in all commands that use the
hot_reloadtool.Changes
/debug-appcommand: Added early Flutter version check in the "Dependency and Environment Checks" section that warns users if they're on Flutter stable ≤ 3.37.0 and provides clear workarounds/create-appand/modifycommands: Added inline warnings when usinghot_reloadto inform users about the limitationProblem
Hot reload through the Dart MCP server does not work reliably on Flutter stable ≤ 3.37.0. This leaves users confused when hot reload fails without explanation.
Solution
Instead of waiting for the upstream Dart SDK fix, this PR improves the user experience by:
Testing
The warnings are embedded in command prompts and will be displayed by the AI assistant when users run the affected commands on Flutter stable ≤ 3.37.0.
Related Issues
Closes #15
Test Plan
/debug-appon Flutter stable ≤ 3.37.0 and verify version warning appears