fix(ui): prevent white screen when the app mounts invisible#3210
Merged
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "prevent white screen when app mounts inv..." | Re-trigger Greptile |
0a5e536 to
128e445
Compare
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.
Problem
Users hit a "white screen of death": the app goes blank but is still alive (Cmd+K opens and navigating via it restores the screen). Logs from a report show the renderer isn't crashing at that moment. The whole authenticated app is wrapped in a framer-motion
motion.divthat fades fromopacity: 0to1. If that JS-driven enter animation never completes (a stalled frameloop, or the renderer auto-reloading after a crash without repainting), the entire subtree stays atopacity: 0. The command menu is a Radix dialog portaled todocument.body, so it still shows over the invisible app. The console'saria-hiddenwarning on<div#root>plus a still-focused tiptap editor confirm the app is mounted, just not visible.Changes
.app-fade-in) whose resting opacity is1. CSS animations run on the compositor independent of framer's JS frameloop, and a dropped or stalled animation can never leave the element below its base opacity, so the app can no longer get stranded invisible. The dark-mode entrance is unchanged (the separateLoginTransitionoverlay owns it).useAppVisibilityWatchdog: a one-shot check that, ~3s after the main app is shown, reports (scoped log plus captured exception) if the wrapper is still invisible (opacity ~0 or zero size). It fires only on failure, so it stays quiet normally and gives us a signal if this class of bug recurs from any cause.How did you test this?
packages/uitypecheck, Biome check, and the existingsrc/shelltests (48) pass.Automatic notifications