-
Notifications
You must be signed in to change notification settings - Fork 190
fix: refresh error views automatically on hotswap #23272
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
Conversation
When a class breaks during development, Flow shows an error view. Previously, when the class was fixed and hotswapped, the error view remained visible because the hotswap system only refreshed views that used the changed class in their route chain. This fix adds ErrorViewHotswapper plugin that detects when an error view is displayed (by checking if the current view implements HasErrorParameter) and triggers a browser refresh on any hotswap. The refresh re-navigates to the original URL, allowing the fixed code to be properly loaded.
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.
Could we add at least one test?
Adds unit tests to verify that ErrorViewHotswapper correctly: - Triggers UI refresh when an error view is shown during hotswap - Does not trigger refresh for normal views during hotswap
|
|
Hi @Artur- and @mcollovati, when i performed cherry-pick to this commit to 25.0, i have encountered the following issue. Can you take a look and pick it manually? |
|
Hi @Artur- and @mcollovati, when i performed cherry-pick to this commit to 24.9, i have encountered the following issue. Can you take a look and pick it manually? |
When a class breaks during development, Flow shows an error view. Previously, when the class was fixed and hotswapped, the error view remained visible because the hotswap system only refreshed views that used the changed class in their route chain. This fix adds ErrorViewHotswapper plugin that detects when an error view is displayed (by checking if the current view implements HasErrorParameter) and triggers a browser refresh on any hotswap. The refresh re-navigates to the original URL, allowing the fixed code to be properly loaded. Adds unit tests to verify that ErrorViewHotswapper correctly: - Triggers UI refresh when an error view is shown during hotswap - Does not trigger refresh for normal views during hotswap
|
For simplicity, cherry pick to 24.9 will be done from the 25.0 PR |
|
Hi @Artur- and @mcollovati, when i performed cherry-pick to this commit to 24.9, i have encountered the following issue. Can you take a look and pick it manually? |



When a class breaks during development, Flow shows an error view. Previously, when the class was fixed and hotswapped, the error view remained visible because the hotswap system only refreshed views that used the changed class in their route chain.
This fix adds ErrorViewHotswapper plugin that detects when an error view is displayed (by checking if the current view implements HasErrorParameter) and triggers a browser refresh on any hotswap. The refresh re-navigates to the original URL, allowing the fixed code to be properly loaded.