Skip to content

Hotfix v0.9.6: black screen when setup starts - #78

Merged
BlueShork merged 2 commits into
mainfrom
fix/setup-chip-render-loop
Sep 24, 2026
Merged

BlueShork merged 2 commits into
mainfrom
fix/setup-chip-render-loop

Conversation

@BlueShork

Copy link
Copy Markdown
Owner

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: Toolbar subscribes to useEnvStore(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

  • Reproduced in WebKit (Playwright) on the real v0.9.0 app, with Tauri IPC stubbed so the env probe reports a wrong maestro version and setup_tools emits progress/done events: Maximum update depth exceeded in <Toolbar>, root emptied
  • Same scenario on this branch: no errors, root rendered, and the chip goes through every state ("Setting up — Java N%" → "… Maestro" → "… Android tools")
  • tsc, eslint, prettier

🤖 Generated with Claude Code

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

Copy link
Copy Markdown

@BlueShork
BlueShork merged commit 82d12cb into main Sep 24, 2026
9 checks passed
@BlueShork
BlueShork deleted the fix/setup-chip-render-loop branch September 24, 2026 14:13
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant