Hotfix v0.9.6: black screen when setup starts - #78
Merged
Merged
Conversation
…screen
selectSetupChip builds a new object on every call. Subscribed to directly,
React reads it as a new snapshot each render, loops ("Maximum update depth
exceeded") and unmounts the whole app as soon as setup starts. v0.9.5 runs
setup for every user still on maestro 2.5.1, so they all got a black screen
right after launch. The chip is now read through useShallow.
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



Summary
Urgent hotfix. The app crashes into a black screen as soon as its automatic setup starts. v0.9.5 requires Maestro 2.10.0, so it runs setup for every user still on 2.5.1: they all hit this right after updating.
Cause:
Toolbarsubscribes touseEnvStore(selectSetupChip), and the selector returns a new object on every call. Once the chip is non-null (setup running, or a setup failure), React reads a new snapshot on every render, loops ("The result of getSnapshot should be cached", then "Maximum update depth exceeded") and unmounts the whole tree. There is no error boundary, so the window goes black. The bug has been there since v0.9.0; v0.9.5 just made setup run for everyone.Fix: read the chip through
useShallow. The version is bumped to 0.9.6 (scripts/bump-version.mjs, which also refreshes the BUSL Change Date) and a changelog entry is added.Test plan
setup_toolsemits progress/done events:Maximum update depth exceededin<Toolbar>, root emptiedtsc,eslint,prettier🤖 Generated with Claude Code