Repository navigation
A page from before a deploy reloads for a missing chunk instead of going black - #90
Merged
Merged
Conversation
…ing black Opening a Markdown file sometimes blacked out the whole screen. The Markdown renderer is a lazy chunk, and every deploy rebuilds web/dist under new chunk names; a page left open across one asks for the old name the first time it needs that chunk. The server answered the missing file with index.html and a 200, the browser refused HTML as a module, the lazy import threw, and with no error boundary anywhere React unmounted the whole app. Reproduced on a scratch instance by answering the chunk that way: #root was left with no children. Three layers, outermost last: - lazyChunk wraps React.lazy for both lazy panes (the editor and the Markdown renderer): a chunk that fails to load reloads the page once per 30s window, 600ms later so the click's debounced ui write lands first -- without that the reload came back with the panel open and no file in it. A second failure inside the window is real and throws. - An ErrorBoundary around the files panel's content, keyed by mode and path, says 'This could not be shown' with a Reload button and costs that pane alone; one around the app says so instead of going black. - The server answers a missing /assets/ file 404 rather than index.html, so the failure says the file is gone. Measured: with the chunk gone once, the page reloaded once and showed the file, 3 out of 3; gone for good, it reloaded once and then the pane said why with all 7 windows intact. The tests fail with the reload removed and with the window removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Opening a Markdown file sometimes blacked out the whole screen. The
Markdown renderer is a lazy chunk, and every deploy rebuilds web/dist
under new chunk names; a page left open across one asks for the old
name the first time it needs that chunk. The server answered the
missing file with index.html and a 200, the browser refused HTML as a
module, the lazy import threw, and with no error boundary anywhere
React unmounted the whole app. Reproduced on a scratch instance by
answering the chunk that way: #root was left with no children.
Three layers, outermost last:
Markdown renderer): a chunk that fails to load reloads the page once
per 30s window, 600ms later so the click's debounced ui write lands
first -- without that the reload came back with the panel open and no
file in it. A second failure inside the window is real and throws.
path, says 'This could not be shown' with a Reload button and costs
that pane alone; one around the app says so instead of going black.
index.html, so the failure says the file is gone.
Measured: with the chunk gone once, the page reloaded once and showed
the file, 3 out of 3; gone for good, it reloaded once and then the pane
said why with all 7 windows intact. The tests fail with the reload
removed and with the window removed.
🤖 Generated with Claude Code