Skip to content

Conversation

@meylis1998
Copy link

Summary

This PR addresses issue #15 by adding version detection warnings for hot reload in all commands that use the hot_reload tool.

Changes

  • /debug-app command: 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-app and /modify commands: Added inline warnings when using hot_reload to inform users about the limitation
  • CHANGELOG.md: Documented the new feature in the "Unreleased" section

Problem

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:

  1. Proactively checking Flutter version and warning users about the limitation
  2. Providing clear workarounds (switch to Flutter main channel or manually restart the app)
  3. Adding inline reminders when hot_reload is used

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

  • Run /debug-app on Flutter stable ≤ 3.37.0 and verify version warning appears
  • Verify workarounds are clearly communicated
  • Confirm inline warnings appear when hot_reload is attempted

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
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

@meylis1998
Copy link
Author

@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.

@sethladd
Copy link
Collaborator

Hi @meylis1998 , any thoughts on the review?

@sethladd
Copy link
Collaborator

Might also address #8

@meylis1998
Copy link
Author

Hi @gspencergoog! Thanks for the thorough review. Your suggestions make the messaging much clearer and more user-friendly.

@gspencergoog
Copy link
Contributor

@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.
@meylis1998
Copy link
Author

Hi @meylis1998 , any thoughts on the review?

Hello @gspencergoog , appreciate your consideration, please re-review

Copy link
Contributor

@gspencergoog gspencergoog left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hot reload failed. App was running

3 participants