Fix silent state loading failure in Phoenix menu#786
Merged
Conversation
Add cleanup methods to EffectsManager and SelectionManager to properly release WebGL resources and remove event listeners during view transitions. Signed-off-by: remo-lab <remopanda7@gmail.com>
Contributor
Author
|
Hey @EdwardMoyse ! This PR fixes an early-exit issue in state restoration that could silently skip child nodes when a saved config no longer exists. The change is small but makes state loading much more resilient across versions. Would appreciate a review when you get a chance — thanks! |
EdwardMoyse
approved these changes
Jan 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
loadStateFromJSONexits early if it encounters a config that no longer exists.Why this matters
Phoenix configs change over time (renames, removals, refactors).
Users often load state files saved on older versions.
A single missing config breaks restoration for the entire subtree.
The UI ends up in a misleading state:
The failure is silent apart from a console error, so users usually don’t know anything went wrong.
Fix
Replace the early
returnwith acontinue.Skip only the missing config instead of aborting the entire restore.
Always continue restoring:
Missing entries now log warnings instead of stopping execution.
Outcome